Damien George
8725f8f7de
py: Pass all scope flags through to runtime.
2014-02-15 19:33:11 +00:00
Paul Sokolovsky
fd31358505
mp_compile(): Properly free module_scope and all nested scopes.
2014-01-23 23:16:18 +02:00
Damien George
cbd2f7482c
py: Add module/function/class name to exceptions.
...
Exceptions know source file, line and block name.
Also tidy up some debug printing functions and provide a global
flag to enable/disable them.
2014-01-19 11:48:48 +00:00
Damien George
6baf76e28b
py: make closures work.
2013-12-30 22:32:17 +00:00
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
9ecbcfff99
py: work towards working closures.
2013-12-11 00:41:43 +00:00
Damien
27fb45eb1c
Add local_num skeleton framework to deref/closure emit calls.
2013-10-20 15:07:49 +01:00
Damien
6cdd3af601
Implement built-in decorators to select emit type.
2013-10-05 18:08:26 +01:00
Damien
b05d707b23
Further factorise PASS_1 out of specific emit code.
2013-10-05 13:37:10 +01:00
Damien
415eb6f850
Restructure emit so it goes through a method table.
2013-10-05 12:19:06 +01:00
Damien
429d71943d
Initial commit.
2013-10-04 19:53:11 +01:00