for (let arg of inputs) { for (let func of ['i32', 'f32', 'f64']) {
call(exports[func], coercions[func], arg);
}
}
})();
// Test mixup of float and int arguments.
(function() { for (let i = 0; i < 10; i++) {
assertEq(exports.mixed_args(i, i+1, i+2, i+3, i+4, i+0.5, i+5), i+0.5);
}
})();
// Test high number of arguments. // All integers.
let {func} = wasmEvalText(`(module
(func (export "func")
${Array(32).join('(param i32)')}
(param $last i32)
(result i32)
local.get $last
)
)`).exports;
// Mix em up! 1 i32, then 1 f32, then 1 f64, and again up to 32 args.
let params = []; for (let i = 0; i < 32; i++) {
params.push((i % 3 == 0) ? 'i32' :
(i % 3 == 1) ? 'f32' : 'f64'
);
}
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.