- 28 Jan, 2015 1 commit
-
-
Damien George authored
-
- 27 Jan, 2015 3 commits
-
-
David Steinberg authored
- This then provides support for floats in the struct package
-
Damien George authored
Eg, "() + 1" now tells you that __add__ is not supported for tuple and int types (before it just said the generic "binary operator"). We reuse the table of names for slot lookup because it would be a waste of code space to store the pretty name for each operator.
-
Damien George authored
-
- 25 Jan, 2015 1 commit
-
-
Damien George authored
Defining NDEBUG (to any value, even 0) disables debugging. Otherwise, if it's not defined, debugging is enabled.
-
- 24 Jan, 2015 8 commits
-
-
Damien George authored
This makes the code (more) compatible with the C99 standard.
-
Damien George authored
-
David Steinberg authored
-
David Steinberg authored
-
David Steinberg authored
-
David Steinberg authored
-
stijn authored
- namedtuple was wrongly using MP_OBJ_QSTR_VALUE instead of mp_obj_str_get_qstr, so when passed a non-interned string it would segfault; fix this by using mp_obj_str_get_qstr - store the namedtuple field names as qstrs so it is not needed to use mp_obj_str_get_qstr everytime the field name has to be accessed. This also slighty increases performance when fetching attributes
-
Paul Sokolovsky authored
-
- 23 Jan, 2015 4 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
After vstr refactor. Fixes #1084.
-
Paul Sokolovsky authored
There was really weird warning (promoted to error) when building Windows port. Exact cause is still unknown, but it uncovered another issue: 8-bit and unicode str_make_new implementations should be mutually exclusive, and not built at the same time. What we had is that bytes_decode() pulled 8-bit str_make_new() even for unicode build.
-
Paul Sokolovsky authored
To somewhat unbreak -DSTATIC="" compile.
-
- 22 Jan, 2015 2 commits
-
-
Damien George authored
See issue #699.
-
Damien George authored
It needs to be scanned by GC. Thanks to Daniel Campora.
-
- 21 Jan, 2015 6 commits
-
-
Damien George authored
-
Damien George authored
With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
-
Damien George authored
This patch allows to reuse vstr memory when creating str/bytes object. This improves memory usage. Also saves code ROM: 128 bytes on stmhal, 92 bytes on bare-arm, and 88 bytes on unix x64.
-
Paul Sokolovsky authored
-
Damien George authored
This allows an exception to propagate correctly through a finally handler.
-
Damien George authored
Addresses issue #1073.
-
- 20 Jan, 2015 5 commits
-
-
stijn authored
Addresses issue #1067.
-
Damien George authored
Reduces stmhal code size by about 250 bytes.
-
Damien George authored
See issue #699.
-
Damien George authored
See issue #699.
-
Paul Sokolovsky authored
Only modules (not packages) supported now. Source modules can be converted to frozen module structures using tools/make-frozen.py script.
-
- 16 Jan, 2015 2 commits
-
-
Damien George authored
See issue #699.
-
Damien George authored
Saves 24 bytes in bare-arm.
-
- 15 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
pyexec_friendly_repl_process_char() and friends, useful for ports which integrate into existing cooperative multitasking system. Unlike readline() refactor before, this was implemented in less formal, trial&error process, minor functionality regressions are still known (like soft&hard reset support). So, original loop-based pyexec_friendly_repl() is left intact, specific implementation selectable by config setting.
-
- 14 Jan, 2015 5 commits
-
-
Damien George authored
This helps compiler produce smaller code. Saves 124 bytes on stmhal and bare-arm.
-
Damien George authored
-
Damien George authored
Previously was allocating at end of PASS_COMPUTE, and this pass was being run twice, so memory was being allocated twice.
-
Damien George authored
Bytecode also needs a pass to compute the stack size. This is because the state size of the bytecode function is encoded as a variable uint, so we must know the value of this uint before we encode it (otherwise the size of the generated code changes from one pass to the next). Having an entire pass for this seems wasteful (in time). Alternative is to allocate fixed space for the state size (would need 3-4 bytes to be general, when 1 byte is usually sufficient) which uses a bit of extra RAM per bytecode function, and makes the code less elegant in places where this uint is encoded/decoded. So, for now, opt for an extra pass.
-
Damien George authored
Native code has GC-heap pointers in it so it must be scanned. But on unix port memory for native functions is mmap'd, and so it must have explicit code to scan it for root pointers.
-
- 13 Jan, 2015 2 commits
-
-
Damien George authored
-
Damien George authored
-