Skip to content
Snippets Groups Projects
  • Damien George's avatar
    0c650d42
    py/vm: Simplify stack sentinel values for unwind return and jump. · 0c650d42
    Damien George authored
    This patch simplifies how sentinel values are stored on the stack when
    doing an unwind return or jump.  Instead of storing two values on the stack
    for an unwind jump it now stores only one: a negative small integer means
    unwind-return and a non-negative small integer means unwind-jump with the
    value being the number of exceptions to unwind.  The savings in code size
    are:
    
       bare-arm:   -56
    minimal x86:   -68
       unix x64:   -80
    unix nanbox:    -4
          stm32:   -56
         cc3200:   -64
        esp8266:   -76
          esp32:  -156
    0c650d42
    History
    py/vm: Simplify stack sentinel values for unwind return and jump.
    Damien George authored
    This patch simplifies how sentinel values are stored on the stack when
    doing an unwind return or jump.  Instead of storing two values on the stack
    for an unwind jump it now stores only one: a negative small integer means
    unwind-return and a non-negative small integer means unwind-jump with the
    value being the number of exceptions to unwind.  The savings in code size
    are:
    
       bare-arm:   -56
    minimal x86:   -68
       unix x64:   -80
    unix nanbox:    -4
          stm32:   -56
         cc3200:   -64
        esp8266:   -76
          esp32:  -156