1. 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
  2. 06 Nov, 2014 1 commit
  3. 05 Nov, 2014 2 commits
  4. 26 Oct, 2014 1 commit
  5. 25 Oct, 2014 2 commits
  6. 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
  7. 05 Oct, 2014 2 commits
  8. 03 Oct, 2014 1 commit
  9. 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
  10. 30 Aug, 2014 3 commits
  11. 28 Jul, 2014 1 commit
  12. 11 Jun, 2014 1 commit
  13. 07 Jun, 2014 1 commit
  14. 05 Jun, 2014 2 commits
  15. 25 May, 2014 1 commit
  16. 24 May, 2014 1 commit
  17. 21 May, 2014 1 commit
    • Damien George's avatar
      Tidy up some configuration options. · 58ebde46
      Damien George authored
      MP_ALLOC_* -> MICROPY_ALLOC_*
      MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX
      MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL
      MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX
      MICROPY_EXTRA_* -> MICROPY_PORT_*
      
      See issue #35.
      58ebde46
  18. 13 May, 2014 1 commit
  19. 10 May, 2014 2 commits
  20. 03 May, 2014 2 commits
    • 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
    • stijn's avatar
      py: Use <alloca.h> for alloca() · 98e2ee0e
      stijn authored
      alloca() is declared in alloca.h which als happens to be included by stdlib.h.
      On mingw however it resides in malloc.h only.
      So if we include alloca.h directly, and add an alloca.h for mingw in it's port
      directory we can get rid of the mingw-specific define to include malloc.h
      and the other ports are happy as well.
      98e2ee0e
  21. 02 May, 2014 1 commit
  22. 21 Apr, 2014 1 commit
  23. 20 Apr, 2014 1 commit
  24. 14 Apr, 2014 1 commit
    • Paul Sokolovsky's avatar
      builtinimport: Add basic support for namespace packages. · a5854d2b
      Paul Sokolovsky authored
      That was easy - just avoid erroring out on seeing candidate dir for namespace
      package. That's far from being complete though - namespace packages should
      support importing portions of package from different sys.path entries, here
      we require first matching entry to contain all namespace package's portions.
      
      And yet, that's a way to put parts of the same Python package into multiple
      installable package - something we really need for *Micro*Python.
      a5854d2b
  25. 13 Apr, 2014 3 commits
  26. 12 Apr, 2014 1 commit
  27. 11 Apr, 2014 3 commits