1. 19 Dec, 2014 1 commit
  2. 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.
      78d702c3
  3. 27 Nov, 2014 1 commit
  4. 06 Nov, 2014 1 commit
  5. 31 Oct, 2014 1 commit
  6. 22 Oct, 2014 1 commit
  7. 03 Oct, 2014 1 commit
  8. 13 Sep, 2014 2 commits
  9. 07 Sep, 2014 1 commit
  10. 30 Aug, 2014 2 commits
  11. 24 Aug, 2014 1 commit
  12. 12 Aug, 2014 2 commits
  13. 31 Jul, 2014 1 commit
    • Damien George's avatar
      py: Improve handling of long-int overflow. · c9aa58e6
      Damien George authored
      This removes mpz_as_int, since that was a terrible function (it
      implemented saturating conversion).
      
      Use mpz_as_int_checked and mpz_as_uint_checked.  These now work
      correctly (they previously had wrong overflow checking, eg
      print(chr(10000000000000)) on 32-bit machine would incorrectly convert
      this large number to a small int).
      c9aa58e6
  14. 28 Jul, 2014 1 commit
    • Paul Sokolovsky's avatar
      py: Make id() return small int for the most common address space mapping. · 645582fe
      Paul Sokolovsky authored
      Many OSes/CPUs have affinity to put "user" data into lower half of address
      space. Take advantage of that and remap such addresses into full small int
      range (including negative part).
      
      If address is from upper half, long int will be used. Previously, small
      int was returned for lower quarter of address space, and upper quarter. For
      2 middle quarters, long int was used, which is clearly worse schedule than
      the above.
      645582fe
  15. 19 Jul, 2014 1 commit
  16. 03 Jul, 2014 1 commit
  17. 28 Jun, 2014 2 commits
  18. 26 Jun, 2014 2 commits
  19. 20 Jun, 2014 1 commit
  20. 19 Jun, 2014 1 commit
  21. 07 Jun, 2014 1 commit
  22. 05 Jun, 2014 1 commit
  23. 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
  24. 25 May, 2014 1 commit
  25. 11 May, 2014 1 commit
  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. 01 May, 2014 1 commit
  29. 26 Apr, 2014 1 commit
  30. 17 Apr, 2014 2 commits
  31. 15 Apr, 2014 3 commits
  32. 05 Apr, 2014 1 commit
    • Paul Sokolovsky's avatar
      py: Revert mp_load_attr() to its previous state (not supporting default val). · 36dd19ae
      Paul Sokolovsky authored
      Based on the discussion in #433. mp_load_attr() is critical-path function,
      so any extra check will slowdown any script. As supporting default val
      required only for getattr() builtin, move correspending implementation
      there (still as a separate function due to concerns of maintainability
      of such almost-duplicated code instances).
      36dd19ae