Skip to content
  • pcapriotti's avatar
    Support large SLIDE instructions. · 6dc22bfa
    pcapriotti authored
    The bytecode generator used to keep track of the stack depth with a
    16-bit counter, which could overflow for very large BCOs, resulting in
    incorrect bytecode.
    
    This commit switches to a word-sized counter, and eagerly panics
    whenever an operand is too big, instead of truncating the result.
    
    This allows us to work around the 16-bit limitation in the case of SLIDE
    instructions, since we can simply factor it into multiple SLIDEs with
    smaller arguments.
    6dc22bfa