Damien George
2870862601
Add module object, to be used eventually for import.
11 years ago
Damien George
40563d56bd
py: Add framework for built-in "type()" function.
11 years ago
Damien George
209d1b1835
py: add int() and float() built-ins, partially implemented.
11 years ago
Damien George
6baf76e28b
py: make closures work.
11 years ago
Damien George
8cc96a35e5
Put unicode functions in unicode.c, and tidy their names.
11 years ago
Damien
dae7eb7226
py: add dict length function, and fix rt_store_set.
11 years ago
Damien
b86e3f9293
py: implement some basic exception matching.
11 years ago
Damien
d9d6201b52
py: simplify __next__ method for generators.
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
a3dcd9e80c
py: add more Python built-in functions.
11 years ago
Damien
660365e14c
py: split runtime into map, obj, builtin.
11 years ago
Damien
9ecbcfff99
py: work towards working closures.
11 years ago
Damien
db4c361f1c
py: add skeletal import functionality.
11 years ago
Damien
033d17a633
py: built-in range now accepts variable number of arguments.
11 years ago
Damien
86c7fc7dd9
py: add list pop and sort, unpack_sequence, and keywords in method_call.
11 years ago
Damien
d47f9d5a4f
py: add call to __init__ when instantiating class object.
11 years ago
Damien
f03001f8a6
Add function to decode and show byte code.
11 years ago
Damien
0446a0d76d
Change some debugging/output messages for native code generation.
11 years ago
Damien
6b92d451b2
Add len and subscr (a hack) support for strings.
11 years ago
Damien
5bf32c3b6b
Built-in print function supports variable number of arguments.
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
96a0addb18
Fixup include of stdarg and va_list definition.
11 years ago
Damien
2f06c57f8a
Add simple var-arg functions; add simple string.format.
11 years ago
Damien
33af3bf028
Change Py API names, py_get_* -> py_obj_get_*.
11 years ago
Damien
d57eba51e5
Add user object to runtime.
11 years ago
Damien
6ba1314265
Fix bug: emit native didn't clear last_was_return in label_assign.
11 years ago
Damien
7410e440ab
Add basic complex number support.
11 years ago
Damien
e0b1864337
Small hack to temporarily fix allocation of unique_code slots.
11 years ago
Damien
ccfc9c51ba
Py runtime: list.append returns None.
11 years ago
Damien
4ebb32fb95
Implement: str.join, more float support, ROT_TWO in VM.
11 years ago
Damien
2839168340
Add py_get_array_fixed_n function.
11 years ago
Damien
6f08f8ce51
Add working MMA support.
11 years ago
Damien
8b3a7c2237
Fix func decls with no arguments: () -> (void).
11 years ago
Damien
9fc7933ff2
Add py_get_qstr.
11 years ago
Damien
ec63cce470
Add simple support for C modules.
11 years ago
Damien
7b2d3f38ce
Implement some more operators, mostly for small ints.
11 years ago
Damien
f086ecf57c
Shrink py_obj_base_t size to 4 machine words.
11 years ago
Damien
df4b4f31ef
Make grammar rules const so the go in .text section.
11 years ago
Damien
1595f3257e
Make rt_fun_table const, so it goes in .text section.
11 years ago
Damien
5ac1b2efbd
Implement REPL.
11 years ago
Damien
d2755ec538
Add iterators and comprehension to emitnative.
11 years ago
Damien
c12aa468a1
Add SET_ADD opcode to VM.
11 years ago
Damien
bd25445a82
Implement BC & runtime support for generator/yielding.
11 years ago
Damien
c226dca1f7
Support tuples and list comprehension, albeit crude.
11 years ago
Damien
ce89a21ea4
Implement basic exception framework, and simple for loop.
11 years ago
Damien
3ef4abb446
Change ifdef/if defined to simple if's.
11 years ago
Damien
c025ebb2dc
Separate out mpy core and unix version.
11 years ago
Damien
a1ddfcc213
Wrap out-native code in preprocessor declarations.
11 years ago
Damien
eb19efb27e
Simplify and improve function & method calling.
11 years ago