- 21 May, 2014 1 commit
-
-
Damien George authored
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
-
- 10 May, 2014 1 commit
-
-
Damien George authored
Parser shouldn't raise exceptions, so needs to check when memory allocation fails. This patch does that for the initial set up of the parser state. Also, we now put the parser object on the stack. It's small enough to go there instead of on the heap. This partially addresses issue #558.
-
- 08 May, 2014 1 commit
-
-
Paul Sokolovsky authored
Draft approach towards resolving https://github.com/micropython/micropython/issues/560#issuecomment-42213955
-
- 06 May, 2014 1 commit
-
-
Damien George authored
Doesn't help with RAM reduction because doc strings are interned as soon as they are encountered, which is too soon to do any optimisations on them.
-
- 05 May, 2014 1 commit
-
-
Damien George authored
There are 2 locations in parser, and 1 in compiler, where memory allocation is not precise. In the parser it's the rule stack and result stack, in the compiler it's the array for the identifiers in the current scope. All other mallocs are exact (ie they don't allocate more than is needed). This patch adds tuning options (MP_ALLOC_*) to mpconfig.h for these 3 inexact allocations. The inexact allocations in the parser should actually be close to logarithmic: you need an exponentially larger script (absent pathological cases) to use up more room on the rule and result stacks. As such, the default allocation policy for these is now to start with a modest sized stack, but grow only in small increments. For the identifier arrays in the compiler, these now start out quite small (4 entries, since most functions don't have that many ids), and grow incrementally by 6 (since if you have more ids than 4, you probably have quite a few more, but it wouldn't be exponentially more). Partially addresses issue #560.
-
- 03 May, 2014 1 commit
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
- 10 Apr, 2014 1 commit
-
-
Damien George authored
Previously, a failed malloc/realloc would throw an exception, which was not caught. I think it's better to keep the parser free from NLR (exception throwing), hence this patch.
-
- 17 Mar, 2014 1 commit
-
-
xbe authored
Remove unnecessary includes. Add includes that improve portability.
-
- 01 Mar, 2014 1 commit
-
-
Damien George authored
Implement not, shl and shr in mpz library. Add function to create mpzs on the stack, used for memory efficiency when rhs is a small int. Factor out code to parse base-prefix of number into a dedicated function.
-
- 22 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
Based on suggestion by @dpgeorge at https://github.com/micropython/micropython/pull/313
-
- 21 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
Specifically, VM's small ints are 31 bit, while parser's only 28. There's already MP_OBJ_FITS_SMALL_INT(), so, for clarity, rename MP_FIT_SMALL_INT() to MP_PARSE_FITS_SMALL_INT().
-
- 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.
-
- 12 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 29 Jan, 2014 1 commit
-
-
Damien George authored
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.
-
- 25 Jan, 2014 2 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
TODO: Check lexer/parse/compile error path for leaks too.
-
- 23 Jan, 2014 1 commit
-
-
Damien George authored
-
- 21 Jan, 2014 1 commit
-
-
Damien George authored
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
-
- 19 Jan, 2014 1 commit
-
-
Damien George authored
Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
-
- 18 Jan, 2014 1 commit
-
-
Damien George authored
Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
-
- 15 Jan, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
Parser no longer prints an error, but instead returns an exception ID and message.
-
- 12 Jan, 2014 2 commits
-
-
Paul Sokolovsky authored
Long int is something which doesn't fit into SMALL_INT partion of machine_int_t. But it's also something which doesn't fit into machine_int_t in the first place.
-
Damien George authored
-
- 06 Jan, 2014 2 commits
- 30 Dec, 2013 1 commit
-
-
Damien George authored
-
- 29 Dec, 2013 2 commits
- 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).
-
- 02 Nov, 2013 1 commit
-
-
Damien authored
-
- 19 Oct, 2013 1 commit
-
-
Damien authored
-
- 18 Oct, 2013 1 commit
-
-
Damien authored
-
- 12 Oct, 2013 2 commits
- 09 Oct, 2013 1 commit
-
-
Damien authored
-
- 05 Oct, 2013 3 commits
- 04 Oct, 2013 1 commit
-
-
Damien authored
-