Commit Graph

7 Commits

Author SHA1 Message Date
Damien d99b05282d Change object representation from 1 big union to individual structs.
A big change.  Micro Python objects are allocated as individual structs
with the first element being a pointer to the type information (which
is itself an object).  This scheme follows CPython.  Much more flexible,
not necessarily slower, uses same heap memory, and can allocate objects
statically.

Also change name prefix, from py_ to mp_ (mp for Micro Python).
2013-12-21 18:17:45 +00:00
Damien d2c1a732e5 Call gc_free in gc_realloc after allocating new block. 2013-10-23 21:03:27 +01:00
Damien 8b3a7c2237 Fix func decls with no arguments: () -> (void). 2013-10-23 20:20:17 +01:00
Damien bb5316b905 gc: reserve first block; lexer: free vstr. 2013-10-22 21:12:29 +01:00
Damien fd8b6bcf55 Add gc_free function to force a block to be freed. 2013-10-22 20:26:36 +01:00
Damien eefcc79022 Clear ATBs on gc_init; better gc_info. 2013-10-22 15:25:25 +01:00
Damien dcced92c26 Add mark-sweep garbage collector. 2013-10-21 23:45:08 +01:00