Skip to content
Snippets Groups Projects
  1. Jul 31, 2017
  2. Jul 18, 2017
    • Alexander Steffen's avatar
      all: Unify header guard usage. · 299bc625
      Alexander Steffen authored
      The code conventions suggest using header guards, but do not define how
      those should look like and instead point to existing files. However, not
      all existing files follow the same scheme, sometimes omitting header guards
      altogether, sometimes using non-standard names, making it easy to
      accidentally pick a "wrong" example.
      
      This commit ensures that all header files of the MicroPython project (that
      were not simply copied from somewhere else) follow the same pattern, that
      was already present in the majority of files, especially in the py folder.
      
      The rules are as follows.
      
      Naming convention:
      * start with the words MICROPY_INCLUDED
      * contain the full path to the file
      * replace special characters with _
      
      In addition, there are no empty lines before #ifndef, between #ifndef and
      one empty line before #endif. #endif is followed by a comment containing
      the name of the guard macro.
      
      py/grammar.h cannot use header guards by design, since it has to be
      included multiple times in a single C file. Several other files also do not
      need header guards as they are only used internally and guaranteed to be
      included only once:
      * MICROPY_MPHALPORT_H
      * mpconfigboard.h
      * mpconfigport.h
      * mpthreadport.h
      * pin_defs_*.h
      * qstrdefs*.h
      299bc625
  3. Feb 17, 2017
  4. Dec 21, 2016
  5. Nov 16, 2016
  6. Apr 13, 2016
    • pohmelie's avatar
      py: add async/await/async for/async with syntax · 81ebba7e
      pohmelie authored
      They are sugar for marking function as generator, "yield from"
      and pep492 python "semantically equivalents" respectively.
      
      @dpgeorge was the original author of this patch, but @pohmelie made
      changes to implement `async for` and `async with`.
      81ebba7e
  7. Jun 04, 2015
  8. Mar 19, 2015
  9. Feb 08, 2015
    • Damien George's avatar
      py: Parse big-int/float/imag constants directly in parser. · 7d414a1b
      Damien George authored
      Previous to this patch, a big-int, float or imag constant was interned
      (made into a qstr) and then parsed at runtime to create an object each
      time it was needed.  This is wasteful in RAM and not efficient.  Now,
      these constants are parsed straight away in the parser and turned into
      objects.  This allows constants with large numbers of digits (so
      addresses issue #1103) and takes us a step closer to #722.
      7d414a1b
  10. Jan 07, 2015
  11. Jan 01, 2015
  12. Dec 27, 2014
  13. Dec 05, 2014
    • 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
  14. Jul 30, 2014
  15. Jul 03, 2014
  16. Jun 03, 2014
  17. May 03, 2014
    • 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
  18. Feb 05, 2014
  19. Jan 25, 2014
  20. Jan 18, 2014
  21. Jan 15, 2014
  22. Jan 12, 2014
  23. Jan 08, 2014
  24. Jan 06, 2014
  25. Jan 04, 2014
  26. Jan 03, 2014
    • Damien George's avatar
      Basic implementation of import. · 66028ab6
      Damien George authored
      import works for simple cases.  Still work to do on finding the right
      script, and setting globals/locals correctly when running an imported
      function.
      66028ab6
  27. Dec 21, 2013
    • Damien's avatar
      Change object representation from 1 big union to individual structs. · d99b0528
      Damien authored
      A big change.  Micro Python objects are allocated as individual structs
      with the first element being a pointer to the type information (which
      is itself an object).  This scheme follows CPython.  Much more flexible,
      not necessarily slower, uses same heap memory, and can allocate objects
      statically.
      
      Also change name prefix, from py_ to mp_ (mp for Micro Python).
      d99b0528
  28. Oct 20, 2013
  29. Oct 09, 2013
  30. Oct 04, 2013
Loading