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. 14 Jul, 2015 1 commit
    • Damien George's avatar
      py: Improve allocation policy of qstr data. · ade9a052
      Damien George authored
      Previous to this patch all interned strings lived in their own malloc'd
      chunk.  On average this wastes N/2 bytes per interned string, where N is
      the number-of-bytes for a quanta of the memory allocator (16 bytes on 32
      bit archs).
      
      With this patch interned strings are concatenated into the same malloc'd
      chunk when possible.  Such chunks are enlarged inplace when possible,
      and shrunk to fit when a new chunk is needed.
      
      RAM savings with this patch are highly varied, but should always show an
      improvement (unless only 3 or 4 strings are interned).  New version
      typically uses about 70% of previous memory for the qstr data, and can
      lead to savings of around 10% of total memory footprint of a running
      script.
      
      Costs about 120 bytes code size on Thumb2 archs (depends on how many
      calls to gc_realloc are made).
      ade9a052
  3. 16 Apr, 2015 1 commit
  4. 10 Feb, 2015 1 commit
  5. 16 Jan, 2015 1 commit
  6. 13 Jan, 2015 1 commit
    • Damien George's avatar
      py: Never intern data of large string/bytes object; add relevant tests. · 4c81ba80
      Damien George authored
      Previously to this patch all constant string/bytes objects were
      interned by the compiler, and this lead to crashes when the qstr was too
      long (noticeable now that qstr length storage defaults to 1 byte).
      
      With this patch, long string/bytes objects are never interned, and are
      referenced directly as constant objects within generated code using
      load_const_obj.
      4c81ba80
  7. 11 Jan, 2015 3 commits
  8. 07 Jan, 2015 1 commit
  9. 01 Jan, 2015 1 commit
  10. 31 Oct, 2014 1 commit
  11. 24 Oct, 2014 1 commit
  12. 03 Oct, 2014 1 commit
  13. 03 Jul, 2014 1 commit
  14. 21 Jun, 2014 1 commit
  15. 11 Jun, 2014 1 commit
  16. 25 May, 2014 1 commit
  17. 03 May, 2014 1 commit
    • Damien George's avatar
      Add license header to (almost) all files. · 04b9147e
      Damien George authored
      Blanket wide to all .c and .h files.  Some files originating from ST are
      difficult to deal with (license wise) so it was left out of those.
      
      Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
      04b9147e
  18. 17 Apr, 2014 1 commit
  19. 16 Apr, 2014 1 commit
    • Andrew Scheller's avatar
      build directory can now be renamed · 70a7d7a9
      Andrew Scheller authored
      The autogenerated header files have been moved about, and an extra
      include dir has been added, which means you can give a custom
      BUILD=newbuilddir option to make, and everything "just works"
      
      Also tidied up the way the different Makefiles build their include-
      directory flags
      70a7d7a9
  20. 13 Apr, 2014 1 commit
  21. 25 Mar, 2014 1 commit
  22. 26 Feb, 2014 1 commit
  23. 16 Feb, 2014 1 commit
  24. 12 Feb, 2014 1 commit
  25. 29 Jan, 2014 1 commit
  26. 24 Jan, 2014 1 commit
  27. 23 Jan, 2014 1 commit
  28. 22 Jan, 2014 1 commit
  29. 21 Jan, 2014 1 commit
  30. 05 Jan, 2014 1 commit
  31. 04 Jan, 2014 1 commit
    • Damien George's avatar
      Split qstr into pools, and put initial pool in ROM. · eb7bfcb2
      Damien George authored
      Qstr's are now split into a linked-list of qstr pools.  This has 2
      benefits: the first pool can be in ROM (huge benefit, since we no longer
      use RAM for the core qstrs), and subsequent pools use m_new for the next
      pool instead of m_renew (thus avoiding a huge single table for all the
      qstrs).
      
      Still would be better to use a hash table, but this scheme takes us part
      of the way (eventually convert the pools to hash tables).
      
      Also fixed bug with import.
      
      Also improved the way the module code is referenced (not magic number 1
      anymore).
      eb7bfcb2
  32. 29 Dec, 2013 1 commit
  33. 23 Oct, 2013 1 commit
  34. 04 Oct, 2013 1 commit