summaryrefslogtreecommitdiffstatshomepage
path: root/py/compile.c
Commit message (Collapse)AuthorAge
* py: Fix compile of class with keyword arguments in bases.Damien George2014-02-06
|
* py: Add built-in super.Damien George2014-02-05
|
* py: Tidy up BINARY_OPs; negation done by special NOT bytecode.Damien George2014-02-01
| | | | | IS_NOT and NOT_IN are now compiled to IS + NOT and IN + NOT, with a new special NOT bytecode.
* py: Reduce code size of compiler by a bit.Damien George2014-02-01
|
* py: Implement break/continue from an exception with finally.Damien George2014-02-01
| | | | Still todo: break/continue from within the finally block itself.
* Implement default function arguments (for Python functions).Paul Sokolovsky2014-02-01
| | | | | | | | TODO: Decide if we really need separate bytecode for creating functions with default arguments - we would need same for closures, then there're keywords arguments too. Having all combinations is a small exponential explosion, likely we need just 2 cases - simplest (no defaults, no kw), and full - defaults & kw.
* py: Fix bug with LOAD_METHOD; fix int->machine_int_t for small int.Damien George2014-01-29
| | | | | | | | LOAD_METHOD bug was: emitbc did not correctly calculate the amount of stack usage for a LOAD_METHOD operation. small int bug was: int was being used to pass small ints, when it should have been machine_int_t.
* py: Implement 'not' in compiler, and improve rt_is_true.Damien George2014-01-28
|
* py: Improve freeing of emitters in mp_compile.Damien George2014-01-24
| | | | | There can be multiple emitters allocated during compile (eg byte code and native).
* Add support for freeing code emitter objects at the end of compilation.Paul Sokolovsky2014-01-24
|
* mp_compile(): Properly free module_scope and all nested scopes.Paul Sokolovsky2014-01-23
|
* py: Use C99 way of variable macro arguments.Damien George2014-01-23
| | | | Addresses Issue #207.
* py: Change macro var args in parser to be C99 compliant.Damien George2014-01-23
|
* py: Implement break and continue byte codes, and add tests.Damien George2014-01-21
| | | | | | | Also fixes a bug in the for-in-range optimiser. I hope to remove break and continue byte codes in the future and just use jump (if possible).
* Revamp qstrs: they now include length and hash.Damien George2014-01-21
| | | | | Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
* py: Add module/function/class name to exceptions.Damien George2014-01-19
| | | | | | | Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
* Add source file name and line number to error messages.Damien George2014-01-18
| | | | | Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
* Implement eval.Damien George2014-01-15
|
* py: AssertionError is loaded from global, to match CPython.Damien George2014-01-12
|
* unified the bopsJohn R. Lenton2014-01-11
|
* compile_for_stmt_optimised_range(): Properly handle negative & unknown steps.Paul Sokolovsky2014-01-11
| | | | | If step is not constant, in first approximation, we can't apply optimization, (well, we could, but need a special case for this).
* Convert Python types to proper Python type hierarchy.Damien George2014-01-04
| | | | Now much more inline with how CPython does types.
* Split qstr into pools, and put initial pool in ROM.Damien George2014-01-04
| | | | | | | | | | | | | | | | Qstr's are now split into a linked-list of qstr pools. This has 2 benefits: the first pool can be in ROM (huge benefit, since we no longer use RAM for the core qstrs), and subsequent pools use m_new for the next pool instead of m_renew (thus avoiding a huge single table for all the qstrs). Still would be better to use a hash table, but this scheme takes us part of the way (eventually convert the pools to hash tables). Also fixed bug with import. Also improved the way the module code is referenced (not magic number 1 anymore).
* Improve configurability for native x64/thumb emitter.Damien George2014-01-04
| | | | | | 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.
* Change mp_compile so that it returns a function object for the module.Damien George2014-01-03
|
* py: remove depedence on strcat and stpcpy.Damien George2014-01-02
| | | | | This fixes Issue #29, and means the core is no longer dependent on string functions, except strlen.
* py: make closures work.Damien George2013-12-30
|
* Change memory allocation API to require size for free and realloc.Damien2013-12-29
|
* Change object representation from 1 big union to individual structs.Damien2013-12-21
| | | | | | | | | | 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).
* Fix a few compiler warnings.Damien2013-12-20
|
* py: remove further unnecessary emit_verbatim code.Damien2013-12-12
|
* py: fix bug with doc string not recognised after first newline of file.Damien2013-12-12
|
* py: reduce use of emit_verbatim calls to minimum.Damien2013-12-12
|
* py: work towards working closures.Damien2013-12-11
|
* py: emit correct id for closed over variables.Damien2013-12-10
|
* py: compiler supports string juxtaposition=concatenation.Damien2013-12-10
|
* py: add skeletal import functionality.Damien2013-12-10
|
* py: restrict further when for-range optimisation is done.Damien2013-11-28
|
* Change some debugging/output messages for native code generation.Damien2013-11-17
|
* Fix but with optimised range being 1 over.Damien2013-11-09
|
* Add optimisation for "for x in range".Damien2013-11-06
|
* Add local_num skeleton framework to deref/closure emit calls.Damien2013-10-20
|
* Implement REPL.Damien2013-10-18
|
* Implement basic exception framework, and simple for loop.Damien2013-10-15
|
* Change ifdef/if defined to simple if's.Damien2013-10-12
|
* Tidy up SMALL_INT optimisations and CPython compatibility.Damien2013-10-12
|
* Option in compile.c to emit compatible or not with CPython.Damien2013-10-12
|
* Separate out mpy core and unix version.Damien2013-10-12
|
* Improve indent/dedent error checking and reporting.Damien2013-10-09
|
* Native Python and Viper support for x64 and thumb all together.Damien2013-10-08
|