- 15 Feb, 2016 1 commit
-
-
Damien George authored
-
- 09 Feb, 2016 1 commit
-
-
Damien George authored
-
- 02 Feb, 2016 1 commit
-
-
Damien George authored
Before this patch, the native types for uint and ptr/ptr8/ptr16/ptr32 all overlapped and it was possible to make a mistake in casting. Now, these types are all separate and any coding mistakes will be raised as runtime errors.
-
- 10 Dec, 2015 1 commit
-
-
Damien George authored
Fixes #1684 and makes "not" match Python semantics. The code is also simplified (the separate MP_BC_NOT opcode is removed) and the patch saves 68 bytes for bare-arm/ and 52 bytes for minimal/. Previously "not x" was implemented as !mp_unary_op(x, MP_UNARY_OP_BOOL), so any given object only needs to implement MP_UNARY_OP_BOOL (and the VM had a special opcode to do the ! bit). With this patch "not x" is implemented as mp_unary_op(x, MP_UNARY_OP_NOT), but this operation is caught at the start of mp_unary_op and dispatched as !mp_obj_is_true(x). mp_obj_is_true has special logic to test for truthness, and is the correct way to handle the not operation.
-
- 29 Nov, 2015 1 commit
-
-
Damien George authored
-
- 13 Nov, 2015 4 commits
-
-
Damien George authored
Main changes when MICROPY_PERSISTENT_CODE is enabled are: - qstrs are encoded as 2-byte fixed width in the bytecode - all pointers are removed from bytecode and put in const_table (this includes const objects and raw code pointers) Ultimately this option will enable persistence for not just bytecode but also native code.
-
Damien George authored
Contains just argument names at the moment but makes it easy to add arbitrary constants.
-
Damien George authored
-
Damien George authored
-
- 14 Oct, 2015 1 commit
-
-
Damien George authored
Addresses #1510.
-
- 12 Oct, 2015 1 commit
-
-
Damien George authored
-
- 08 Oct, 2015 1 commit
-
-
Damien George authored
-
- 23 Sep, 2015 1 commit
-
-
Damien George authored
Saves a few bytes of code space and eliminates need for rot_two bytecode (hence saving RAM and execution time, by a tiny bit).
-
- 12 Aug, 2015 1 commit
-
-
Damien George authored
r7 may be needed to set up code state, so it must be loaded before the set-up function is called.
-
- 27 Jul, 2015 1 commit
-
-
Damien George authored
ViperTypeError now includes filename and function name where the error occurred. The line number is the line number of the start of the function definition, which is the best that can be done without a lot more work. Partially addresses issue #1381.
-
- 23 Jul, 2015 1 commit
-
-
Damien George authored
Otherwise it can be very hard to track down bugs.
-
- 25 Jun, 2015 2 commits
-
-
Damien George authored
Previous to this patch each time a bytes object was referenced a new instance (with the same data) was created. With this patch a single bytes object is created in the compiler and is loaded directly at execute time as a true constant (similar to loading bignum and float objects). This saves on allocating RAM and means that bytes objects can now be used when the memory manager is locked (eg in interrupts). The MP_BC_LOAD_CONST_BYTES bytecode was removed as part of this. Generated bytecode is slightly larger due to storing a pointer to the bytes object instead of the qstr identifier. Code size is reduced by about 60 bytes on Thumb2 architectures.
-
Damien George authored
-
- 04 Jun, 2015 2 commits
-
-
Damien George authored
-
Damien George authored
This allows to do "ar[i]" and "ar[i] = val" in viper when ar is a Python object and i and/or val are native viper types (eg ints). Patch also includes tests for this feature.
-
- 08 May, 2015 1 commit
-
-
Paul Sokolovsky authored
The code was apparently broken after 9988618e "py: Implement full func arg passing for native emitter.". This attempts to propagate those changes to ARM emitter.
-
- 06 May, 2015 1 commit
-
-
Damien George authored
Addresses issue #1226.
-
- 22 Apr, 2015 1 commit
-
-
Damien George authored
-
- 20 Apr, 2015 1 commit
-
-
Damien George authored
This fixes a long standing problem that viper code generation gave terrible error messages, and actually no errors on pyboard where assertions are disabled. Now all compile-time errors are raised as proper Python exceptions, and are of type ViperTypeError. Addresses issue #940.
-
- 16 Apr, 2015 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 07 Apr, 2015 1 commit
-
-
Damien George authored
This patch gets full function argument passing working with native emitter. Includes named args, keyword args, default args, var args and var keyword args. Fully Python compliant. It reuses the bytecode mp_setup_code_state function to do all the hard work. This function is slightly adjusted to accommodate native calls, and the native emitter is forced a bit to emit similar prelude and code-info as bytecode.
-
- 06 Apr, 2015 1 commit
-
-
Damien George authored
-
- 03 Apr, 2015 4 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Currently supports only x64 and Thumb2 archs.
-
Damien George authored
This implementation is smaller (in code size) than #1024.
-
- 31 Mar, 2015 1 commit
-
-
Damien George authored
-
- 26 Mar, 2015 2 commits
-
-
Damien George authored
This is a temporary fix.
-
Damien George authored
Saves around 230 bytes on Thumb2 and 750 bytes on x86.
-
- 28 Feb, 2015 1 commit
-
-
Damien George authored
Saves 116 bytes for stmhal and 56 bytes for cc3200 port.
-
- 09 Feb, 2015 1 commit
-
-
Damien George authored
-
- 08 Feb, 2015 1 commit
-
-
Damien George authored
Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
-
- 29 Jan, 2015 1 commit
-
-
Damien George authored
-
- 24 Jan, 2015 1 commit
-
-
Damien George authored
This makes the code (more) compatible with the C99 standard.
-