From 7a4c47e7d4e70404249af4a9ac4ffcbe23d2cd67 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Mon, 30 Oct 2017 19:27:31 +0100 Subject: Added the ability to run specific optimization passes to binaryen-c/.js (#1252) --- docs/binaryen.js.Markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/binaryen.js.Markdown') 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.) -- cgit v1.2.3