1. 07 Jan, 2016 1 commit
    • Damien George's avatar
      py/parse: Optimise away parse node that's just parenthesis around expr. · 93b37262
      Damien George authored
      Before this patch, (x+y)*z would be parsed to a tree that contained a
      redundant identity parse node corresponding to the parenthesis.  With
      this patch such nodes are optimised away, which reduces memory
      requirements for expressions with parenthesis, and simplifies the
      compiler because it doesn't need to handle this identity case.
      
      A parenthesis parse node is still needed for tuples.
      93b37262
  2. 04 Jan, 2016 2 commits
  3. 03 Jan, 2016 5 commits
  4. 02 Jan, 2016 1 commit
  5. 01 Jan, 2016 4 commits
  6. 31 Dec, 2015 1 commit
  7. 28 Dec, 2015 1 commit
  8. 27 Dec, 2015 1 commit
    • Paul Sokolovsky's avatar
      py/gc: Improve mark/sweep debug output. · 3ea03a11
      Paul Sokolovsky authored
      Previously, mark operation weren't logged at all, while it's quite useful
      to see cascade of marks in case of over-marking (and in other cases too).
      Previously, sweep was logged for each block of object in memory, but that
      doesn't make much sense and just lead to longer output, harder to parse
      by a human. Instead, log sweep only once per object. This is similar to
      other memory manager operations, e.g. an object is allocated, then freed.
      Or object is allocated, then marked, otherwise swept (one log entry per
      operation, with the same memory address in each case).
      3ea03a11
  9. 26 Dec, 2015 2 commits
    • Damien George's avatar
      py/map: Add fast-path for hashing of map index when it is a qstr. · bbe8d51b
      Damien George authored
      Map indicies are most commonly a qstr, and adding a fast-path for hashing
      of a qstr increases overall performance of the runtime.
      
      On pyboard there is a 4% improvement in the pystone benchmark for a cost
      of 20 bytes of code size.  It's about a 2% improvement on unix.
      bbe8d51b
    • Damien George's avatar
      py: Be more restrictive binding self when looking up instance attrs. · 78913211
      Damien George authored
      When looking up and extracting an attribute of an instance, some
      attributes must bind self as the first argument to make a working method
      call.  Previously to this patch, any attribute that was callable had self
      bound as the first argument.  But Python specs require the check to be
      more restrictive, and only functions, closures and generators should have
      self bound as the first argument
      
      Addresses issue #1675.
      78913211
  10. 25 Dec, 2015 1 commit
  11. 24 Dec, 2015 1 commit
  12. 22 Dec, 2015 1 commit
    • Paul Sokolovsky's avatar
      unix/unix_mphal: Raise KeyboardInterrupt straight from signal handler. · 1c9210bc
      Paul Sokolovsky authored
      POSIX doesn't guarantee something like that to work, but it works on any
      system with careful signal implementation. Roughly, the requirement is
      that signal handler is executed in the context of the process, its main
      thread, etc. This is true for Linux. Also tested to work without issues
      on MacOSX.
      1c9210bc
  13. 20 Dec, 2015 2 commits
  14. 19 Dec, 2015 1 commit
    • stijn's avatar
      py/mpprint: Fix printing of 64bit integers for 64bit windows builds · 0a4eb4db
      stijn authored
      This makes all tests pass again for 64bit windows builds which would
      previously fail for anything printing ranges (builtin_range/unpack1)
      because they were printed as range( ld, ld ).
      
      This is done by reusing the mp_vprintf implementation for MICROPY_OBJ_REPR_D
      for 64bit windows builds (both msvc and mingw-w64) since the format specifier
      used for 64bit integers is also %lld, or %llu for the unsigned version.
      
      Note these specifiers used to be fetched from inttypes.h, which is the
      C99 way of working with printf/scanf in a portable way, but mingw-w64
      wants to be backwards compatible with older MS C runtimes and uses
      the non-portable %I64i instead of %lld in inttypes.h, so remove the use
      of said header again in mpconfig.h and define the specifiers manually.
      0a4eb4db
  15. 18 Dec, 2015 6 commits
  16. 17 Dec, 2015 10 commits