Damien George
fb083ea986
py: mp_execute_byte_code has 2 arg arrays, for more efficient default params.
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
Damien George
08335004cf
Add source file name and line number to error messages.
Byte code has a map from byte-code offset to source-code line number,
used to give better error messages.
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
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
db4c361f1c
py: add skeletal import functionality.
11 years ago
Damien
40fdfe3000
Improve allocation of stack for byte code.
11 years ago
Damien
03c9cfb015
Make byte code jumps relative.
11 years ago
Damien
bd25445a82
Implement BC & runtime support for generator/yielding.
11 years ago
Damien
5609cca2ce
Rename vm.h to bc.h.
11 years ago
Damien
a397776d6b
Implement basic class/object functionality in runtime.
11 years ago
Damien
b05d707b23
Further factorise PASS_1 out of specific emit code.
11 years ago
Damien
429d71943d
Initial commit.
11 years ago