Commit Graph

21 Commits

Author SHA1 Message Date
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.
2014-01-18 23:24:36 +00:00
Damien George
bc1d36924d py: Fix emitcpy and emitnative's binary_op. 2014-01-11 09:47:06 +00:00
John R. Lenton
b8698fca75 unified the bops 2014-01-11 00:58:59 +00:00
Damien George
e67ed5d285 Improve configurability for native x64/thumb emitter.
With MICROPY_EMIT_X64 and MICROPY_EMIT_THUMB disabled, the respective
emitters and assemblers will not be included in the code.  This can
significantly reduce binary size for unix version.
2014-01-04 13:55:24 +00:00
Damien George
1fb031744f Change mp_compile so that it returns a function object for the module. 2014-01-03 14:22:03 +00:00
Damien
de690d128b Add unix-cpy, used to test Micro Python byte code against CPython. 2013-12-29 18:01:01 +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
a1b2693161 py: remove further unnecessary emit_verbatim code. 2013-12-12 15:34:40 +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
a5185f4bc8 Abstract out back-end stream functionality from lexer. 2013-10-20 14:41:27 +01:00
Damien
3ef4abb446 Change ifdef/if defined to simple if's. 2013-10-12 16:53:13 +01:00
Damien
c025ebb2dc Separate out mpy core and unix version. 2013-10-12 14:30:21 +01:00
Damien
a397776d6b Implement basic class/object functionality in runtime. 2013-10-09 23:10:10 +01:00
Damien
826005c60b Add support for inline thumb assembly. 2013-10-05 23:17:28 +01:00
Damien
6cdd3af601 Implement built-in decorators to select emit type. 2013-10-05 18:08:26 +01:00
Damien
4b03e77d4a Factorise EMIT_COMMON calls, mostly into emit_pass1. 2013-10-05 14:17:09 +01:00
Damien
054848a1b8 Compiler computes labels and max_num_labels. 2013-10-05 13:44:41 +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