Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py/persistentcode: Allow to compile with complex numbers disabled. | Damien George | 2017-06-08 |
| | |||
* | py: Add LOAD_SUPER_METHOD bytecode to allow heap-free super meth calls. | Damien George | 2017-04-22 |
| | | | | | | | | | | | | | | | | | | | | | | This patch allows the following code to run without allocating on the heap: super().foo(...) Before this patch such a call would allocate a super object on the heap and then load the foo method and call it right away. The super object is only needed to perform the lookup of the method and not needed after that. This patch makes an optimisation to allocate the super object on the C stack and discard it right after use. Changes in code size due to this patch are: bare-arm: +128 minimal: +232 unix x64: +416 unix nanbox: +364 stmhal: +184 esp8266: +340 cc3200: +128 | ||
* | py: Allow lexer to raise exceptions during construction. | Damien George | 2017-03-14 |
| | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the error handling in the lexer, to simplify it (ie reduce code size). A long time ago, when the lexer/parser/compiler were first written, the lexer and parser were designed so they didn't use exceptions (ie nlr) to report errors but rather returned an error code. Over time that has gradually changed, the parser in particular has more and more ways of raising exceptions. Also, the lexer never really handled all errors without raising, eg there were some memory errors which could raise an exception (and in these rare cases one would get a fatal nlr-not-handled fault). This patch accepts the fact that the lexer can raise exceptions in some cases and allows it to raise exceptions to handle all its errors, which are for the most part just out-of-memory errors during construction of the lexer. This makes the lexer a bit simpler, and also the persistent code stuff is simplified. What this means for users of the lexer is that calls to it must be wrapped in a nlr handler. But all uses of the lexer already have such an nlr handler for the parser (and compiler) so that doesn't put any extra burden on the callers. | ||
* | py/persistentcode: Bump .mpy version due to change in bytecode. | Damien George | 2017-02-17 |
| | |||
* | py/persistentcode: Replace mp_uint_t with size_t where appropriate. | Damien George | 2017-02-16 |
| | |||
* | py: Factor out persistent-code reader into separate files. | Damien George | 2016-11-16 |
| | | | | | | | Implementations of persistent-code reader are provided for POSIX systems and systems using FatFS. Macros to use these are MICROPY_READER_POSIX and MICROPY_READER_FATFS respectively. If an alternative implementation is needed then a port can define the function mp_reader_new_file. | ||
* | py: Factor persistent code load/save funcs into persistentcode.[ch]. | Damien George | 2016-11-16 |