1. 12 Aug, 2014 6 commits
  2. 11 Aug, 2014 3 commits
  3. 10 Aug, 2014 6 commits
  4. 08 Aug, 2014 1 commit
    • Damien George's avatar
      py: Fix bug where GC finaliser table was not completely zeroed out. · a1d3ee37
      Damien George authored
      This was a nasty bug to track down.  It only had consequences when the
      heap size was just the right size to expose the rounding error in the
      calculation of the finaliser table size.  And, a script had to allocate
      a small (1 or 2 cell) object at the very end of the heap.  And, this
      object must not have a finaliser.  And, the initial state of the heap
      must have been all bits set to 1.  All these conspire on the pyboard,
      but only if your run the script fresh (so unused memory is all 1's),
      and if your script allocates a lot of small objects (eg 2-char strings
      that are not interned).
  5. 07 Aug, 2014 1 commit
  6. 04 Aug, 2014 1 commit
  7. 31 Jul, 2014 4 commits
    • Damien George's avatar
      py: Improve encoding scheme for line-number to bytecode map. · 4747becc
      Damien George authored
      Reduces by about a factor of 10 on average the amount of RAM needed to
      store the line-number to bytecode map in the bytecode prelude.
      Using CPython3.4's stdlib for statistics: previously, an average of
      13 bytes were used per (bytecode offset, line-number offset) pair, and
      now with this improvement, that's down to 1.3 bytes on average.
      Large RAM usage before was due to some very large steps in line numbers,
      both from the start of the first line in a function way down in the
      file, and also functions that have big comments and/or big strings in
      them (both cases were significant).
      Although the savings are large on average for the CPython stdlib, it
      won't have such a big effect for small scripts used in embedded
      Addresses issue #648.
    • Damien George's avatar
      py: Improve handling of long-int overflow. · c9aa58e6
      Damien George authored
      This removes mpz_as_int, since that was a terrible function (it
      implemented saturating conversion).
      Use mpz_as_int_checked and mpz_as_uint_checked.  These now work
      correctly (they previously had wrong overflow checking, eg
      print(chr(10000000000000)) on 32-bit machine would incorrectly convert
      this large number to a small int).
    • Damien George's avatar
      py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself. · bb4c6f35
      Damien George authored
      Addresses issue #724.
    • Damien George's avatar
      py: Add mp_obj_str_builder_end_with_len. · 5f27a7e8
      Damien George authored
      This allows to create str's with a smaller length than initially asked
  8. 30 Jul, 2014 1 commit
  9. 28 Jul, 2014 2 commits
  10. 27 Jul, 2014 1 commit
  11. 25 Jul, 2014 1 commit
    • Dave Hylands's avatar
      Add support for storing args during an exception raised by an irq. · 5b7fd20f
      Dave Hylands authored
      The user code should call micropython.alloc_emergency_exception_buf(size)
      where size is the size of the buffer used to print the argument
      passed to the exception.
      With the test code from #732, and a call to
      micropython.alloc_emergenncy_exception_buf(100) the following error is
      now printed:
      >>> import heartbeat_irq
      Uncaught exception in Timer(4) interrupt handler
      Traceback (most recent call last):
        File "0://heartbeat_irq.py", line 14, in heartbeat_cb
      NameError: name 'led' is not defined
  12. 24 Jul, 2014 1 commit
  13. 22 Jul, 2014 3 commits
  14. 19 Jul, 2014 2 commits
  15. 17 Jul, 2014 3 commits
  16. 13 Jul, 2014 1 commit
  17. 12 Jul, 2014 2 commits
  18. 10 Jul, 2014 1 commit