asm-js / validator

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

"C programs compiled to asm.js" ?? #44

Closed SimonSapin closed 10 years ago

SimonSapin commented 11 years ago

Hi,

The second question of the FAQ mentions "C programs compiled to asm.js", but that doesn’t make sense. Is that sentence missing something like "with emscripten"?

ScatteredRay commented 11 years ago

I think that while adding "with emscripten" would be likely accurate, or perhaps improve clarity. I do not think it is necessary. Since if there is another compiler that does the job, the statement holds equally true.

SimonSapin commented 11 years ago

"with empscripten or similar tools" maybe?

The point is that C usually does not compile to C. And asm.js makes a lot more sense if you think of it as a target for tools such as emscripten rather than a something you write directly.

ScatteredRay commented 11 years ago

And C usually does not compile to SPARC opcodes either, that doesn't mean you should say "with the gcc SPARC backend" when you are talking about that either.

The whole point about ASM.js is it is a compilation target for languages such as C, the implication is right there in the name. I'm not sure it's necessary to explicitly say which tool in every possible context.

I will however concede that since this is talking about a specific instance "preliminary tests" and comparing it against another compiler "native compilation with clang" that this would be an appropriate case to add the fact that the tests were indeed with emscripten, if such is the case.

kripken commented 11 years ago

Emscripten was used for those benchmark numbers, but another compiler could be used too. I think dherman didn't mention the compiler because it wasn't important in that context, which was more about how fast asm.js in general could be.