xbe
efe3422394
py: Clean up includes.
Remove unnecessary includes. Add includes that improve portability.
11 years ago
Damien George
8725f8f7de
py: Pass all scope flags through to runtime.
11 years ago
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.
11 years ago
Paul Sokolovsky
fd31358505
mp_compile(): Properly free module_scope and all nested scopes.
11 years ago
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
11 years ago
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.
11 years ago
ian-v
5fd8fd2c16
Revert MP_BOOL, etc. and use <stdbool.h> instead
11 years ago
ian-v
7a16fadbf8
Co-exist with C++ (issue #85 )
11 years ago
Damien George
6baf76e28b
py: make closures work.
11 years ago
Damien
732407f1bf
Change memory allocation API to require size for free and realloc.
11 years ago
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).
11 years ago
Damien
9ecbcfff99
py: work towards working closures.
11 years ago
Damien
27fb45eb1c
Add local_num skeleton framework to deref/closure emit calls.
11 years ago
Damien
c025ebb2dc
Separate out mpy core and unix version.
11 years ago
Damien
6cdd3af601
Implement built-in decorators to select emit type.
11 years ago
Damien
b05d707b23
Further factorise PASS_1 out of specific emit code.
11 years ago
Damien
415eb6f850
Restructure emit so it goes through a method table.
11 years ago
Damien
429d71943d
Initial commit.
11 years ago