1. 20 Jul, 2015 1 commit
    • Damien George's avatar
      py: Make qstr hash size configurable, defaults to 2 bytes. · c3bd9415
      Damien George authored
      This patch makes configurable, via MICROPY_QSTR_BYTES_IN_HASH, the
      number of bytes used for a qstr hash.  It was originally fixed at 2
      bytes, and now defaults to 2 bytes.  Setting it to 1 byte will save
      ROM and RAM at a small expense of hash collisions.
      c3bd9415
  2. 04 Jul, 2015 1 commit
  3. 02 Jul, 2015 1 commit
  4. 24 May, 2015 1 commit
  5. 21 May, 2015 1 commit
  6. 20 May, 2015 1 commit
  7. 04 May, 2015 4 commits
  8. 25 Apr, 2015 1 commit
  9. 21 Apr, 2015 1 commit
  10. 20 Apr, 2015 1 commit
  11. 04 Apr, 2015 1 commit
  12. 03 Apr, 2015 1 commit
    • Paul Sokolovsky's avatar
      objstr: Add .splitlines() method. · ac2f7a7f
      Paul Sokolovsky authored
      splitlines() occurs ~179 times in CPython3 standard library, so was
      deemed worthy to implement. The method has subtle semantic differences
      from just .split("\n"). It is also defined as working for any end-of-line
      combination, but this is currently not implemented - it works only with
      LF line-endings (which should be OK for text strings on any platforms,
      but not OK for bytes).
      ac2f7a7f
  13. 30 Mar, 2015 1 commit
  14. 26 Mar, 2015 1 commit
  15. 20 Mar, 2015 1 commit
    • Paul Sokolovsky's avatar
      py: Implement core of OrderedDict type. · 0ef01d0a
      Paul Sokolovsky authored
      Given that there's already support for "fixed table" maps, which are
      essentially ordered maps, the implementation of OrderedDict just extends
      "fixed table" maps by adding an "is ordered" flag and add/remove
      operations, and reuses 95% of objdict code, just making methods tolerant
      to both dict and OrderedDict.
      
      Some things are missing so far, like CPython-compatible repr and comparison.
      
      OrderedDict is Disabled by default; enabled on unix and stmhal ports.
      0ef01d0a
  16. 11 Mar, 2015 1 commit
  17. 23 Feb, 2015 1 commit
  18. 22 Feb, 2015 1 commit
  19. 21 Feb, 2015 1 commit
  20. 15 Feb, 2015 1 commit
  21. 14 Feb, 2015 1 commit
  22. 30 Jan, 2015 1 commit
  23. 21 Jan, 2015 1 commit
  24. 11 Jan, 2015 2 commits
    • Damien George's avatar
      py: Add MICROPY_QSTR_BYTES_IN_LEN config option, defaulting to 1. · 95836f84
      Damien George authored
      This new config option sets how many fixed-number-of-bytes to use to
      store the length of each qstr.  Previously this was hard coded to 2,
      but, as per issue #1056, this is considered overkill since no-one
      needs identifiers longer than 255 bytes.
      
      With this patch the number of bytes for the length is configurable, and
      defaults to 1 byte.  The configuration option filters through to the
      makeqstrdata.py script.
      
      Code size savings going from 2 to 1 byte:
      - unix x64 down by 592 bytes
      - stmhal down by 1148 bytes
      - bare-arm down by 284 bytes
      
      Also has RAM savings, and will be slightly more efficient in execution.
      95836f84
    • Damien George's avatar
  25. 09 Jan, 2015 1 commit
  26. 01 Jan, 2015 1 commit
  27. 19 Dec, 2014 1 commit
  28. 08 Dec, 2014 1 commit
    • Paul Sokolovsky's avatar
      modsys: Add sys.print_exception(exc, file=sys.stdout) function. · 46c3ab20
      Paul Sokolovsky authored
      The function is modeled after traceback.print_exception(), but unbloated,
      and put into existing module to save overhead on adding another module.
      Compliant traceback.print_exception() is intended to be implemented in
      micropython-lib in terms of sys.print_exception().
      
      This change required refactoring mp_obj_print_exception() to take pfenv_t
      interface arguments.
      
      Addresses #751.
      46c3ab20
  29. 01 Dec, 2014 1 commit
  30. 29 Nov, 2014 1 commit
  31. 22 Nov, 2014 1 commit
  32. 16 Nov, 2014 1 commit
  33. 15 Nov, 2014 1 commit
  34. 31 Oct, 2014 2 commits
  35. 25 Oct, 2014 1 commit
    • 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