summaryrefslogtreecommitdiff
path: root/cli/tests/no_validate_asm.js
blob: 38ea0a446b3bf4c74c9d0f206678f8d100a373a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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,
  };
}();