blob: a5c7b0490dd4fbb75e08397e2a8a3a0d27c293fb [file] [log] [blame]
function assert(a, e) {
if (a !== e)
throw new Error("Expected: " + e + " but got: " + a);
}
function untypedLShift(a, b) {
return a << b;
}
noInline(untypedLShift);
let o = {
valueOf: () => 0b11101n
}
for (var i = 0; i < 10000; i++) {
assert(untypedLShift(0b11101n, 10n), 0b111010000000000n);
assert(untypedLShift(o, 10n), 0b111010000000000n);
assert(untypedLShift(0b11101, 10), 0b111010000000000);
}