1. 14 Jan, 2015 1 commit
  2. 10 Jan, 2015 1 commit
  3. 09 Jan, 2015 2 commits
  4. 07 Jan, 2015 2 commits
    • Damien George's avatar
      py: Add option to cache map lookup results in bytecode. · 7ee91cf8
      Damien George authored
      This is a simple optimisation inspired by JITing technology: we cache in
      the bytecode (using 1 byte) the offset of the last successful lookup in
      a map. This allows us next time round to check in that location in the
      hash table (mp_map_t) for the desired entry, and if it's there use that
      entry straight away.  Otherwise fallback to a normal map lookup.
      
      Works for LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR and STORE_ATTR opcodes.
      
      On a few tests it gives >90% cache hit and greatly improves speed of
      code.
      
      Disabled by default.  Enabled for unix and stmhal ports.
      7ee91cf8
    • Damien George's avatar
      py: Put all global state together in state structures. · b4b10fd3
      Damien George authored
      This patch consolidates all global variables in py/ core into one place,
      in a global structure.  Root pointers are all located together to make
      GC tracing easier and more efficient.
      b4b10fd3
  5. 01 Jan, 2015 1 commit
  6. 16 Dec, 2014 1 commit
  7. 14 Dec, 2014 1 commit
  8. 09 Dec, 2014 1 commit
    • Damien George's avatar
      py: Allow builtins to be overridden. · 78d702c3
      Damien George authored
      This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS)
      which, when enabled, allows to override all names within the builtins
      module.  A builtins override dict is created the first time the user
      assigns to a name in the builtins model, and then that dict is searched
      first on subsequent lookups.  Note that this implementation doesn't
      allow deleting of names.
      
      This patch also does some refactoring of builtins code, creating the
      modbuiltins.c file.
      
      Addresses issue #959.
      78d702c3
  9. 29 Nov, 2014 1 commit
  10. 22 Nov, 2014 1 commit
  11. 16 Nov, 2014 1 commit
  12. 25 Oct, 2014 1 commit
  13. 23 Oct, 2014 1 commit
  14. 22 Oct, 2014 1 commit
  15. 12 Oct, 2014 1 commit
  16. 11 Oct, 2014 2 commits
  17. 09 Oct, 2014 1 commit
  18. 07 Oct, 2014 1 commit
  19. 29 Sep, 2014 1 commit
  20. 17 Sep, 2014 1 commit
  21. 06 Sep, 2014 1 commit
  22. 03 Sep, 2014 2 commits
  23. 24 Aug, 2014 2 commits
  24. 23 Aug, 2014 1 commit
    • Paul Sokolovsky's avatar
      modtermios: Add "termios" unix module, subset of CPython's. · 4f9ebade
      Paul Sokolovsky authored
      Also provides setraw() function from "tty" module (which in CPython is
      implemented in Python). The idea here is that 95% of "termios" module usage
      is to set raw mode to allow access to normal serial devices. Then, instead
      of exporting gazillion termios symbols, it's better to implement it in C,
      and export minimal number of symbols (mostly baud rates and drain values).
      4f9ebade
  25. 12 Aug, 2014 1 commit
  26. 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
  27. 19 Jul, 2014 1 commit
    • Damien George's avatar
      py: Add stream reading of n unicode chars; unicode support by default. · 1694bc73
      Damien George authored
      With unicode enabled, this patch allows reading a fixed number of
      characters from text-mode streams; eg file.read(5) will read 5 unicode
      chars, which can made of more than 5 bytes.
      
      For an ASCII stream (ie no chars > 127) it only needs to do 1 read.  If
      there are lots of non-ASCII chars in a stream, then it needs multiple
      reads of the underlying object.
      
      Adds a new test for this case.  Enables unicode support by default on
      unix and stmhal ports.
      1694bc73
  28. 13 Jul, 2014 1 commit
  29. 09 Jul, 2014 1 commit
  30. 03 Jul, 2014 2 commits
  31. 28 Jun, 2014 1 commit
  32. 20 Jun, 2014 1 commit
  33. 08 Jun, 2014 1 commit
  34. 07 Jun, 2014 1 commit