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 stm: Improve DAC (audio) bindings. 2014-03-08 15:14:53 +00:00
cc3k Revert MP_BOOL, etc. and use <stdbool.h> instead 2014-01-06 13:51:53 -08:00
cmsis stm: Upgrade to latest CMSIS libraries. 2014-01-19 16:43:33 +00:00
fatfs Add Configurable LFN support to FatFS 2014-02-22 22:09:00 +02:00
stmperiph Fix build for netduino and stm32f4disc 2014-02-16 23:14:49 -08:00
stmusb stm: Only define __packed if not already defined. 2014-02-16 11:24:44 +00:00
stmusbd stm: Add option to pyb_usb_dev_init() to use USB HID interface. 2014-02-24 01:12:04 +00:00
stmusbh stm: USB host mode working! Restructure stm library directories. 2014-01-26 17:41:01 +00:00
.gitignore Inital commit of stm32f4xx framework. 2013-10-13 00:42:20 +01:00
Makefile stm: Put pyb module in ROM. 2014-03-08 16:40:08 +00:00
accel.c stm: Rename mma -> accel. 2014-02-16 21:41:57 +00:00
accel.h stm: Rename mma -> accel. 2014-02-16 21:41:57 +00:00
adc.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
adc.h stm: Improved ADC module; add BOARD_NAME config value. 2014-01-25 16:30:47 +00:00
audio.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
audio.h stm: Improve DAC (audio) bindings. 2014-03-08 15:14:53 +00:00
delay.s Inital commit of stm32f4xx framework. 2013-10-13 00:42:20 +01:00
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 Move file obj to separate module 2014-01-24 17:14:13 +02:00
flash.c Partially implement proper flash storage. 2013-10-18 23:44:05 +01:00
flash.h Partially implement proper flash storage. 2013-10-18 23:44:05 +01:00
font_petme128_8x8.h Inital commit of stm32f4xx framework. 2013-10-13 00:42:20 +01:00
gccollect.c stm: Tidy up memory labels; optimise GC root scanning. 2014-02-10 22:50:44 +00:00
gccollect.h stm: Tidy up memory labels; optimise GC root scanning. 2014-02-10 22:50:44 +00:00
gchelper.s stm: Tidy up memory labels; optimise GC root scanning. 2014-02-10 22:50:44 +00:00
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 Added i2c python interface object 2013-12-28 19:23:33 -05:00
import.c stm: Implement mp_import_stat. 2014-02-17 22:44:20 +00:00
lcd.c Change mp_obj_type_t.name from const char * to qstr. 2014-02-15 11:34:50 +00:00
lcd.h STM: add LCD functions for pixel access; add RNG Py bindings. 2013-11-09 20:15:48 +00:00
led.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
led.h stm: Clean up main.c; disable libgcc by default. 2014-01-21 23:28:03 +00:00
lexerfatfs.c stm: Implement mp_import_stat. 2014-02-17 22:44:20 +00:00
lexerfatfs.h stm: Add stm import support. 2014-01-16 22:09:13 +00:00
main.c Proper support for registering builtin modules in ROM. 2014-03-25 14:18:18 +00:00
malloc0.c Generalize malloc-via-gc-heap support, make it available to unix port. 2014-02-11 16:20:02 +02:00
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 stm: Make pendsv_nlr_jump work when debugging is enabled. 2014-02-23 00:31:11 +00:00
pendsv.h stm: Add support for ctrl-C to interrupt running Python. 2014-02-01 16:04:34 +00:00
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 Add pin mapping code. 2014-02-17 21:20:38 -08:00
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 Remove mp_obj_new_exception_msg_1_arg and _2_arg. 2014-02-12 23:02:19 +00:00
pybwlan.h stm: initial commit of working CC3000 driver, based on Adafruit. 2013-12-05 20:38:23 +00:00
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 stm: Add RTC start-up info, and uPy bindings. 2014-02-19 23:15:09 +00:00
rtc.h stm: Add RTC start-up info, and uPy bindings. 2014-02-19 23:15:09 +00:00
sdcard.c Remove mp_obj_type_t.methods entry and use .locals_dict instead. 2014-03-26 21:47:19 +00:00
sdcard.h stm: If SD card inserted on hard reset, it is the medium for USB MSD. 2014-02-13 23:21:02 +00:00
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 stm: Tidy up memory labels; optimise GC root scanning. 2014-02-10 22:50:44 +00:00
std.h stm: Provide malloc()/realloc()/free(), as forwarding to gc_*() functions. 2014-02-11 18:09:50 +02:00
stm32f405.ld stm: Tidy up memory labels; optimise GC root scanning. 2014-02-10 22:50:44 +00:00
stm32fxxx_it.c Add EXTI support 2014-02-23 11:26:22 -08:00
stm32fxxx_it.h Working SysTick, code factoring, some boot-up code. 2013-10-19 14:40:54 +01:00
storage.c stm: Mount SD card on 1:/ if present. 2014-02-08 16:00:15 +00:00
storage.h stm: Mount SD card on 1:/ if present. 2014-02-08 16:00:15 +00:00
string0.c stm: Remove unused, useless and not-to-be-used strndup. 2014-02-10 22:55:15 +00:00
system_stm32f4xx.c Remove hardcoded PLL_M value 2014-01-21 14:43:13 +02:00
systick.c Revert MP_BOOL, etc. and use <stdbool.h> instead 2014-01-06 13:51:53 -08:00
systick.h Revert MP_BOOL, etc. and use <stdbool.h> instead 2014-01-06 13:51:53 -08:00
timer.c Revamp qstrs: they now include length and hash. 2014-01-21 21:40:13 +00:00
timer.h Add to STM code timer functionality to call Python on interrupt. 2013-11-06 23:04:33 +00:00
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 stm: Add option to pyb_usb_dev_init() to use USB HID interface. 2014-02-24 01:12:04 +00:00
usb.h stm: Add option to pyb_usb_dev_init() to use USB HID interface. 2014-02-24 01:12:04 +00:00
usrsw.c Remove param from python API of ext_register 2014-02-26 20:24:51 -08:00
usrsw.h stm: rename sw_xx to switch_xx; change Python bindings to new version. 2014-01-05 14:04:55 +00:00