- 14 Jan, 2015 1 commit
-
-
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.
-
- 10 Jan, 2015 1 commit
-
-
Damien George authored
Compiler optimises lookup of module.CONST when enabled (an existing feature). Disabled by default; enabled for unix, windows, stmhal. Costs about 100 bytes ROM on stmhal.
-
- 09 Jan, 2015 2 commits
-
-
Damien George authored
This allows to enable mem-info functions in micropython module, even if MICROPY_MEM_STATS is not enabled. In this case, you get mem_info and qstr_info but not mem_{total,current,peak}.
-
Damien George authored
-
- 07 Jan, 2015 2 commits
-
-
Damien George authored
This is a simple optimisation inspired by JITing technology: we cache in the bytecode (using 1 byte) the offset of the last successful lookup in a map. This allows us next time round to check in that location in the hash table (mp_map_t) for the desired entry, and if it's there use that entry straight away. Otherwise fallback to a normal map lookup. Works for LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR and STORE_ATTR opcodes. On a few tests it gives >90% cache hit and greatly improves speed of code. Disabled by default. Enabled for unix and stmhal ports.
-
Damien George authored
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
-
- 01 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 16 Dec, 2014 1 commit
-
-
Paul Sokolovsky authored
Name choosen per latest conventions and for compatibiity with stmhal port.
-
- 14 Dec, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 09 Dec, 2014 1 commit
-
-
Damien George authored
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
-
- 29 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 22 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 16 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
Also, implement for unix port.
-
- 25 Oct, 2014 1 commit
-
-
Damien George authored
This should be pretty compliant with CPython, except perhaps for some corner cases to do with globals/locals context. Addresses issue #879.
-
- 23 Oct, 2014 1 commit
-
-
Damien George authored
-
- 22 Oct, 2014 1 commit
-
-
Damien George authored
-
- 12 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 11 Oct, 2014 2 commits
-
-
Paul Sokolovsky authored
-
-
- 09 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
Per new conventions, we'd like to consistently use "u*" naming conventions for modules which don't offer complete CPython compatibility, while offer subset or similar API.
-
- 07 Oct, 2014 1 commit
-
-
Dave Hylands authored
-
- 29 Sep, 2014 1 commit
-
-
Damien George authored
-
- 17 Sep, 2014 1 commit
-
-
Damien George authored
Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
-
- 06 Sep, 2014 1 commit
-
-
Damien George authored
-
- 03 Sep, 2014 2 commits
-
-
Damien George authored
If not set, MICROPY_EMIT_X64 is set only if on x86-64 machine. If not set, MICROPY_GCREGS_SETJMP is set when on MIPS.
-
Fabian Vogt authored
Fixes issue #840
-
- 24 Aug, 2014 2 commits
-
-
Damien George authored
Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
-
Damien George authored
-
- 23 Aug, 2014 1 commit
-
-
Paul Sokolovsky authored
Also provides setraw() function from "tty" module (which in CPython is implemented in Python). The idea here is that 95% of "termios" module usage is to set raw mode to allow access to normal serial devices. Then, instead of exporting gazillion termios symbols, it's better to implement it in C, and export minimal number of symbols (mostly baud rates and drain values).
-
- 12 Aug, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 25 Jul, 2014 1 commit
-
-
Dave Hylands authored
The user code should call micropython.alloc_emergency_exception_buf(size) where size is the size of the buffer used to print the argument passed to the exception. With the test code from #732, and a call to micropython.alloc_emergenncy_exception_buf(100) the following error is now printed: ```python >>> import heartbeat_irq Uncaught exception in Timer(4) interrupt handler Traceback (most recent call last): File "0://heartbeat_irq.py", line 14, in heartbeat_cb NameError: name 'led' is not defined ```
-
- 19 Jul, 2014 1 commit
-
-
Damien George authored
With unicode enabled, this patch allows reading a fixed number of characters from text-mode streams; eg file.read(5) will read 5 unicode chars, which can made of more than 5 bytes. For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If there are lots of non-ASCII chars in a stream, then it needs multiple reads of the underlying object. Adds a new test for this case. Enables unicode support by default on unix and stmhal ports.
-
- 13 Jul, 2014 1 commit
-
-
Paul Sokolovsky authored
emitnative in particular requires nlr_* to be real functions, so doesn't compile with MICROPY_NLR_SETJMP=1.
-
- 09 Jul, 2014 1 commit
-
-
Paul Sokolovsky authored
But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
-
- 03 Jul, 2014 2 commits
-
-
Paul Sokolovsky authored
Implementing it as a static constant is a bit peculiar and require cooperation from long int implementation.
-
Damien George authored
See discussion in issue #50.
-
- 28 Jun, 2014 1 commit
-
-
Damien George authored
Unicode is disabled by default for now, since FileIO.read(n) is currently not implemented for text-mode files, and this is an often function.
-
- 20 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 08 Jun, 2014 1 commit
-
-
Damien George authored
-
- 07 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
Ports which wants to have it, should define MICROPY_PY_SYS_PLATFORM to a string value they need.
-