- 15 Feb, 2014 1 commit
-
-
Damien George authored
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
-
- 13 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 04 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
sys.path is not initialized by rt_init(), that's left for platform-specific startup code. (For example, bare metal port may have some hardcoded defaults, and let user change sys.path directly; while port for OS with environment feature can take path from environment). If it's not explicitly initialized, modules will be imported only from a current directory.
-
- 02 Feb, 2014 1 commit
-
-
Damien George authored
Native emitter has been broken since stack order has changed from reverse to standard. This fix gets it partially working.
-
- 01 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
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.
-
- 24 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
This reuses as much str implementation as possible, from this we can make them more separate as needed.
-
- 22 Jan, 2014 1 commit
-
-
Damien George authored
STM port crashes without this re-init. There should not be any state in the core py/ code that relies on pre-initialised data.
-
- 18 Jan, 2014 1 commit
-
-
Damien George authored
Change state layout in VM so the stack starts at state[0] and grows upwards. Locals are at the top end of the state and number downwards. This cleans up a lot of the interface connecting the VM to C: now all functions that take an array of Micro Python objects are in order (ie no longer in reverse). Also clean up C API with keyword arguments (call_n and call_n_kw replaced with single call method that takes keyword arguments). And now make_new takes keyword arguments. emitnative.c has not yet been changed to comply with the new order of stack layout.
-
- 13 Jan, 2014 1 commit
-
-
Damien George authored
-
- 11 Jan, 2014 1 commit
-
-
John R. Lenton authored
-
- 04 Jan, 2014 1 commit
-
-
Damien George authored
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).
-
- 03 Jan, 2014 1 commit
-
-
Damien George authored
import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
-
- 21 Dec, 2013 1 commit
-
-
Damien authored
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).
-
- 17 Dec, 2013 2 commits
- 11 Dec, 2013 1 commit
-
-
Damien authored
-
- 10 Dec, 2013 1 commit
-
-
Damien authored
-
- 26 Nov, 2013 1 commit
-
-
Damien authored
-
- 03 Nov, 2013 2 commits
- 02 Nov, 2013 4 commits
- 24 Oct, 2013 1 commit
-
-
Damien authored
-
- 23 Oct, 2013 2 commits
- 22 Oct, 2013 2 commits
- 19 Oct, 2013 2 commits
- 18 Oct, 2013 1 commit
-
-
Damien authored
-
- 16 Oct, 2013 4 commits
- 15 Oct, 2013 1 commit
-
-
Damien authored
-
- 10 Oct, 2013 2 commits
- 09 Oct, 2013 1 commit
-
-
Damien authored
-