-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
function helloWorld(stdlib, foreign, heap) {
"use asm";
var HEAP64 = new stdlib.Float64Array(heap);
// this is what we're validating
function giveThemTheAnswer() {
var x = 2;
// for each line below expected behavior to see:
// type error: unsupported expression;
x += 2|0;
x -= 2|0;
x *= 2|0;
x /= 2|0;
x <<= 2|0;
x >>= 2|0;
// In reality asm.js doesn't see error above, and ignores it. If I run
// this code through spider monkey shell (https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ )
// ./js -w hello.js
// I get proper warnings.
return x|0;
}
return { answer: giveThemTheAnswer };
}
print(helloWorld(this, null, new ArrayBuffer(0x10000)).answer());PS: I know you mentioned in the readme file:
[..] this code is not up to date with the latest working draft and is not extensively tested. Patches to update it or fix bugs are welcome though.
Just wanted to log it here in case someone finds time to fix it.
Metadata
Metadata
Assignees
Labels
No labels