1. 25 Jun, 2015 2 commits
    • Damien George's avatar
      py: Remove mp_load_const_bytes and instead load precreated bytes object. · 59fba2d6
      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.
      59fba2d6
    • Damien George's avatar
  2. 04 Jun, 2015 2 commits
  3. 08 May, 2015 1 commit
  4. 06 May, 2015 1 commit
  5. 22 Apr, 2015 1 commit
  6. 20 Apr, 2015 1 commit
  7. 16 Apr, 2015 2 commits
  8. 07 Apr, 2015 1 commit
    • Damien George's avatar
      py: Implement full func arg passing for native emitter. · 9988618e
      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.
      9988618e
  9. 06 Apr, 2015 1 commit
  10. 03 Apr, 2015 4 commits
  11. 31 Mar, 2015 1 commit
  12. 26 Mar, 2015 2 commits
  13. 28 Feb, 2015 1 commit
  14. 09 Feb, 2015 1 commit
  15. 08 Feb, 2015 1 commit
    • Damien George's avatar
      py: Parse big-int/float/imag constants directly in parser. · 7d414a1b
      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.
      7d414a1b
  16. 29 Jan, 2015 1 commit
  17. 24 Jan, 2015 1 commit
  18. 21 Jan, 2015 1 commit
  19. 20 Jan, 2015 1 commit
  20. 16 Jan, 2015 1 commit
  21. 14 Jan, 2015 1 commit
  22. 13 Jan, 2015 1 commit
  23. 01 Jan, 2015 3 commits
  24. 27 Dec, 2014 2 commits
    • Damien George's avatar
      py: Allow to properly disable builtin slice operation. · 83204f34
      Damien George authored
      This patch makes the MICROPY_PY_BUILTINS_SLICE compile-time option
      fully disable the builtin slice operation (when set to 0).  This
      includes removing the slice sytanx from the grammar.  Now, enabling
      slice costs 4228 bytes on unix x64, and 1816 bytes on stmhal.
      83204f34
    • Damien George's avatar
      py: Allow to properly disable builtin "set" object. · e37dcaaf
      Damien George authored
      This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully
      disable the builtin set object (when set to 0).  This includes removing
      set constructor/comprehension from the grammar, the compiler and the
      emitters.  Now, enabling set costs 8168 bytes on unix x64, and 3576
      bytes on stmhal.
      e37dcaaf
  25. 19 Oct, 2014 1 commit
  26. 12 Oct, 2014 3 commits
  27. 03 Oct, 2014 2 commits