The following have to be rewritten... but what into?
while (!(next === Infinity || current.covers(next)))
I replaced Infinity by MAX_FIXNUM as suggested by Marc in codegen/linearscan.js. I added utility/contants.js for future constants.
and
assert( k<= 9007199254740991 || k>= -9007199254740991, "Internal error: current scheme cannot garantee an exact" + " representation for signed numbers greater than (2^53-1)" + " or lesser than -(2^53-1)");
I commented this one since we cannot represent numbers this big with 32 bits fixnums and now I simply throw an error if we try to generate 64 bits value. That should be ok for the bootstrap.
I saw many asserts saying "should" when "must" is the correct term.
assert(typeof(name) === "string", "'name' argument should be a string");
It should be fixed using 'must' now ;-).
shouldn't it be:
allocator.min = function (a, accessFct) { if (accessFct === undefined) accessFct = function (x) { return x; };
var minIndex = 0; var minValue = 0; var i; for (i=0; i< a.length; ++i) { var x = accessFct(a[i]); if (x< minValue) // NOTE:< instead of> { minIndex = i; minValue = x; // NOTE: x } } return { index:minIndex, value:minValue };
};
Thanks for catching it. It was never used so I removed it.
Erick