micropython/stm
Damien George 9b196cddab Remove mp_obj_type_t.methods entry and use .locals_dict instead.
Originally, .methods was used for methods in a ROM class, and
locals_dict for methods in a user-created class.  That distinction is
unnecessary, and we can use locals_dict for ROM classes now that we have
ROMable maps.

This removes an entry in the bloated mp_obj_type_t struct, saving a word
for each ROM object and each RAM object.  ROM objects that have a
methods table (now a locals_dict) need an extra word in total (removed
the methods pointer (1 word), no longer need the sentinel (2 words), but
now need an mp_obj_dict_t wrapper (4 words)).  But RAM objects save a
word because they never used the methods entry.

Overall the ROM usage is down by a few hundred bytes, and RAM usage is
down 1 word per user-defined type/class.

There is less code (no need to check 2 tables), and now consistent with
the way ROM modules have their tables initialised.

Efficiency is very close to equivaluent.
2014-03-26 21:47:19 +00:00
..
boards
cc3k
cmsis
fatfs
stmperiph
stmusb
stmusbd
stmusbh
.gitignore
Makefile stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
accel.c
accel.h
adc.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
adc.h
audio.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
audio.h
delay.s
exti.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
exti.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
file.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
file.h
flash.c
flash.h
font_petme128_8x8.h
gccollect.c
gccollect.h
gchelper.s
gpio.c stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
gpio.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
i2c.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
i2c.h
import.c
lcd.c
lcd.h
led.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
led.h
lexerfatfs.c
lexerfatfs.h
main.c Proper support for registering builtin modules in ROM. 2014-03-25 14:18:18 +00:00
malloc0.c
math.c stm/stmhal: Change gammaf to tgammaf. 2014-03-23 14:00:02 +00:00
mpconfigport.h Rename formatfloat file; remove MICROPY_ENABLE_FLOAT from mpconfigport.h. 2014-03-10 13:27:02 +00:00
pendsv.c
pendsv.h
pin.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
pin.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
pin_map.c stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
pin_named_pins.c
printf.c Rename formatfloat file; remove MICROPY_ENABLE_FLOAT from mpconfigport.h. 2014-03-10 13:27:02 +00:00
pybmodule.c Proper support for registering builtin modules in ROM. 2014-03-25 14:18:18 +00:00
pybmodule.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
pybwlan.c
pybwlan.h
pyexec.c Add vstr_ins and vstr_cut_out; improve stmhal readline. 2014-03-15 14:33:09 +00:00
pyexec.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
qstrdefsport.h Change mp_method_t.name from const char * to qstr. 2014-03-26 20:15:40 +00:00
rtc.c
rtc.h
sdcard.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
sdcard.h
servo.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
servo.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
startup_stm32f40xx.s
std.h
stm32f405.ld
stm32fxxx_it.c
stm32fxxx_it.h
storage.c
storage.h
string0.c
system_stm32f4xx.c
systick.c
systick.h
timer.c
timer.h
usart.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
usart.h stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
usb.c
usb.h
usrsw.c
usrsw.h