1. 07 Jan, 2015 3 commits
    • 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.
  2. 01 Jan, 2015 2 commits
  3. 29 Dec, 2014 1 commit
  4. 27 Dec, 2014 3 commits
  5. 24 Dec, 2014 1 commit
  6. 20 Dec, 2014 3 commits
  7. 19 Dec, 2014 1 commit
  8. 18 Dec, 2014 1 commit
    • Damien George's avatar
      lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal. · f04329e9
      Damien George authored
      acoshf, asinhf, atanhf were added from musl.  mathsincos.c was
      split up into its original, separate files (from newlibe-nano-2).
      tan was added.
      All of the important missing float functions are now implemented,
      and pyboard now passes tests/float/math_fun.py (finally!).
  9. 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.
  10. 08 Dec, 2014 3 commits
  11. 07 Dec, 2014 1 commit
  12. 06 Dec, 2014 1 commit
  13. 05 Dec, 2014 2 commits
    • Damien George's avatar
      py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack. · be6d8be9
      Damien George authored
      mp_obj_int_get_truncated is used as a "fast path" int accessor that
      doesn't check for overflow and returns the int truncated to the machine
      word size, ie mp_int_t.
      Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word
      sized values.
      Addresses issues #779 and #998.
    • Damien George's avatar
      py: Optimise lexer by exposing lexer type. · a4c52c5a
      Damien George authored
      mp_lexer_t type is exposed, mp_token_t type is removed, and simple lexer
      functions (like checking current token kind) are now inlined.
      This saves 784 bytes ROM on 32-bit unix, 348 bytes on stmhal, and 460
      bytes on bare-arm.  It also saves a tiny bit of RAM since mp_lexer_t
      is a bit smaller.  Also will run a bit more efficiently.
  14. 04 Dec, 2014 1 commit
    • Damien George's avatar
      stmhal: Overhaul network drivers; has generic network protocol in C. · 29a1ec1b
      Damien George authored
      This patch overhauls the network driver interface.  A generic NIC must
      provide a set of C-level functions to implement low-level socket control
      (eg socket, bind, connect, send, recv).  Doing this, the network and
      usocket modules can then use such a NIC to implement proper socket
      control at the Python level.
      This patch also updates the CC3K and WIZNET5K drivers to conform to the
      new interface, and fixes some bugs in the drivers.  They now work
      reasonably well.
  15. 02 Dec, 2014 1 commit
  16. 30 Nov, 2014 1 commit
  17. 29 Nov, 2014 2 commits
  18. 27 Nov, 2014 3 commits
  19. 26 Nov, 2014 1 commit
  20. 25 Nov, 2014 1 commit
  21. 16 Nov, 2014 3 commits
  22. 15 Nov, 2014 2 commits
  23. 05 Nov, 2014 2 commits