Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

parse.h

Blame
    • Damien George's avatar
      22b22650
      py/parse: Improve constant folding to operate on small and big ints. · 22b22650
      Damien George authored
      Constant folding in the parser can now operate on big ints, whatever
      their representation.  This is now possible because the parser can create
      parse nodes holding arbitrary objects.  For the case of small ints the
      folding is still efficient in RAM because the folded small int is stored
      inplace in the parse node.
      
      Adds 48 bytes to code size on Thumb2 architecture.  Helps reduce heap
      usage because more constants can be computed at compile time, leading to
      a smaller parse tree, and most importantly means that the constants don't
      have to be computed at runtime (perhaps more than once).  Parser will now
      be a little slower when folding due to calls to runtime to do the
      arithmetic.
      22b22650
      History
      py/parse: Improve constant folding to operate on small and big ints.
      Damien George authored
      Constant folding in the parser can now operate on big ints, whatever
      their representation.  This is now possible because the parser can create
      parse nodes holding arbitrary objects.  For the case of small ints the
      folding is still efficient in RAM because the folded small int is stored
      inplace in the parse node.
      
      Adds 48 bytes to code size on Thumb2 architecture.  Helps reduce heap
      usage because more constants can be computed at compile time, leading to
      a smaller parse tree, and most importantly means that the constants don't
      have to be computed at runtime (perhaps more than once).  Parser will now
      be a little slower when folding due to calls to runtime to do the
      arithmetic.