- 05 Apr, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 31 Mar, 2014 4 commits
-
-
Damien George authored
It's not completely satisfactory, because a failed call to __getattr__ should not raise an exception. __setattr__ could be implemented, but it would slow down all stores to a user created object. Need to implement some caching system.
-
Damien George authored
-
Damien George authored
These are default arguments after a bare *.
-
Damien George authored
Adding this bytecode allows to remove 4 others related to function/method calls with * and ** support. Will also help with bytecodes that make functions/closures with default positional and keyword args.
-
- 30 Mar, 2014 4 commits
-
-
Paul Sokolovsky authored
Iterators and ducktype objects can now be arguments of yield from.
-
Damien George authored
Extends previous implementation with * for function calls to * and ** for both function and method calls.
-
Damien George authored
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
-
Damien George authored
Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
-
- 29 Mar, 2014 1 commit
-
-
Damien George authored
Partly (very partly!) addresses issue #386. Most importantly, at the REPL command line, each invocation does not now lead to increased memory usage (unless you define a function/lambda).
-
- 27 Mar, 2014 1 commit
-
-
Damien George authored
-
- 26 Mar, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
-
- 23 Mar, 2014 1 commit
-
-
Paul Sokolovsky authored
For this, needed to implement DELETE_NAME bytecode (because var bound in except clause is automatically deleted at its end). http://docs.python.org/3/reference/compound_stmts.html#except : "When an exception has been assigned using as target, it is cleared at the end of the except clause."
-
- 18 Feb, 2014 1 commit
-
-
Dave Hylands authored
This commit also introduces board directories and moves board specific config into the appropriate board directory. boards/stm32f4xx-af.csv was extracted from the STM32F4xx datasheet and hand-tweaked. make-pins.py takes boards/stm32f4xx-af.csv, boards/stm32f4xx-prefix.c, and boards/BOARD-NAME/pins.csv as input and generates the file build/pins_BOARD_NAME.c The generated pin file for PYBOARD4 looks like this: https://gist.github.com/dhylands/9063231 The generated pins file includes all of the supported alternate functions, and includes upsupported alternate functions as comments. See the commnet block at the top of stm/pin_map.c for details on how to use the pin mapper. I also went ahead and modified stm/gpio.c to use the pin mapper.
-
- 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
-