mirror of
https://github.com/denoland/deno.git
synced 2024-11-01 09:24:20 -04:00
21 lines
377 B
JavaScript
21 lines
377 B
JavaScript
|
// V8 logs any asmjs validation errors to stdout, but it shows line numbers that
|
||
|
// are non-existent in the source.
|
||
|
|
||
|
const asmJsModule = function () {
|
||
|
"use asm";
|
||
|
|
||
|
function func(
|
||
|
x,
|
||
|
) {
|
||
|
x = +x; // cast to float
|
||
|
|
||
|
~x;
|
||
|
// asmjs error: `~` is only valid on integers
|
||
|
// should not log to stdout with --no-validate-asm
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
f: func,
|
||
|
};
|
||
|
}();
|