1. 15 Nov, 2016 4 commits
  2. 14 Nov, 2016 2 commits
  3. 13 Nov, 2016 2 commits
    • Paul Sokolovsky's avatar
      py/objexcept: Allow clearing traceback with 'exc.__traceback__ = None'. · c3d96d38
      Paul Sokolovsky authored
      We allow 'exc.__traceback__ = None' assignment as a low-level optimization
      of pre-allocating exception instance and raising it repeatedly - this
      avoids memory allocation during raise. However, uPy will keep adding
      traceback entries to such exception instance, so before throwing it,
      traceback should be cleared like above.
      
      'exc.__traceback__ = None' syntax is CPython compatible. However, unlike
      it, reading that attribute or setting it to any other value is not
      supported (and not intended to be supported, again, the only reason for
      adding this feature is to allow zero-memalloc exception raising).
      c3d96d38
    • Paul Sokolovsky's avatar
      all: Remove readall() method, which is equivalent to read() w/o args. · 59a1201d
      Paul Sokolovsky authored
      Its addition was due to an early exploration on how to add CPython-like
      stream interface. It's clear that it's not needed and just takes up
      bytes in all ports.
      59a1201d
  4. 10 Nov, 2016 1 commit
  5. 08 Nov, 2016 2 commits
  6. 03 Nov, 2016 1 commit
  7. 02 Nov, 2016 2 commits
    • Colin Hogben's avatar
      py: Change config default so m_malloc0 uses memset if GC not enabled. · 828df54b
      Colin Hogben authored
      With MICROPY_ENABLE_GC set to false the alternate memory manager may not
      clear all memory that is allocated, so it must be cleared in m_malloc0.
      828df54b
    • Colin Hogben's avatar
      py: Fix wrong assumption that m_renew will not move if shrinking · f9b6b37c
      Colin Hogben authored
      In both parse.c and qstr.c, an internal chunking allocator tidies up
      by calling m_renew to shrink an allocated chunk to the size used, and
      assumes that the chunk will not move.  However, when MICROPY_ENABLE_GC
      is false, m_renew calls the system realloc, which does not guarantee
      this behaviour.  Environments where realloc may return a different
      pointer include:
      
      (1) mbed-os with MBED_HEAP_STATS_ENABLED (which adds a wrapper around
      malloc & friends; this is where I was hit by the bug);
      
      (2) valgrind on linux (how I diagnosed it).
      
      The fix is to call m_renew_maybe with allow_move=false.
      f9b6b37c
  8. 01 Nov, 2016 1 commit
  9. 31 Oct, 2016 2 commits
  10. 30 Oct, 2016 2 commits
  11. 27 Oct, 2016 1 commit
  12. 25 Oct, 2016 1 commit
  13. 24 Oct, 2016 2 commits
  14. 21 Oct, 2016 4 commits
  15. 20 Oct, 2016 1 commit
  16. 17 Oct, 2016 3 commits
  17. 14 Oct, 2016 2 commits
  18. 13 Oct, 2016 1 commit
  19. 12 Oct, 2016 2 commits
  20. 11 Oct, 2016 4 commits