1. 19 Sep, 2016 4 commits
    • Damien George's avatar
    • Damien George's avatar
      py/vstr: Remove vstr.had_error flag and inline basic vstr functions. · 5da0d29d
      Damien George authored
      The vstr.had_error flag was a relic from the very early days which assumed
      that the malloc functions (eg m_new, m_renew) returned NULL if they failed
      to allocate.  But that's no longer the case: these functions will raise an
      exception if they fail.
      Since it was impossible for had_error to be set, this patch introduces no
      change in behaviour.
      An alternative option would be to change the malloc calls to the _maybe
      variants, which return NULL instead of raising, but then a lot of code
      will need to explicitly check if the vstr had an error and raise if it
      The code-size savings for this patch are, in bytes: bare-arm:188,
      minimal:456, unix(NDEBUG,x86-64):368, stmhal:228, esp8266:360.
    • Damien George's avatar
      py: Combine 3 comprehension opcodes (list/dict/set) into 1. · adaf0d86
      Damien George authored
      With the previous patch combining 3 emit functions into 1, it now makes
      sense to also combine the corresponding VM opcodes, which is what this
      patch does.  This eliminates 2 opcodes which simplifies the VM and reduces
      code size, in bytes: bare-arm:44, minimal:64, unix(NDEBUG,x86-64):272,
      stmhal:92, esp8266:200.  Profiling (with a simple script that creates many
      list/dict/set comprehensions) shows no measurable change in performance.
    • Damien George's avatar
      py: Combine 3 comprehension emit functions (list/dict/set) into 1. · a5624bf3
      Damien George authored
      The 3 kinds of comprehensions are similar enough that merging their emit
      functions reduces code size.  Decreases in code size in bytes are:
      bare-arm:24, minimal:96, unix(NDEBUG,x86-64):328, stmhal:80, esp8266:76.
  2. 18 Sep, 2016 5 commits
  3. 17 Sep, 2016 4 commits
  4. 16 Sep, 2016 4 commits
  5. 15 Sep, 2016 1 commit
  6. 14 Sep, 2016 1 commit
  7. 12 Sep, 2016 1 commit
  8. 10 Sep, 2016 2 commits
  9. 09 Sep, 2016 8 commits
  10. 08 Sep, 2016 2 commits
  11. 07 Sep, 2016 1 commit
  12. 06 Sep, 2016 6 commits
  13. 05 Sep, 2016 1 commit