1. 13 Feb, 2015 11 commits
  2. 11 Feb, 2015 1 commit
  3. 10 Feb, 2015 1 commit
  4. 08 Feb, 2015 1 commit
  5. 07 Feb, 2015 1 commit
    • Damien George's avatar
      py: Protect mp_parse and mp_compile with nlr push/pop block. · 0bfc7638
      Damien George authored
      To enable parsing constants more efficiently, mp_parse should be allowed
      to raise an exception, and mp_compile can already raise a MemoryError.
      So these functions need to be protected by an nlr push/pop block.
      This patch adds that feature in all places.  This allows to simplify how
      mp_parse and mp_compile are called: they now raise an exception if they
      have an error and so explicit checking is not needed anymore.
  6. 06 Feb, 2015 1 commit
  7. 29 Jan, 2015 1 commit
  8. 28 Jan, 2015 2 commits
  9. 24 Jan, 2015 2 commits
    • Damien George's avatar
      stmhal: Disable MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. · ad33e246
      Damien George authored
      It uses RAM and on pyboard we are generally tight on RAM, so disable
      this optimisation for general builds.  If users need the speed then
      they can build their own version.  Maybe in the future we can have
      different versions of pyboard firmware built with different tradeoffs.
    • Damien George's avatar
      stmhal: Bug fix for usocket's accept and setsockopt methods. · 23342c09
      Damien George authored
      accept might raise an exception, in which case the new socket is not
      fully created.  It has a finaliser so will run close() method when GC'd.
      Before this patch close would try to close an invalid socket.  Now
      setsockopt took address of stack value which became out of scope.  Now
  10. 22 Jan, 2015 3 commits
  11. 21 Jan, 2015 2 commits
  12. 20 Jan, 2015 1 commit
  13. 15 Jan, 2015 1 commit
    • Paul Sokolovsky's avatar
      pyexec: Add event-driven variant pyexec_friendly_repl(). · 87bc8e2b
      Paul Sokolovsky authored
      pyexec_friendly_repl_process_char() and friends, useful for ports which
      integrate into existing cooperative multitasking system.
      Unlike readline() refactor before, this was implemented in less formal,
      trial&error process, minor functionality regressions are still known
      (like soft&hard reset support). So, original loop-based pyexec_friendly_repl()
      is left intact, specific implementation selectable by config setting.
  14. 12 Jan, 2015 3 commits
  15. 10 Jan, 2015 1 commit
  16. 09 Jan, 2015 3 commits
  17. 08 Jan, 2015 1 commit
  18. 07 Jan, 2015 4 commits
    • Damien George's avatar
      stmhal: Add MICROPY_HW_USB_VBUS_DETECT_PIN option, for boards without it · 181bfb6d
      Damien George authored
      Since all currently supported boards use pin A9 for this function, the
      value of the macro MICROPY_HW_USB_VBUS_DETECT_PIN is not actually used,
      just the fact that it is defined.
      Addresses issue #1048.
    • Damien George's avatar
      stmhal: Collect all root pointers together in 1 place. · 3b51b3e9
      Damien George authored
      A GC in stmhal port now only scans true root pointers, not entire BSS.
      This reduces base GC time from 1700ms to 900ms.
    • 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
      Disabled by default.  Enabled for unix and stmhal ports.
    • 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.