- 25 Jan, 2015 1 commit
-
-
Damien George authored
Defining NDEBUG (to any value, even 0) disables debugging. Otherwise, if it's not defined, debugging is enabled.
-
- 21 Jan, 2015 2 commits
-
-
Damien George authored
With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
-
Damien George authored
This patch allows to reuse vstr memory when creating str/bytes object. This improves memory usage. Also saves code ROM: 128 bytes on stmhal, 92 bytes on bare-arm, and 88 bytes on unix x64.
-
- 16 Jan, 2015 1 commit
-
-
Damien George authored
See issue #699.
-
- 11 Jan, 2015 1 commit
-
-
Damien George authored
Previous patch c38dc3cc allowed any object to be compared with any other, using pointer comparison for a fallback. As such, existing code which checked for this case is no longer needed.
-
- 29 Dec, 2014 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This fixes conversion when float type has more mantissa bits than small int, and float value has small exponent. This is for example the case of 32-bit platform using doubles, and converting value of time.time(). Conversion of floats with larg exponnet is still not handled correctly.
-
Damien George authored
-
- 10 Dec, 2014 1 commit
-
-
Damien George 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.
-
- 08 Dec, 2014 1 commit
-
-
Paul Sokolovsky authored
The function is modeled after traceback.print_exception(), but unbloated, and put into existing module to save overhead on adding another module. Compliant traceback.print_exception() is intended to be implemented in micropython-lib in terms of sys.print_exception(). This change required refactoring mp_obj_print_exception() to take pfenv_t interface arguments. Addresses #751.
-
- 05 Dec, 2014 1 commit
-
-
Damien George authored
mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
-
- 29 Nov, 2014 1 commit
-
-
Damien George authored
This is just a clean-up of the code. Generated code is exactly the same.
-
- 27 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
Useful when need to call kw-receiving functions without any keywords from C, etc.
-
- 16 Nov, 2014 2 commits
-
-
Paul Sokolovsky authored
Also, implement for unix port.
-
Paul Sokolovsky authored
This is more efficient, as allows to use register calling convention. If needed, a structure pointer can be passed as argument to pass more data.
-
- 25 Oct, 2014 3 commits
-
-
Damien George authored
This allows to implement KeyboardInterrupt on unix, and a much safer ctrl-C in stmhal port. First ctrl-C is a soft one, with hope that VM will notice it; second ctrl-C is a hard one that kills anything (for both unix and stmhal). One needs to check for a pending exception in the VM only for jump opcodes. Others can't produce an infinite loop (infinite recursion is caught by stack check).
-
Paul Sokolovsky authored
-
Damien George authored
This saves a lot of RAM for 2 reasons: 1. For functions that don't have default values, var args or var kw args (which is a large number of functions in the general case), the mp_obj_fun_bc_t type now fits in 1 GC block (previously needed 2 because of the extra pointer to point to the arg_names array). So this saves 16 bytes per function (32 bytes on 64-bit machines). 2. Combining separate memory regions generally saves RAM because the unused bytes at the end of the GC block are saved for 1 of the blocks (since that block doesn't exist on its own anymore). So generally this saves 8 bytes per function. Tested by importing lots of modules: - 64-bit Linux gave about an 8% RAM saving for 86k of used RAM. - pyboard gave about a 6% RAM saving for 31k of used RAM.
-
- 23 Oct, 2014 1 commit
-
-
Damien George authored
-
- 22 Oct, 2014 1 commit
-
-
Damien George authored
It's purpose is for internal errors that are not catastrophic (ie not as bad as RuntimeError). Since we don't use it, we don't need it.
-
- 21 Oct, 2014 1 commit
-
-
Damien George authored
-
- 03 Oct, 2014 1 commit
-
-
Damien George authored
Addressing issue #50.
-
- 30 Sep, 2014 1 commit
-
-
Damien George authored
In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background.
-
- 25 Sep, 2014 1 commit
-
-
Damien George authored
Addresses issue #864.
-
- 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.
-
- 13 Sep, 2014 1 commit
-
-
Damien George authored
Tested and working on unix and pyboard.
-
- 10 Sep, 2014 1 commit
-
-
Damien George authored
Addresses issue #848.
-
- 07 Sep, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- 30 Aug, 2014 4 commits
-
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
Damien George authored
Part of code cleanup, to resolve issue #50.
-
Damien George authored
Part of code cleanup, towards resolving issue #50.
-
- 29 Aug, 2014 2 commits
-
-
Damien George authored
Addressing issue #50, still some way to go yet.
-
Damien George authored
Found this bug by running unix/ tests with DEBUG=1 enabled when compiling.
-
- 27 Aug, 2014 2 commits
-
-
Damien George authored
Saves ROM (16 on stmhal, 240 on 64-bit unix) and should be quicker since there is 1 less branch.
-
Dave Hylands authored
-
- 24 Aug, 2014 1 commit
-
-
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.
-