blob: 39a914345a51f671126b07f2d25d11c4bba7d237 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// |jit-test| --fuzzing-safe; --cpu-count=2; --ion-offthread-compile=off; skip-if: !isAsmJSCompilationAvailable()
load(libdir + "asserts.js");
function asmCompile() {
var f = Function.apply(null, arguments);
return f;
}
var code = asmCompile('glob', 'imp', 'b', `
"use asm";
function f(i,j) {
i=i|0;
j=j|0;
}
return f
`);
let g80 = newGlobal({newCompartment: true});
// Compiling to a Stencil XDR should fail because XDR encoding does not support asm.js
assertThrowsInstanceOf(() => g80.compileToStencilXDR(code, {}), g80.Error);
|