blob: 936fba24fd85ce7381eb01dabdc44bff56374173 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
var lfModule = new WebAssembly.Module(wasmTextToBinary(`
(module
(import "global" "func" (func (result i32)))
(func (export "func_0") (result i32)
call 0 ;; calls the import, which is func #0
)
)
`));
enableGeckoProfiling();
WasmHelpers.startProfiling();
setJitCompilerOption("ion.warmup.trigger", 20);
Object.prototype[3] = 3;
var imports = {
global: {
func: function() {}
}
}
for (let i = 0; i < 100; ++i) {
for (dmod in imports)
for (dname in imports[dmod])
if (imports[dmod][dname] == undefined) {}
instance = new WebAssembly.Instance(lfModule, imports);
print(i, instance.exports.func_0());
}
|