asm-js / validator

A reference validator for asm.js.
Apache License 2.0
1.78k stars 154 forks source link

anything with fround doesn't validate #125

Open charlieroberts opened 7 years ago

charlieroberts commented 7 years ago

Example:

function helloWorld(stdlib, foreign, heap) {
  "use asm";

  function output() {
    var test = fround(0);

    return fround(test);
  }

  return output;
}

... gives errors for both invalid return type annotation and invalid declaration of a local variable. They validate / compile fine in Firefox.

Thanks for any thoughts on this... I'm a bit confused as I'm creating much more complex functions that validate fine in FF, but even the simplest ones fail with asm.js (like the example here). I'd really like to use asm.js for unit tests in Node.