diff options
Diffstat (limited to 'docs/binaryen.js.Markdown')
-rw-r--r-- | docs/binaryen.js.Markdown | 3 |
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.) |