News for hackers. Stuff that matters.
Re:Asm.js: a strict subset of js for compilers – working draft by rntz on Friday February 15, 2013 @03:40PM (#5228494)
The fact that you can't represent function pointers (not closures, just plain old C-style function pointers) in asm.js severely limits its usability as a target language for even C-like languages.
Re:Asm.js: a strict subset of js for compilers – working draft by marijn on Friday February 15, 2013 @03:57PM (#5228618)
Can you explain the use case where you need need function pointers but closure pointers won't do?
Re:Asm.js: a strict subset of js for compilers – working draft by rntz on Friday February 15, 2013 @10:51PM (#5230305)
Oh! Closure pointers would absolutely suffice. But as far as I could tell, asm.js doesn't support closure pointers either. Obviously I could use a value of "unknown" type to pass them in, but section 2.1.9 says "Since asm.js does not allow general JavaScript values, the result must be immediately coerced to an integer or double."

So I'm under the impression that asm.js can't really deal with closures or functions as values. Am I reading the docs wrong? I hope I am.

Re:Asm.js: a strict subset of js for compilers – working draft by evincarofautumn on Saturday February 16, 2013 @12:20AM (#5230489)
Looks like it’s in the works.

https://github.com/dherman/asm.js/issues/4