Skip to content
This repository

Correct {U}Integer overflow behavior #154

mgehre opened this Issue · 0 comments

1 participant


Arithmetic operations on {U}Integers should be carried out after converting them to Numbers. For example

var i1:uint = UINT_MAX;
var i2:uint = 1;

will not trace '-1', but UINT_MAX+1 and the result will be of type Number (not uint!).

It is still not clear how to generate the fastest code for that. Either
1) convert all {U}Integer to double and operate on them
2) operate on the integer value and just convert them if a overflow occurs

See also the last two paragraphs of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.