1. 11 Oct, 2015 1 commit
  2. 02 Aug, 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_pr...
      7f9d1d6a
  4. 25 Mar, 2015 1 commit
    • Paul Sokolovsky's avatar
      py: Cast mp_obj_t to concrete types explicitly. · 3d598256
      Paul Sokolovsky authored
      mp_obj_t internal representation doesn't have to be a pointer to object,
      it can be anything.
      
      There's also a support for back-conversion in the form of MP_OBJ_UNCAST.
      This is kind of optimization/status quo preserver to minimize patching the
      existing code and avoid doing potentially expensive MP_OBJ_CAST over and
      over. But then one may imagine implementations where MP_OBJ_UNCAST is very
      expensive. But such implementations are unlikely interesting in practice.
      3d598256
  5. 20 Mar, 2015 1 commit
  6. 27 Feb, 2015 2 commits
    • Paul Sokolovsky's avatar
      objarray: Implement array slice assignment. · cefcbb22
      Paul Sokolovsky authored
      This is rarely used feature which takes enough code to implement, so is
      controlled by MICROPY_PY_ARRAY_SLICE_ASSIGN config setting, default off.
      But otherwise it may be useful, as allows to update arbitrary-sized data
      buffers in-place.
      
      Slice is yet to implement, and actually, slice assignment implemented in
      such a way that RHS of assignment should be array of the exact same item
      typecode as LHS. CPython has it more relaxed, where RHS can be any sequence
      of compatible types (e.g. it's possible to assign list of int's to a
      bytearray slice).
      
      Overall, when all "slice write" features are implemented, it may cost ~1KB
      of code.
      cefcbb22
    • Damien George's avatar
      py: Fix adding of traceback so that it appends to existing info. · 4852e09c
      Damien George authored
      This makes exception traceback info self contained (ie doesn't rely on
      list object, which was a bit of a hack), reduces code size, and reduces
      RAM footprint of exception by eliminating the list object.
      
      Addresses part of issue #1126.
      4852e09c
  7. 21 Feb, 2015 1 commit
  8. 15 Feb, 2015 1 commit
  9. 02 Feb, 2015 1 commit
  10. 20 Jan, 2015 1 commit
  11. 16 Jan, 2015 1 commit
  12. 01 Jan, 2015 1 commit
  13. 10 Dec, 2014 1 commit
  14. 03 Oct, 2014 1 commit
  15. 17 Sep, 2014 1 commit
  16. 30 Aug, 2014 1 commit
  17. 29 Aug, 2014 2 commits
  18. 13 Aug, 2014 1 commit
  19. 03 Jul, 2014 1 commit
  20. 01 Jun, 2014 1 commit
    • Damien George's avatar
      Rename bultins config variables to MICROPY_PY_BUILTINS_*. · fb510b3b
      Damien George authored
      This renames:
      MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
      MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
      MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
      MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
      
      See issue #35 for discussion.
      fb510b3b
  21. 25 May, 2014 2 commits
  22. 24 May, 2014 2 commits
  23. 21 May, 2014 1 commit
  24. 11 May, 2014 1 commit
    • Damien George's avatar
      py: Use mp_arg_check_num in more places. · ee7a880d
      Damien George authored
      Updated functions now do proper checking that n_kw==0, and are simpler
      because they don't have to explicitly raise an exception.  Down side is
      that the error messages no longer include the function name, but that's
      acceptable.
      
      Saves order 300 text bytes on x64 and ARM.
      ee7a880d
  25. 10 May, 2014 4 commits
  26. 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
  27. 02 May, 2014 1 commit
  28. 27 Apr, 2014 3 commits
  29. 17 Apr, 2014 2 commits
  30. 13 Apr, 2014 1 commit