diff options
author | Anonymous <65428781+00ff0000red@users.noreply.github.com> | 2021-01-07 07:50:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 10:50:57 -0500 |
commit | b40d5e5e0b44187737651d155d2e67fcc26f14e8 (patch) | |
tree | da9e3adfb0c59ee8f800ca429465981fd939c273 /cli/tests/no_validate_asm.js | |
parent | 9b3338fa2f61060ed92abe850fbd31170006217e (diff) |
ignore "use asm" (#9019)
Preventing V8 from logging erroneous line numbers. Use wasm.
Diffstat (limited to 'cli/tests/no_validate_asm.js')
-rw-r--r-- | cli/tests/no_validate_asm.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/tests/no_validate_asm.js b/cli/tests/no_validate_asm.js new file mode 100644 index 000000000..38ea0a446 --- /dev/null +++ b/cli/tests/no_validate_asm.js @@ -0,0 +1,20 @@ +// 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, + }; +}(); |