Paul Sokolovsky
ab5d08280b
Allow qstr's with non-ident chars, construct good identifier for them.
...
Also, add qstr's for string appearing in unix REPL loop, gross effect
being less allocations for each command run.
2014-01-24 02:34:22 +02:00
Paul Sokolovsky
fd31358505
mp_compile(): Properly free module_scope and all nested scopes.
2014-01-23 23:16:18 +02:00
Damien George
55baff4c9b
Revamp qstrs: they now include length and hash.
...
Can now have null bytes in strings. Can define ROM qstrs per port using
qstrdefsport.h
2014-01-21 21:40:13 +00: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
732407f1bf
Change memory allocation API to require size for free and realloc.
2013-12-29 19:33:23 +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
c025ebb2dc
Separate out mpy core and unix version.
2013-10-12 14:30:21 +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