You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IR is indeed a tree, but not an "abstract syntax tree" since there is no language for which it is the syntax (except in the most trivial and meaningless sense).
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,15 @@ Consult the [contributing instructions](Contributing.md) if you're interested in
27
27
28
28
## Binaryen IR
29
29
30
-
Binaryen's internal IR is an AST, designed to be
30
+
Binaryen's internal IR is designed to be
31
31
32
32
***Flexible and fast** for optimization.
33
33
***As close as possible to WebAssembly** so it is simple and fast to convert it to and from WebAssembly.
34
34
35
35
There are a few differences between Binaryen IR and the WebAssembly language:
36
36
37
-
*AST structure
38
-
* Binaryen IR [is an AST](https://github.com/WebAssembly/binaryen/issues/663) (i.e. it has hierarchical structure), for convenience of optimization. This differs from the WebAssembly binary format which is a stack machine.
37
+
*Tree structure
38
+
* Binaryen IR [is an tree](https://github.com/WebAssembly/binaryen/issues/663), i.e., it has hierarchical structure, for convenience of optimization. This differs from the WebAssembly binary format which is a stack machine.
39
39
* Consequently Binaryen's text format allows only s-expressions. WebAssembly's official text format is primarily a linear instruction list (with s-expression extensions). Binaryen can't read the linear style, but it can read a wasm text file if it contains only s-expressions.
40
40
* Types and unreachable code
41
41
* 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](https://github.com/WebAssembly/binaryen/issues/903).
0 commit comments