1. 20 Sep, 2016 1 commit
  2. 02 Jul, 2016 1 commit
  3. 23 May, 2016 1 commit
  4. 21 May, 2016 3 commits
  5. 13 Apr, 2016 1 commit
  6. 11 Jan, 2016 1 commit
  7. 18 Dec, 2015 1 commit
    • Damien George's avatar
      py: Add MICROPY_ENABLE_COMPILER and MICROPY_PY_BUILTINS_EVAL_EXEC opts. · dd5353a4
      Damien George authored
      MICROPY_ENABLE_COMPILER can be used to enable/disable the entire compiler,
      which is useful when only loading of pre-compiled bytecode is supported.
      It is enabled by default.
      
      MICROPY_PY_BUILTINS_EVAL_EXEC controls support of eval and exec builtin
      functions.  By default they are only included if MICROPY_ENABLE_COMPILER
      is enabled.
      
      Disabling both options saves about 40k of code size on 32-bit x86.
      dd5353a4
  8. 29 Nov, 2015 2 commits
  9. 13 Nov, 2015 1 commit
  10. 28 Jun, 2015 1 commit
    • Paul Sokolovsky's avatar
      builtinimport: Fix running package submodule with -m. · 9780e552
      Paul Sokolovsky authored
      When "micropython -m pkg.mod" command was used, relative imports in pkg.mod
      didn't work, because pkg.mod.__name__ was set to __main__, and the fact that
      it's a package submodule was missed. This is an original workaround to this
      issue. TODO: investigate and compare how CPython deals with this issue.
      9780e552
  11. 26 Jun, 2015 1 commit
  12. 05 Jun, 2015 1 commit
  13. 16 Apr, 2015 1 commit
  14. 16 Feb, 2015 2 commits
  15. 29 Jan, 2015 1 commit
  16. 28 Jan, 2015 1 commit
    • Damien George's avatar
      py: Change vstr so that it doesn't null terminate buffer by default. · 0d3cb672
      Damien George authored
      This cleans up vstr so that it's a pure "variable buffer", and the user
      can decide whether they need to add a terminating null byte.  In most
      places where vstr is used, the vstr did not need to be null terminated
      and so this patch saves code size, a tiny bit of RAM, and makes vstr
      usage more efficient.  When null termination is needed it must be
      done explicitly using vstr_null_terminate.
      0d3cb672
  17. 21 Jan, 2015 1 commit
  18. 20 Jan, 2015 1 commit
  19. 16 Jan, 2015 1 commit
  20. 01 Jan, 2015 2 commits
  21. 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
  22. 05 Dec, 2014 1 commit
    • Damien George's avatar
      py: Optimise lexer by exposing lexer type. · a4c52c5a
      Damien George authored
      mp_lexer_t type is exposed, mp_token_t type is removed, and simple lexer
      functions (like checking current token kind) are now inlined.
      
      This saves 784 bytes ROM on 32-bit unix, 348 bytes on stmhal, and 460
      bytes on bare-arm.  It also saves a tiny bit of RAM since mp_lexer_t
      is a bit smaller.  Also will run a bit more efficiently.
      a4c52c5a
  23. 06 Nov, 2014 1 commit
  24. 05 Nov, 2014 2 commits
  25. 26 Oct, 2014 1 commit
  26. 25 Oct, 2014 2 commits
  27. 12 Oct, 2014 1 commit
    • Damien George's avatar
      py: Add module weak link support. · c14a8166
      Damien George authored
      With this patch a port can enable module weak link support and provide
      a dict of qstr->module mapping.  This mapping is looked up only if an
      import fails to find the requested module in the filesystem.
      
      This allows to have the builtin module named, eg, usocket, and provide
      a weak link of "socket" to the same module, but this weak link can be
      overridden if a file by the name "socket.py" is found in the import
      path.
      c14a8166
  28. 05 Oct, 2014 2 commits
  29. 03 Oct, 2014 1 commit
  30. 23 Sep, 2014 2 commits
    • Damien George's avatar
      py: Free non-interned strings in the parser when not needed. · 52b5d76a
      Damien George authored
      mp_parse_node_free now frees the memory associated with non-interned
      strings.  And the parser calls mp_parse_node_free when discarding a
      non-used node (such as a doc string).
      
      Also, the compiler now frees the parse tree explicitly just before it
      exits (as opposed to relying on the caller to do this).
      
      Addresses issue #708 as best we can.
      52b5d76a
    • Damien George's avatar
      stmhal: Initialise stack pointer correctly. · eaaebf32
      Damien George authored
      Stack is full descending and must be 8-byte aligned.  It must start off
      pointing to just above the last byte of RAM.
      
      Previously, stack started pointed to last byte of RAM (eg 0x2001ffff)
      and so was not 8-byte aligned.  This caused a bug in combination with
      alloca.
      
      This patch also updates some debug printing code.
      
      Addresses issue #872 (among many other undiscovered issues).
      eaaebf32
  31. 30 Aug, 2014 1 commit