1. 12 May, 2015 1 commit
  2. 04 May, 2015 1 commit
  3. 16 Apr, 2015 1 commit
    • Damien George's avatar
      py: Overhaul and simplify printf/pfenv mechanism. · 7f9d1d6a
      Damien George authored
      Previous to this patch the printing mechanism was a bit of a tangled
      mess.  This patch attempts to consolidate printing into one interface.
      
      All (non-debug) printing now uses the mp_print* family of functions,
      mainly mp_printf.  All these functions take an mp_print_t structure as
      their first argument, and this structure defines the printing backend
      through the "print_strn" function of said structure.
      
      Printing from the uPy core can reach the platform-defined print code via
      two paths: either through mp_sys_stdout_obj (defined pert port) in
      conjunction with mp_stream_write; or through the mp_plat_print structure
      which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
      on the platform.  The former is only used when MICROPY_PY_IO is defined.
      
      With this new scheme printing is generally more efficient (less layers
      to go through, less arguments to pass), and, given an mp_print_t*
      structure, one can call mp_print_str for efficiency instead of
      mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
      Thumb2 archs.
      7f9d1d6a
  4. 11 Apr, 2015 1 commit
  5. 19 Mar, 2015 1 commit
  6. 18 Mar, 2015 2 commits
  7. 17 Mar, 2015 1 commit
  8. 14 Mar, 2015 1 commit
  9. 10 Mar, 2015 1 commit
  10. 04 Mar, 2015 1 commit
  11. 21 Feb, 2015 1 commit
  12. 18 Feb, 2015 1 commit
  13. 08 Feb, 2015 1 commit
    • Damien George's avatar
      py: Parse big-int/float/imag constants directly in parser. · 7d414a1b
      Damien George authored
      Previous to this patch, a big-int, float or imag constant was interned
      (made into a qstr) and then parsed at runtime to create an object each
      time it was needed.  This is wasteful in RAM and not efficient.  Now,
      these constants are parsed straight away in the parser and turned into
      objects.  This allows constants with large numbers of digits (so
      addresses issue #1103) and takes us a step closer to #722.
      7d414a1b
  14. 02 Feb, 2015 1 commit
  15. 28 Jan, 2015 3 commits
  16. 26 Jan, 2015 1 commit
  17. 23 Jan, 2015 1 commit
  18. 21 Jan, 2015 1 commit
    • Damien George's avatar
      py: Remove mp_obj_str_builder and use vstr instead. · 05005f67
      Damien George authored
      With this patch str/bytes construction is streamlined.  Always use a
      vstr to build a str/bytes object.  If the size is known beforehand then
      use vstr_init_len to allocate only required memory.  Otherwise use
      vstr_init and the vstr will grow as needed.  Then use
      mp_obj_new_str_from_vstr to create a str/bytes object using the vstr
      memory.
      
      Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes
      on unix x64.
      05005f67
  19. 20 Jan, 2015 1 commit
  20. 12 Jan, 2015 1 commit
  21. 01 Jan, 2015 1 commit
  22. 10 Dec, 2014 1 commit
  23. 05 Dec, 2014 1 commit
  24. 29 Nov, 2014 2 commits
  25. 22 Nov, 2014 3 commits
  26. 21 Nov, 2014 1 commit
  27. 30 Oct, 2014 3 commits
  28. 22 Oct, 2014 1 commit
  29. 17 Oct, 2014 1 commit
  30. 15 Oct, 2014 1 commit
  31. 13 Oct, 2014 1 commit
  32. 12 Oct, 2014 1 commit