| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
| |
Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using
machine instructions.
|
| |
|
| |
|
|
|
|
| |
This should pretty much resolve issue #50.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Viper can now do the following:
def store(p:ptr8, c:int):
p[0] = c
This does a store of c to the memory pointed to by p using a machine
instructions inline in the code.
|
|
|
|
|
| |
This included a bit of restructuring of the assembler backends. Note
that the ARM backend is missing a few functions and won't compile.
|
|
|
|
| |
Allows things like: if 1: ...
|
| |
|
| |
|
| |
|
|
|
|
| |
This gets ARM native emitter working againg and addresses issue #858.
|
|
|
|
|
|
|
|
|
| |
Eventually, viper wants to be able to use raw pointers to strings and
arrays for efficient access. But for now, let's just load strings as a
Python object so they can be used as normal. This will anyway be
compatible with eventual intended viper behaviour.
Addresses issue #857.
|
| |
|
|
|
|
| |
Towards resolving issue #50.
|
|
|
|
| |
Native x86-64 now has 3 locals in registers.
|
| |
|
|
|
|
| |
Fix some bugs with x86 stack and saving registers correctly.
|
| |
|
| |
|
|
|
|
| |
And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
|
|
|
|
| |
Addresses issue #838.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Viper functions can now be annotated with the type of their arguments
and return value. Eg:
@micropython.viper
def f(x:int) -> int:
return x + 1
|
|
|
|
| |
See discussion in issue #50.
|
|
|
|
|
|
|
|
|
|
|
| |
Native emitter can now compile try/except blocks using nlr_push/nlr_pop.
It probably only works for 1 level of exception handling. It doesn't
work on Thumb (only x64).
Native emitter can also handle some additional op codes.
With this patch, 198 tests now pass using "-X emit=native" option to
micropython.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
It defines types used by all other headers.
Fixes #691.
|
|/ |
|
|
|
|
|
|
|
| |
Needed to pop the iterator object when breaking out of a for loop. Need
also to be careful to unwind exception handler before popping iterator.
Addresses issue #635.
|
|
|
|
| |
Addresses issue #627.
|
|
|
|
|
|
|
|
| |
This patch simplifies the glue between native emitter and runtime,
and handles viper code like inline assember: return values are
converted to Python objects.
Fixes issue #531.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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/.
|
|
|
|
| |
It's the same as LOAD_CONST_STR.
|
|
|
|
|
|
|
| |
Implements 'def f(*, a)' and 'def f(*a, b)', but not default
keyword-only args, eg 'def f(*, a=1)'.
Partially addresses issue #524.
|
|
|
|
|
|
|
| |
3 emitter functions are needed only for emitcpy, and so we can #if them
out when compiling with emitcpy support.
Also remove unused SETUP_LOOP bytecode.
|
|
|
|
|
|
|
| |
Closed over variables are now passed on the stack, instead of creating a
tuple and passing that. This way memory for the closed over variables
can be allocated within the closure object itself. See issue #510 for
background.
|
|
|
|
| |
mp_obj_t->subscr now does load/store/delete.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempt to address issue #386. unique_code_id's have been removed and
replaced with a pointer to the "raw code" information. This pointer is
stored in the actual byte code (aligned, so the GC can trace it), so
that raw code (ie byte code, native code and inline assembler) is kept
only for as long as it is needed. In memory it's now like a tree: the
outer module's byte code points directly to its children's raw code. So
when the outer code gets freed, if there are no remaining functions that
need the raw code, then the children's code gets freed as well.
This is pretty much like CPython does it, except that CPython stores
indexes in the byte code rather than machine pointers. These indices
index the per-function constant table in order to find the relevant
code.
|
|
|
|
|
|
|
|
|
| |
Improved the Thumb assembler back end. Added many more Thumb
instructions to the inline assembler. Improved parsing of assembler
instructions and arguments. Assembler functions can now be passed the
address of any object that supports the buffer protocol (to get the
address of the buffer). Added an example of how to sum numbers from
an array in assembler.
|
| |
|