summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-11-01 15:47:39 -0700
committerGitHub <noreply@github.com>2018-11-01 15:47:39 -0700
commitc0977d3c25d3dc695677ba97df5eaae34ec63391 (patch)
treef295f5e2714e779df76593704e74077911be4d4b
parent77c66027f0dcbd7160f78c5de4943372836ab142 (diff)
downloadbinaryen-c0977d3c25d3dc695677ba97df5eaae34ec63391.tar.gz
binaryen-c0977d3c25d3dc695677ba97df5eaae34ec63391.tar.bz2
binaryen-c0977d3c25d3dc695677ba97df5eaae34ec63391.zip
document that binaryen text is not valid wasm text, but stack IR is [ci skip] (#1716)
-rw-r--r--README.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/README.md b/README.md
index 417da1414..f3346549d 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,10 @@ There are a few differences between Binaryen IR and the WebAssembly language:
* WebAssembly limits block/if/loop types to none and the concrete value types
(i32, i64, f32, f64). Binaryen IR has an unreachable type, and it allows
block/if/loop to take it, allowing [local transforms that don't need to
- know the global context][unreachable].
+ know the global context][unreachable]. As a result, Binaryen's default
+ text output is not necessarily valid wasm text. (To get valid wasm text,
+ you can do `--generate-stack-ir --print-stack-ir`, which prints Stack IR,
+ this is guaranteed to be valid for wasm parsers.)
* Binaryen ignores unreachable code when reading WebAssembly binaries. That
means that if you read a wasm file with unreachable code, that code will be
discarded as if it were optimized out (often this is what you want anyhow,