1. 27 Sep, 2016 1 commit
  2. 20 Sep, 2016 1 commit
  3. 25 Jun, 2015 1 commit
    • 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
  4. 13 Jun, 2015 1 commit
  5. 12 May, 2015 1 commit
    • Damien George's avatar
      py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function. · c2a4e4ef
      Damien George authored
      Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as
      the operator argument.  Hashing for int, str and bytes still go via
      fast-path in mp_unary_op since they are the most common objects which
      need to be hashed.
      
      This lead to quite a bit of code cleanup, and should be more efficient
      if anything.  It saves 176 bytes code space on Thumb2, and 360 bytes on
      x86.
      
      The only loss is that the error message "unhashable type" is now the
      more generic "unsupported type for __hash__".
      c2a4e4ef
  6. 06 May, 2015 1 commit
  7. 05 May, 2015 1 commit
  8. 24 Apr, 2015 1 commit
  9. 06 Apr, 2015 1 commit
  10. 20 Mar, 2015 1 commit
  11. 14 Mar, 2015 2 commits