blob: 1573ec460c911e6308bb6de8f42fe8096291b285 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
load(libdir + "asm.js");
var bigScript = `
function wee() { return 42 }
function asmModule() { 'use asm'; function f() { return 43 } return f}
` + ' '.repeat(10 * 1024 * 1024);
eval(bigScript);
if (isAsmJSCompilationAvailable())
assertEq(isAsmJSModule(asmModule), true);
assertEq(wee(), 42);
assertEq(eval('(' + wee.toSource() + ')')(), 42);
|