News for hackers. Stuff that matters.
Re:Unreal JavaScript by jerf on Wednesday May 08, 2013 @10:27AM (#5674278)
Yes and no... once you hit the

   // EMSCRIPTEN_START_ASM
it becomes

    if((d|0)!=36620|(d|0)!=0&(c[b+4>>2]|0)!=0)
    {c[1779323]=6}b=c[1312365]|0;d=7084512;
    c[d>>2]=c[1312364]|0;c[d+4>>2]=b;b=7084520;
    d=c[b>>2]|0;if((d|0)!=36620|(d|0)!=0&(c[b+4>>2]|0)!=0)
    {c[1779323]=7}b=c[1312363]|0;d=7084520;
    c[d>>2]=c[1312362]|0;
all on one line for nearly the rest of the file. It might as well be bytecode. Actually many bytecodes are more understandable.
Re:Unreal JavaScript by MasterScrat on Wednesday May 08, 2013 @10:33AM (#5674306)
No, it's still JavaScript. The fact that it's compressed or not human-readable doesn't make it bytecode.
Re:Unreal JavaScript by jerf on Wednesday May 08, 2013 @12:55PM (#5675316)
"It might as well be bytecode."
Re:Unreal JavaScript by CmonNoReg on Wednesday May 08, 2013 @02:58PM (#5676128)
So can you add some dynamic code into asm.js and expect same performance? Asm.js is an assembly that looks like JavaScript for compatibility and readability.
Re:Unreal JavaScript by ndesaulniers on Wednesday May 08, 2013 @08:53PM (#5678136)
No, asm.js code that parses successfully is compiled ahead of time. It is a strict subset of the JavaScript programming language. If you use parts other than the subset, it will fail to parse as valid asm.js code and revert to the interpreter/JITs.
Re:Unreal JavaScript by azakai on Wednesday May 08, 2013 @12:55PM (#5675315)
Well yes, but the same is true of any minified JavaScript, handwritten or compiled. For example look at the output of the closure compiler minifier.
Re:Unreal JavaScript by jerf on Wednesday May 08, 2013 @12:58PM (#5675344)
Minified Javascript does not operate on an enormous buffer of bytes, such that you get seven and eight digit numbers flying everywhere. It's still easier to understand and manipulate than ASM.

asm.js isn't just an evocative name, it's a reasonable description... it's assembly in Javascript.

Re:Unreal JavaScript by mschuster91 on Wednesday May 08, 2013 @11:22AM (#5674697)
THERE is the code. LOL, I actually did not spot it in the file and asked myself "just where the ... is the code"?