KnightSch / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 1 forks source link

Refactor globals and initialization #207

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Improvements to VM init and the globals struct.

Original issue reported on code.google.com by dwhall...@gmail.com on 4 Jul 2011 at 2:07

GoogleCodeExporter commented 8 years ago
- Move plat_init() to main() so that plat_init() isn't called if the user wants 
to init a second instance of the VM.
- Add "None", "False", and "True" strings to pmCoCreator's pre-processed globals
- Move global_loadBuiltins() to pm_loadBuiltins()
- Merge global_init() into pm_init()
- Move PM_* macros of pre-processed globals to pm.h
- Move globals struct to pm.h
- Remove files global.c and global.h

Original comment by dwhall...@gmail.com on 4 Jul 2011 at 2:18

GoogleCodeExporter commented 8 years ago
Using the pre-processed globals saves 72 bytes of RAM.
Tested by running posix/main.py.

Original comment by dwhall...@gmail.com on 4 Jul 2011 at 2:23

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 663deb7c2b9d

Original comment by dwhall...@gmail.com on 4 Jul 2011 at 2:27