1. 05 Dec, 2014 1 commit
  2. 29 Nov, 2014 1 commit
  3. 27 Nov, 2014 1 commit
  4. 16 Nov, 2014 2 commits
  5. 25 Oct, 2014 3 commits
    • Damien George's avatar
      py: Add mp_pending_exception global variable, for VM soft interrupt. · 124df6f8
      Damien George authored
      This allows to implement KeyboardInterrupt on unix, and a much safer
      ctrl-C in stmhal port.  First ctrl-C is a soft one, with hope that VM
      will notice it; second ctrl-C is a hard one that kills anything (for
      both unix and stmhal).
      
      One needs to check for a pending exception in the VM only for jump
      opcodes.  Others can't produce an infinite loop (infinite recursion is
      caught by stack check).
      124df6f8
    • Paul Sokolovsky's avatar
      e5a3759f
    • Damien George's avatar
      py: Store bytecode arg names in bytecode (were in own array). · 1084b0f9
      Damien George authored
      This saves a lot of RAM for 2 reasons:
      
      1. For functions that don't have default values, var args or var kw
      args (which is a large number of functions in the general case), the
      mp_obj_fun_bc_t type now fits in 1 GC block (previously needed 2 because
      of the extra pointer to point to the arg_names array).  So this saves 16
      bytes per function (32 bytes on 64-bit machines).
      
      2. Combining separate memory regions generally saves RAM because the
      unused bytes at the end of the GC block are saved for 1 of the blocks
      (since that block doesn't exist on its own anymore).  So generally this
      saves 8 bytes per function.
      
      Tested by importing lots of modules:
      
      - 64-bit Linux gave about an 8% RAM saving for 86k of used RAM.
      - pyboard gave about a 6% RAM saving for 31k of used RAM.
      1084b0f9
  6. 23 Oct, 2014 1 commit
  7. 22 Oct, 2014 1 commit
  8. 21 Oct, 2014 1 commit
  9. 03 Oct, 2014 1 commit
  10. 30 Sep, 2014 1 commit
  11. 25 Sep, 2014 1 commit
  12. 17 Sep, 2014 1 commit
  13. 13 Sep, 2014 1 commit
  14. 10 Sep, 2014 1 commit
  15. 07 Sep, 2014 3 commits
  16. 30 Aug, 2014 4 commits
  17. 29 Aug, 2014 2 commits
  18. 27 Aug, 2014 2 commits
  19. 24 Aug, 2014 1 commit
  20. 15 Aug, 2014 1 commit
  21. 12 Aug, 2014 1 commit
    • Damien George's avatar
      py: Implement builtin reversed() function. · 4c03b3a8
      Damien George authored
      reversed function now implemented, and works for tuple, list, str, bytes
      and user objects with __len__ and __getitem__.
      
      Renamed mp_builtin_len to mp_obj_len to make it publically available (eg
      for reversed).
      4c03b3a8
  22. 10 Aug, 2014 1 commit
  23. 31 Jul, 2014 2 commits
  24. 27 Jul, 2014 1 commit
  25. 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:
      ```python
      >>> 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
      ```
      5b7fd20f
  26. 03 Jul, 2014 1 commit
  27. 13 Jun, 2014 1 commit
    • Paul Sokolovsky's avatar
      objstr: Be 8-bit clean even for repr(). · 2ec38a17
      Paul Sokolovsky authored
      This will allow roughly the same behavior as Python3 for non-ASCII strings,
      for example, print("<phrase in non-Latin script>".split()) will print list
      of words, not weird hex dump (like Python2 behaves). (Of course, that it
      will print list of words, if there're "words" in that phrase at all, separated
      by ASCII-compatible whitespace; that surely won't apply to every human
      language in existence).
      2ec38a17
  28. 11 Jun, 2014 1 commit
  29. 07 Jun, 2014 1 commit