• Kevin Modzelewski's avatar
    Add int->long promotion on overflow · 2d55194c
    Kevin Modzelewski authored
    This commit is a straightforward implementation that doesn't include
    any speculation-like optimizations.  For operations that can overflow,
    just relax the type-return-specification to UNKNOWN, and do the overflow
    checks in the runtime.  This means that we no longer emit fast native
    integer instructions even if we know operands are ints.
    
    Will have to add optimizations:
    - range analysis so that we can know there won't be overflow
    - deopt-on-overflow so that we can work with unboxed ints even if there's potential overflow
    2d55194c
common.h 2.96 KB