Hi Alon,

> On 17 Jun 2015, at 20:12, Alon Zakai <[email protected]> wrote:
> I think it is a valid concern to worry about code on the web remaining 
> human-readable, and in fact we are being very careful about that, see this 
> FAQ entry:

I didn’t mean to say that this isn’t a valid concern, just that it’s not that 
much different from what Emscripten is doing today already.

> 2. asm.js is currently hard to read due to all the extra | 0 and + coercions, 
> etc. The WebAssembly text format will be much cleaner, and much more readable.

That’s true, but even if you take out all the ‘| 0’s you’re left with code that 
is at a significantly lower level than the original C or C++ code it came from. 
Since struct/class metadata isn’t retained at runtime in C/C++ you’re left with 
a bunch of loads and stores from/to the heap and local stack variables. It’s 
useful to be able to see this in text form of course, but it’s a challenge to 
look at this and figure out what the code is supposed to be doing. Based on the 
AST description 
<https://github.com/WebAssembly/design/blob/master/AstSemantics.md> it’ll be 
like reading LLVM assembly or javap output. Retaining expressions as ASTs 
should make it a bit easier to read compared to stack or register based 
bytecode of course. Is that about right?

Pepijn

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to