summaryrefslogtreecommitdiff
path: root/docs/binaryen.js.Markdown
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2017-10-30 19:27:31 +0100
committerAlon Zakai <alonzakai@gmail.com>2017-10-30 11:27:31 -0700
commit7a4c47e7d4e70404249af4a9ac4ffcbe23d2cd67 (patch)
treecdc39bf0db7d76318e56c41ecd633a8ced877e01 /docs/binaryen.js.Markdown
parentda871deea05366006a3942cebb61e8463c1c4100 (diff)
downloadbinaryen-7a4c47e7d4e70404249af4a9ac4ffcbe23d2cd67.tar.gz
binaryen-7a4c47e7d4e70404249af4a9ac4ffcbe23d2cd67.tar.bz2
binaryen-7a4c47e7d4e70404249af4a9ac4ffcbe23d2cd67.zip
Added the ability to run specific optimization passes to binaryen-c/.js (#1252)
Diffstat (limited to 'docs/binaryen.js.Markdown')
-rw-r--r--docs/binaryen.js.Markdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/binaryen.js.Markdown b/docs/binaryen.js.Markdown
index 20181d62a..d003ad6b1 100644
--- a/docs/binaryen.js.Markdown
+++ b/docs/binaryen.js.Markdown
@@ -39,7 +39,8 @@ Module operations:
* `emitBinary()`: Returns a binary for the module, which you can then compile and run in the browser.
* `emitText()`: Returns a text representation of the module, in s-expression format.
* `validate()`: Validates the module, checking it for correctness.
- * `optimize()`: Optimize the module.
+ * `optimize()`: Runs the standard optimization passes on the module.
+ * `runPasses(passes)`: Runs the specified passes on the module.
* `autoDrop()`: Automatically inserts `drop` operations. This lets you not worry about dropping when creating your code.
* `interpret()`: Run the module in the Binaryen interpreter (creates the module, and calls the start method). Useful for debugging.
* `dispose()`: Cleans up the module. If the Binaryen object can be garbage-collected anyhow, you don't need to do this, but if it stays around - e.g. if you create multiple `Module`s over time - then you should call this once a `Module` is no longer needed. (As binaryen.js uses compiled C++ code, we can't just rely on normal garbage collection to clean things up internally.)