| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
| |
This patch allows any given thread to do a proper garbage collection and
scan all the pointers of all active threads.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.
This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
|
|
|
|
|
|
|
|
| |
Now, if we build for an architecture which doesn't have dedicated support
for getting registers for GC scanning, fallback to setjmp-based method
automatically. It's still possible to force setjmp-based implementation
on archs with dedicated support (e.g. for testing, or for peculiar calling
conventions/optimizations).
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
gc.enable/disable are now the same as CPython: they just control whether
automatic garbage collection is enabled or not. If disabled, you can
still allocate heap memory, and initiate a manual collection.
|
|
|
|
| |
See discussion in issue #50.
|
| |
|
|
|
|
| |
This fixes count_lead_ones in misc.h not compiling due to unknown types
|
| |
|
|
|
|
|
| |
The pointers to the bss section are acquired in init.c()
by inspecting the PE header. Works for msvc and mingw.
|
|
|
|
| |
These changes were tested with QEMU, and by few people of real hardware.
|
|
|
|
|
|
|
|
| |
As I suspected for a long time, for x86, register helper doesn't really make
any difference - there's simply not enough register to keep anything in
them for any prolonged time. Anything gets pushed on stack anyway. So, on
x86, uPy passed all tests even with empty reg helper. So, this setjmp
implementation goes as "untested".
|
| |
|
|
|
|
|
|
| |
by gcc 4.9.0 is unchanged (same statements, different order).
Both are inefficient, saving unmodified registers on the stack.
|
|
|
|
|
|
|
| |
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/.
|
| |
|
| |
|
|
|
|
| |
Remove unnecessary includes. Add includes that improve portability.
|
| |
|
| |
|
| |
|
|
|