summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2015-12-18 22:38:52 +0800
committerLogan Chien <tzuhsiang.chien@gmail.com>2015-12-18 22:38:52 +0800
commit4fdeac9210714cd902f8e6db52b47b16a326c231 (patch)
tree3c672b665e96b9d2e1b22ba0dd1627f22245ab9f
parent4148c6e4ebd7d9e631365e092c04c34a769ca63a (diff)
downloadbinaryen-4fdeac9210714cd902f8e6db52b47b16a326c231.tar.gz
binaryen-4fdeac9210714cd902f8e6db52b47b16a326c231.tar.bz2
binaryen-4fdeac9210714cd902f8e6db52b47b16a326c231.zip
fix typo in readme
-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.