for (var i = 0; i < ITER; i++) {
startProfiling();
assertEq(table.get(0)(i, i+1), i*2+1);
assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS);
}
}
function withTier2() {
setJitCompilerOption('wasm.delay-tier2', 1);
var module = new WebAssembly.Module(wasmTextToBinary(`(module
(func (param i32) (param i32) (result i32)
local.get 0
local.get 1
i32.add
)
(table (export "table") 10 funcref)
(elem (i32.const 0) 0)
)`)); var { table } = new WebAssembly.Instance(module).exports;
let i = 0; do {
i++;
startProfiling();
assertEq(table.get(0)(i, i+1), i*2+1);
assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS);
} while (!wasmHasTier2CompilationCompleted(module));
for (i = 0; i < ITER; i++) {
startProfiling();
assertEq(table.get(0)(i, i+1), i*2+1);
assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.