1. 15 Feb, 2016 1 commit
  2. 09 Feb, 2016 1 commit
  3. 02 Feb, 2016 1 commit
  4. 10 Dec, 2015 1 commit
    • Damien George's avatar
      py: Make UNARY_OP_NOT a first-class op, to agree with Py not semantics. · bdbe8c9a
      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.
      bdbe8c9a
  5. 29 Nov, 2015 1 commit
  6. 13 Nov, 2015 4 commits
  7. 14 Oct, 2015 1 commit
  8. 12 Oct, 2015 1 commit
  9. 08 Oct, 2015 1 commit
  10. 23 Sep, 2015 1 commit
  11. 12 Aug, 2015 1 commit
  12. 27 Jul, 2015 1 commit
  13. 23 Jul, 2015 1 commit
  14. 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
  15. 04 Jun, 2015 2 commits
  16. 08 May, 2015 1 commit
  17. 06 May, 2015 1 commit
  18. 22 Apr, 2015 1 commit
  19. 20 Apr, 2015 1 commit
  20. 16 Apr, 2015 2 commits
  21. 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
  22. 06 Apr, 2015 1 commit
  23. 03 Apr, 2015 4 commits
  24. 31 Mar, 2015 1 commit
  25. 26 Mar, 2015 2 commits
  26. 28 Feb, 2015 1 commit
  27. 09 Feb, 2015 1 commit
  28. 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
  29. 29 Jan, 2015 1 commit
  30. 24 Jan, 2015 1 commit