blob: 638fef6c4047418429ee3b545b4fb913381b41e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// |jit-test| skip-if: !isAsmJSCompilationAvailable()
enableGeckoProfiling();
var code = evaluate("(function() { 'use asm'; function g() { return 43 } return g })", {
fileName: null
});
assertEq(code()(), 43);
evaluate(`
let f = evalReturningScope.bind(null, '');
(function(glob, stdlib) {
"use asm";
var f = stdlib.f;
function _() { f(); }
return _;
})(this, { f })();
`, { fileName: null });
|