Skip to content
Snippets Groups Projects
  1. Feb 15, 2015
  2. Jan 01, 2015
  3. Dec 27, 2014
  4. Dec 22, 2014
    • Damien George's avatar
      py: Reduce size of VM exception stack element by 1 machine word. · 74eb44c3
      Damien George authored
      This optimisation reduces the VM exception stack element (mp_exc_stack_t)
      by 1 word, by using bit 1 of a pointer to store whether the opcode was a
      FINALLY or WITH opcode.  This optimisation was pending, waiting for
      maturity of the exception handling code, which has now proven itself.
      
      Saves 1 machine word RAM for each exception (4->3 words per exception).
      Increases stmhal code by 4 bytes, and decreases unix x64 code by 32
      bytes.
      74eb44c3
  5. Oct 25, 2014
    • Damien George's avatar
      py: Store bytecode arg names in bytecode (were in own array). · 1084b0f9
      Damien George authored
      This saves a lot of RAM for 2 reasons:
      
      1. For functions that don't have default values, var args or var kw
      args (which is a large number of functions in the general case), the
      mp_obj_fun_bc_t type now fits in 1 GC block (previously needed 2 because
      of the extra pointer to point to the arg_names array).  So this saves 16
      bytes per function (32 bytes on 64-bit machines).
      
      2. Combining separate memory regions generally saves RAM because the
      unused bytes at the end of the GC block are saved for 1 of the blocks
      (since that block doesn't exist on its own anymore).  So generally this
      saves 8 bytes per function.
      
      Tested by importing lots of modules:
      
      - 64-bit Linux gave about an 8% RAM saving for 86k of used RAM.
      - pyboard gave about a 6% RAM saving for 31k of used RAM.
      1084b0f9
  6. Oct 03, 2014
  7. Sep 04, 2014
  8. Aug 24, 2014
  9. Jul 03, 2014
  10. Jun 11, 2014
  11. Jun 07, 2014
  12. Jun 02, 2014
  13. May 31, 2014
  14. May 10, 2014
  15. 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
  16. Apr 23, 2014
  17. Mar 30, 2014
  18. Mar 29, 2014
    • Paul Sokolovsky's avatar
      vm: Save current active exception on opening new try block. · 0c904df8
      Paul Sokolovsky authored
      Required to reraise correct exceptions in except block, regardless if more
      try blocks with active exceptions happen in the same except block.
      
      P.S. This "automagic reraise" appears to be quite wasteful feature of Python
      - we need to save pending exception just in case it *might* be reraised.
      Instead, programmer could explcitly capture exception to a variable using
      "except ... as var", and reraise that. So, consider disabling argless raise
      support as an optimization.
      0c904df8
  19. Mar 27, 2014
    • Damien George's avatar
      py: Put n_state for bytecode in the bytecode prelude. · bee17b00
      Damien George authored
      Rationale: setting up the stack (state for locals and exceptions) is
      really part of the "code", it's the prelude of the function.  For
      example, native code adjusts the stack pointer on entry to the function.
      Native code doesn't need to know n_state for any other reason.  So
      putting the state size in the bytecode prelude is sensible.
      
      It reduced ROM usage on STM by about 30 bytes :)  And makes it easier to
      pass information about the bytecode between functions.
      bee17b00
  20. Mar 23, 2014
  21. Mar 22, 2014
  22. Feb 15, 2014
  23. Feb 01, 2014
  24. Jan 19, 2014
  25. Jan 18, 2014
  26. Jan 06, 2014
  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. Dec 11, 2013
  29. Dec 10, 2013
  30. Nov 05, 2013
  31. Oct 16, 2013
  32. Oct 10, 2013
  33. Oct 09, 2013
  34. Oct 05, 2013
  35. Oct 04, 2013
Loading