summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-18 09:23:35 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-12-18 09:23:35 -0800
commit174ab890d66bcaeda615204ae94a733e95dbb19a (patch)
tree3c672b665e96b9d2e1b22ba0dd1627f22245ab9f /README.md
parent4148c6e4ebd7d9e631365e092c04c34a769ca63a (diff)
parent4fdeac9210714cd902f8e6db52b47b16a326c231 (diff)
downloadbinaryen-174ab890d66bcaeda615204ae94a733e95dbb19a.tar.gz
binaryen-174ab890d66bcaeda615204ae94a733e95dbb19a.tar.bz2
binaryen-174ab890d66bcaeda615204ae94a733e95dbb19a.zip
Merge pull request #12 from loganchien/fix-readme
fix typo in readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 4e741e7e9..86b13896d 100644
--- a/README.md
+++ b/README.md
@@ -177,7 +177,7 @@ Same as Emscripten: MIT license.
This is separate from that. `asm2wasm` focuses on compiling asm.js to WebAssembly, as emitted by Emscripten's asm.js backend. This is useful because while in the long term Emscripten hopes to use the new WebAssembly backend, the `asm2wasm` route is a very quick and easy way to generate WebAssembly output. It will also be useful for benchmarking the new backend as it progresses.
-* How about compiling asm.js to WebAssembly (the opposite direction of `asm2wasm`)? Wouldn't that be useful for polyfilling?
+* How about compiling WebAssembly to asm.js (the opposite direction of `asm2wasm`)? Wouldn't that be useful for polyfilling?
It would be useful, but it is a much harder task, due to some decisions made in WebAssembly. For example, WebAssembly can have control flow nested inside expressions, which can't directly map to asm.js. It could be supported by outlining the code to another function, or to compiling it down into new basic blocks and control-flow-free instructions, but it is hard to do so in a way that is both fast to do and emits code that is fast to execute. On the other hand, compiling asm.js to WebAssembly is almost straightforward.