{"name":"binaryen","version":"58.0.0-nightly.20181208","keywords":["webassembly","wasm"],"license":"Apache-2.0","_id":"binaryen@58.0.0-nightly.20181208","maintainers":[{"name":"assemblyscript","email":"dcode+assemblyscript@dcode.io"},{"name":"dcode","email":"dcode+npm@dcode.io"}],"homepage":"https://github.com/AssemblyScript/binaryen.js#readme","bugs":{"url":"https://github.com/AssemblyScript/binaryen.js/issues"},"bin":{"binaryen-as":"bin/as.js","binaryen-dis":"bin/dis.js","binaryen-opt":"bin/opt.js"},"dist":{"shasum":"f939a174e2ac4c8ab743d5e27bc586908d8cdc33","tarball":"http://registry-npm.ywwl.com/binaryen/download/binaryen-58.0.0-nightly.20181208.tgz","fileCount":9,"integrity":"sha512-7rFS05qZiGa0h5cmPfuIR22Ls0UTzL53ELnYIBhkWqBsZH4bu4nPkxBsrvZFvnUgt6xkreJYiQeMA4dlrozagg==","signatures":[{"sig":"MEUCIH1lvlyJZr2g75TBul5ZipchOazxGhcYQ0BXi+I8kc/tAiEAlH4X4DeWKe8nTU+zltAWvEWDI8mdI+5OJKBv8oLajds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3208833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcC+VMCRA9TVsSAnZWagAAjAAP/RcR9bY1qEIl/ZnzmbSs\nGiXEE9M6PN9DwiOKd2b+ZfKOv+z5jnpSgiqk6snLPQZF+zj+buV7/twmBbct\nnrVXDbtIWb0g0uJUeFnU5cO8gd/PZHTzSrCqv9f51zQtVYjiRh4rTw0ap/Ds\n8XEjVEjYbPqWD9VTifk4y3UevVrI0eNXTw7GmKQx0d1fivQDhpq7GiYsmmvM\nfW7oJmUy5oxvr2pwWt8OaaXm+3rSUzRzZWokXY5JvekPl4unc87lvm1G6SB9\nMRc+LFSGmg8CQpajEG/QcgR5mX+EV33GkPrlSKr/hDIxm9dMbQkA61nDiJ5k\nsyGdZnyBME10n0sZJ/Y4UwbcNHoiAYD7d24jtsppkcE4AxtoT2sN1Phq+dJz\nAFCzWPQclosLBLQB+vqnYCU78xIR2VC8quf8HHc1jdCNUrisr6v2rh/mnAtj\nY483BN7zksMHtWxMXlingi7fohq8irB+a4d3ci3zbycMBQkBgME6eli2lurW\n05Vx4JU3INQLhr/UN3dXLTqQmX9h5VAxwgOEMN5haKi14OqzBGFz7A9ZCXLV\nxXSoW89J08OVFecaB19nnb/q6h3RfhMamT3ksMQ1QG19dB5EVyBcRvtsJ2C0\no6369aURYMDC8aw2B5P2zQM5Bp34qfdoyb7Cha+LDAKXH5CbGMvNFX+uQJCr\nTmAK\r\n=SMoq\r\n-----END PGP SIGNATURE-----\r\n","size":669041,"noattachment":false,"key":"/binaryen/-/binaryen-58.0.0-nightly.20181208.tgz"},"main":"index.js","readme":"binaryen.js\n===========\n\n**binaryen.js** is a port of [Binaryen](https://github.com/WebAssembly/binaryen) to the Web, allowing you to generate WebAssembly using a JavaScript API.\n\n[![npm](https://img.shields.io/npm/v/binaryen.svg)](https://www.npmjs.com/package/binaryen) [![npm (tag)](https://img.shields.io/npm/v/binaryen/nightly.svg)](https://www.npmjs.com/package/binaryen) [![Build Status](https://travis-ci.org/AssemblyScript/binaryen.js.svg?branch=master)](https://travis-ci.org/AssemblyScript/binaryen.js)\n\nUsage\n-----\n\n```\n$> npm install binaryen\n```\n\n```js\nvar binaryen = require(\"binaryen\");\n\n// Create a module with a single function\nvar myModule = new binaryen.Module();\n\nmyModule.addFunction(\"add\", myModule.addFunctionType(\"iii\", binaryen.i32, [ binaryen.i32, binaryen.i32 ]), [ binaryen.i32 ],\n  myModule.block(null, [\n    myModule.setLocal(2,\n      myModule.i32.add(\n        myModule.getLocal(0, binaryen.i32),\n        myModule.getLocal(1, binaryen.i32)\n      )\n    ),\n    myModule.return(\n      myModule.getLocal(2, binaryen.i32)\n    )\n  ])\n);\nmyModule.addFunctionExport(\"add\", \"add\");\n\n// Optimize the module using default passes and levels\nmyModule.optimize();\n\n// Validate the module\nif (!myModule.validate())\n  throw new Error(\"validation error\");\n\n// Generate text format and binary\nvar textData = myModule.emitText();\nvar wasmData = myModule.emitBinary();\n\n// Example usage with the WebAssembly API\nvar compiled = new WebAssembly.Module(wasmData);\nvar instance = new WebAssembly.Instance(compiled, {});\nconsole.log(instance.exports.add(41, 1));\n```\n\nThe buildbot also publishes nightly versions once a day if there have been changes. The latest nightly can be installed through\n\n```\n$> npm install binaryen@nightly\n```\n\nor you can use one of the [previous versions](https://github.com/AssemblyScript/binaryen.js/tags) instead if necessary.\n\n### Usage with a CDN\n\n  * From GitHub via [jsDelivr](https://www.jsdelivr.com):<br />\n    `https://cdn.jsdelivr.net/gh/AssemblyScript/binaryen.js@VERSION/index.js`\n  * From npm via [jsDelivr](https://www.jsdelivr.com):<br />\n    `https://cdn.jsdelivr.net/npm/binaryen@VERSION/index.js`\n  * From npm via [UNPKG](https://unpkg.com):<br />\n    `https://unpkg.com/binaryen@VERSION/index.js`\n\n  Replace `VERSION` with a [specific version](https://github.com/AssemblyScript/binaryen.js/releases) or omit it (not recommended in production) to use master/latest.\n\nAPI\n---\n<!-- START API.md -->\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n### Contents\n\n- [Types](#types)\n- [Module construction](#module-construction)\n- [Module manipulation](#module-manipulation)\n- [Module validation](#module-validation)\n- [Module optimization](#module-optimization)\n- [Module creation](#module-creation)\n- [Expression construction](#expression-construction)\n  - [Control flow](#control-flow)\n  - [Constants](#constants)\n  - [Variable accesses](#variable-accesses)\n  - [Integer operations](#integer-operations)\n  - [Floating point operations](#floating-point-operations)\n  - [Datatype conversions](#datatype-conversions)\n  - [Function calls](#function-calls)\n  - [Linear memory accesses](#linear-memory-accesses)\n  - [Host operations](#host-operations)\n  - [Atomic memory accesses 🦄](#atomic-memory-accesses-)\n  - [Atomic read-modify-write operations 🦄](#atomic-read-modify-write-operations-)\n  - [Atomic wait and wake operations 🦄](#atomic-wait-and-wake-operations-)\n  - [Sign extension operations 🦄](#sign-extension-operations-)\n- [Expression manipulation](#expression-manipulation)\n- [Relooper](#relooper)\n- [Source maps](#source-maps)\n- [Debugging](#debugging)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n[Future features](http://webassembly.org/docs/future-features/) 🦄 might not be supported by all runtimes.\n\n### Types\n\n * **none**: `Type`<br />\n   The none type, e.g., `void`.\n\n * **i32**: `Type`<br />\n   32-bit integer type.\n\n * **i64**: `Type`<br />\n   64-bit integer type.\n\n * **f32**: `Type`<br />\n   32-bit float type.\n\n * **f64**: `Type`<br />\n   64-bit float (double) type.\n\n * **auto**: `Type`<br />\n   Special type used in **Module#block** exclusively. Lets the API figure out a block's result type automatically.\n\n * **unreachable**: `Type`<br />\n   Special type indicating unreachable code when obtaining information about an expression.\n\n### Module construction\n\n * new **Module**(): `Module`<br />\n   Constructs a new module.\n\n * **parseText**(text: `string`): `Module`<br />\n   Creates a module from Binaryen's s-expression text format (not official stack-style text format).\n\n * **readBinary**(data: `Uint8Array`): `Module`<br />\n   Creates a module from binary data.\n\n * **wrapModule**(ptr: `number`): `Module`<br />\n   Wraps a module pointer as used with the underlying C-API as a JS module object.\n\n### Module manipulation\n\n* Module#**addFunctionType**(name: `string`, resultType: `Type`, paramTypes: `Type[]`): `Signature`<br />\n  Adds a new function type.\n\n* Module#**getFunctionTypeBySignature**(resultType: `Type`, paramTypes: `Type[]`): `Signature`<br />\n  Gets an existing function type by its parametric signature. Returns `0` if there is no such function type.\n\n* Module#**removeFunctionType**(name: `string`): `void`<br />\n  Removes a function type.\n\n* Module#**addFunction**(name: `string`, functionType: `Signature`, varTypes: `Type[]`, body: `Expression`): `Function`<br />\n  Adds a function. `varTypes` indicate additional locals, in the given order.\n\n* Module#**getFunction**(name: `string`): `Function`<br />\n  Gets a function, by name,\n\n* Module#**removeFunction**(name: `string`): `void`<br />\n  Removes a function, by name.\n\n* Module#**addFunctionImport**(internalName: `string`, externalModuleName: `string`, externalBaseName: `string`, functionType: `Signature`): `Import`<br />\n  Adds a function import.\n\n* Module#**addTableImport**(internalName: `string`, externalModuleName: `string`, externalBaseName: `string`): `Import`<br />\n  Adds a table import. There's just one table for now, using name `\"0\"`.\n\n* Module#**addMemoryImport**(internalName: `string`, externalModuleName: `string`, externalBaseName: `string`): `Import`<br />\n  Adds a memory import. There's just one memory for now, using name `\"0\"`.\n\n* Module#**addGlobalImport**(internalName: `string`, externalModuleName: `string`, externalBaseName: `string`, globalType: `Type`): `Import`<br />\n  Adds a global variable import. Imported globals must be immutable.\n\n* Module#**addFunctionExport**(internalName: `string`, externalName: `string`): `Export`<br />\n  Adds a function export.\n\n* Module#**addTableExport**(internalName: `string`, externalName: `string`): `Export`<br />\n  Adds a table export. There's just one table for now, using name `\"0\"`.\n\n* Module#**addMemoryExport**(internalName: `string`, externalName: `string`): `Export`<br />\n  Adds a memory export. There's just one memory for now, using name `\"0\"`.\n\n* Module#**addGlobalExport**(internalName: `string`, externalName: `string`): `Export`<br />\n  Adds a global variable export. Exported globals must be immutable.\n\n* Module#**addGlobal**(name: `string`, type: `Type`, mutable: `number`, value: `Expression`): `Global`<br />\n  Adds a global instance variable.\n\n* Module#**removeExport**(externalName: `string`): `void`<br />\n  Removes an export, by external name.\n\n* Module#**setFunctionTable**(initial: `number`, maximum: `number`, funcs: `string[]`): `void`<br />\n  Sets the contents of the function table. There's just one table for now, using name `\"0\"`.\n\n* Module#**setMemory**(initial: `number`, maximum: `number`, exportName: `string | null`, segments: `MemorySegment[]`): `void`<br />\n  Sets the memory. There's just one memory for now, using name `\"0\"`. Providing `exportName` also creates a memory export.\n\n* Module#**setStart**(start: `Function`): `void`<br />\n  Sets the start function.\n\n* Module#**autoDrop**(): `void`<br />\n  Enables automatic insertion of `drop` operations where needed. Lets you not worry about dropping when creating your code.\n\n* **getFunctionTypeInfo**(ftype: `FunctionType`: `FunctionTypeInfo`<br />\n  Obtains information about a function type.\n\n  * FunctionTypeInfo#**name**: `string | null`\n  * FunctionTypeInfo#**params**: `Type[]`\n  * FunctionTypeInfo#**result**: `Type`\n\n* **getFunctionInfo**(ftype: `Function`: `FunctionInfo`<br />\n  Obtains information about a function.\n\n  * FunctionInfo#**name**: `string`\n  * FunctionInfo#**module**: `string | null` (if imported)\n  * FunctionInfo#**base**: `string | null` (if imported)\n  * FunctionInfo#**type**: `FunctionType`\n  * FunctionInfo#**params**: `Type[]`\n  * FunctionInfo#**result**: `Type`\n  * FunctionInfo#**vars**: `Type`\n  * FunctionInfo#**body**: `Expression`\n\n* **getGlobalInfo**(global: `Global`): `GlobalInfo`<br />\n  Obtains information about an import, always including:\n\n  * GlobalInfo#**name**: `string`\n  * GlobalInfo#**module**: `string | null` (if imported)\n  * GlobalInfo#**base**: `string | null` (if imported)\n  * GlobalInfo#**type**: `Type`\n\n* **getExportInfo**(export_: `Export`): `ExportInfo`<br />\n  Obtains information about an export.\n\n  * ExportInfo#**kind**: `ExternalKind`\n  * ExportInfo#**name**: `string`\n  * ExportInfo#**value**: `string`\n\n  Possible `ExternalKind` values are:\n\n  * **ExternalFunction**: `ExternalKind`\n  * **ExternalTable**: `ExternalKind`\n  * **ExternalMemory**: `ExternalKind`\n  * **ExternalGlobal**: `ExternalKind`\n\n### Module validation\n\n* Module#**validate**(): `boolean`<br />\n  Validates the module. Returns `true` if valid, otherwise prints validation errors and returns `false`.\n\n### Module optimization\n\n* Module#**optimize**(): `void`<br />\n  Optimizes the module using the default optimization passes.\n\n* Module#**optimizeFunction**(func: `Function | string`): `void`<br />\n  Optimizes a single function using the default optimization passes.\n\n* Module#**runPasses**(passes: `string[]`): `void`<br />\n  Runs the specified passes on the module.\n\n* Module#**runPassesOnFunction**(func: `Function | string`, passes: `string[]`): `void`<br />\n  Runs the specified passes on a single function.\n\n* **getOptimizeLevel**(): `number`<br />\n  Gets the currently set optimize level. `0`, `1`, `2` correspond to `-O0`, `-O1`, `-O2` (default), etc.\n\n* **setOptimizeLevel**(level: `number`): `void`<br />\n  Sets the optimization level to use. `0`, `1`, `2` correspond to `-O0`, `-O1`, `-O2` (default), etc.\n\n* **getShrinkLevel**(): `number`<br />\n  Gets the currently set shrink level. `0`, `1`, `2` correspond to `-O0`, `-Os` (default), `-Oz`.\n\n* **setShrinkLevel**(level: `number`): `void`<br />\n  Sets the shrink level to use. `0`, `1`, `2` correspond to `-O0`, `-Os` (default), `-Oz`.\n\n* **getDebugInfo**(): `boolean`<br />\n  Gets whether generating debug information is currently enabled or not.\n\n* **setDebugInfo**(on: `boolean`): `void`<br />\n  Enables or disables debug information in emitted binaries.\n\n### Module creation\n\n* Module#**emitBinary**(): `Uint8Array`<br />\n  Returns the module in binary format.\n\n* Module#**emitBinary**(sourceMapUrl: `string | null`): `BinaryWithSourceMap`<br />\n  Returns the module in binary format with its source map. If `sourceMapUrl` is `null`, source map generation is skipped.\n\n  * BinaryWithSourceMap#**binary**: `Uint8Array`\n  * BinaryWithSourceMap#**sourceMap**: `string | null`\n\n* Module#**emitText**(): `string`<br />\n  Returns the module in Binaryen's s-expression text format (not official stack-style text format).\n\n* Module#**emitAsmjs**(): `string`<br />\n  Returns the [asm.js](http://asmjs.org/) representation of the module.\n\n* Module#**dispose**(): `void`<br />\n  Releases the resources held by the module once it isn't needed anymore.\n\n### Expression construction\n\n#### [Control flow](http://webassembly.org/docs/semantics/#control-constructs-and-instructions)\n\n* Module#**block**(label: `string | null`, children: `Expression[]`, resultType?: `Type`): `Expression`<br />\n  Creates a block. `resultType` defaults to `none`.\n\n* Module#**if**(condition: `Expression`, ifTrue: `Expression`, ifFalse?: `Expression`): `Expression`<br />\n  Creates an if or if/else combination.\n\n* Module#**loop**(label: `string | null`, body: `Expression`): `Expression`<br />\n  Creates a loop.\n\n* Module#**break**(label: `string`, condition?: `Expression`, value?: `Expression`): `Expression`<br />\n  Creates a break (br) to a label.\n\n* Module#**switch**(labels: `string[]`, defaultLabel: `string`, condition: `Expression`, value?: `Expression`): `Expression`<br />\n  Creates a switch (br_table).\n\n* Module#**nop**(): `Expression`<br />\n  Creates a no-operation (nop) instruction.\n\n* Module#**return**(value?: `Expression`): `Expression`\n  Creates a return.\n\n* Module#**unreachable**(): `Expression`<br />\n  Creates an [unreachable](http://webassembly.org/docs/semantics/#unreachable) instruction that will always trap.\n\n* Module#**drop**(value: `Expression`): `Expression`<br />\n  Creates a [drop](http://webassembly.org/docs/semantics/#type-parametric-operators) of a value.\n\n* Module#**select**(condition: `Expression`, ifTrue: `Expression`, ifFalse: `Expression`): `Expression`<br />\n  Creates a [select](http://webassembly.org/docs/semantics/#type-parametric-operators) of one of two values.\n\n#### [Constants](http://webassembly.org/docs/semantics/#constants)\n\n* Module#i32.**const**(value: `number`): `Expression`\n>\n* Module#i64.**const**(low: `number`, high: `number`): `Expression`\n>\n* Module#f32.**const**(value: `number`): `Expression`\n* Module#f32.**const_bits**(value: `number`): `Expression`\n>\n* Module#f64.**const**(value: `number`): `Expression`\n* Module#f64.**const_bits**(low: `number`, high: `number`): `Expression`\n\n#### [Variable accesses](http://webassembly.org/docs/semantics/#local-variables)\n\n* Module#**get_local/getLocal**(index: `number`, type: `Type`): `Expression`<br />\n  Creates a get_local for the local at the specified index. Note that we must specify the type here as we may not have created the local being called yet.\n\n* Module#**set_local/setLocal**(index: `number`, value: `Expression`): `Expression`<br />\n  Creates a set_local for the local at the specified index.\n\n* Module#**tee_local/teeLocal**(index: `number`, value: `Expression`): `Expression`<br />\n  Creates a tee_local for the local at the specified index. A tee differs from a set in that the value remains on the stack.\n\n* Module#**get_global/getGlobal**(name: `string`, type: `Type`): `Expression`<br />\n  Creates a get_global for the global with the specified name. Note that we must specify the type here as we may not have created the global being called yet.\n\n* Module#**set_global/setGlobal**(name: `string`, value: `Expression`): `Expression`<br />\n  Creates a set_global for the global with the specified name.\n\n#### [Integer operations](http://webassembly.org/docs/semantics/#32-bit-integer-operators)\n\n* Module#i32.**clz**(value: `Expression`): `Expression`\n* Module#i32.**ctz**(value: `Expression`): `Expression`\n* Module#i32.**popcnt**(value: `Expression`): `Expression`\n* Module#i32.**eqz**(value: `Expression`): `Expression`\n* Module#i32.**add**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**sub**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**mul**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**div_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**div_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**rem_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**rem_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**and**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**or**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**xor**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**shl**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**shr_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**shr_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**rotl**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**rotr**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**eq**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**ne**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**lt_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**lt_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**le_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**le_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**gt_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**gt_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**ge_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i32.**ge_u**(left: `Expression`, right: `Expression`): `Expression`\n>\n* Module#i64.**clz**(value: `Expression`): `Expression`\n* Module#i64.**ctz**(value: `Expression`): `Expression`\n* Module#i64.**popcnt**(value: `Expression`): `Expression`\n* Module#i64.**eqz**(value: `Expression`): `Expression`\n* Module#i64.**add**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**sub**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**mul**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**div_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**div_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**rem_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**rem_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**and**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**or**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**xor**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**shl**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**shr_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**shr_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**rotl**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**rotr**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**eq**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**ne**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**lt_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**lt_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**le_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**le_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**gt_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**gt_u**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**ge_s**(left: `Expression`, right: `Expression`): `Expression`\n* Module#i64.**ge_u**(left: `Expression`, right: `Expression`): `Expression`\n\n#### [Floating point operations](http://webassembly.org/docs/semantics/#floating-point-operators)\n\n* Module#f32.**neg**(value: `Expression`): `Expression`\n* Module#f32.**abs**(value: `Expression`): `Expression`\n* Module#f32.**ceil**(value: `Expression`): `Expression`\n* Module#f32.**floor**(value: `Expression`): `Expression`\n* Module#f32.**trunc**(value: `Expression`): `Expression`\n* Module#f32.**nearest**(value: `Expression`): `Expression`\n* Module#f32.**sqrt**(value: `Expression`): `Expression`\n* Module#f32.**add**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**sub**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**mul**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**div**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**copysign**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**min**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**max**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**eq**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**ne**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**lt**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**le**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**gt**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f32.**ge**(left: `Expression`, right: `Expression`): `Expression`\n>\n* Module#f64.**neg**(value: `Expression`): `Expression`\n* Module#f64.**abs**(value: `Expression`): `Expression`\n* Module#f64.**ceil**(value: `Expression`): `Expression`\n* Module#f64.**floor**(value: `Expression`): `Expression`\n* Module#f64.**trunc**(value: `Expression`): `Expression`\n* Module#f64.**nearest**(value: `Expression`): `Expression`\n* Module#f64.**sqrt**(value: `Expression`): `Expression`\n* Module#f64.**add**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**sub**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**mul**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**div**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**copysign**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**min**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**max**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**eq**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**ne**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**lt**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**le**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**gt**(left: `Expression`, right: `Expression`): `Expression`\n* Module#f64.**ge**(left: `Expression`, right: `Expression`): `Expression`\n\n#### [Datatype conversions](http://webassembly.org/docs/semantics/#datatype-conversions-truncations-reinterpretations-promotions-and-demotions)\n\n* Module#i32.**trunc_s.f32**(value: `Expression`): `Expression`\n* Module#i32.**trunc_s.f64**(value: `Expression`): `Expression`\n* Module#i32.**trunc_u.f32**(value: `Expression`): `Expression`\n* Module#i32.**trunc_u.f64**(value: `Expression`): `Expression`\n* Module#i32.**reinterpret**(value: `Expression`): `Expression`\n* Module#i32.**wrap**(value: `Expression`): `Expression`\n>\n* Module#i64.**trunc_s.f32**(value: `Expression`): `Expression`\n* Module#i64.**trunc_s.f64**(value: `Expression`): `Expression`\n* Module#i64.**trunc_u.f32**(value: `Expression`): `Expression`\n* Module#i64.**trunc_u.f64**(value: `Expression`): `Expression`\n* Module#i64.**reinterpret**(value: `Expression`): `Expression`\n* Module#i64.**extend_s**(value: `Expression`): `Expression`\n* Module#i64.**extend_u**(value: `Expression`): `Expression`\n>\n* Module#f32.**reinterpret**(value: `Expression`): `Expression`\n* Module#f32.**convert_s.i32**(value: `Expression`): `Expression`\n* Module#f32.**convert_s.i64**(value: `Expression`): `Expression`\n* Module#f32.**convert_u.i32**(value: `Expression`): `Expression`\n* Module#f32.**convert_u.i64**(value: `Expression`): `Expression`\n* Module#f32.**demote**(value: `Expression`): `Expression`\n>\n* Module#f64.**reinterpret**(value: `Expression`): `Expression`\n* Module#f64.**convert_s.i32**(value: `Expression`): `Expression`\n* Module#f64.**convert_s.i64**(value: `Expression`): `Expression`\n* Module#f64.**convert_u.i32**(value: `Expression`): `Expression`\n* Module#f64.**convert_u.i64**(value: `Expression`): `Expression`\n* Module#f64.**promote**(value: `Expression`): `Expression`\n\n#### [Function calls](http://webassembly.org/docs/semantics/#calls)\n\n* Module#**call**(name: `string`, operands: `Expression[]`, returnType: `Type`): `Expression`<br />\n  Creates a call to a function. Note that we must specify the return type here as we may not have created the function being called yet.\n\n* Module#**call_indirect/callIndirect**(target: `Expression`, operands: `Expression[]`, returnType: `Type`): `Expression`<br />\n  Similar to **call**, but calls indirectly, i.e., via a function pointer, so an expression replaces the name as the called value.\n\n#### [Linear memory accesses](http://webassembly.org/docs/semantics/#linear-memory-accesses)\n\n* Module#i32.**load**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`<br />\n* Module#i32.**load8_s**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`<br />\n* Module#i32.**load8_u**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`<br />\n* Module#i32.**load16_s**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`<br />\n* Module#i32.**load16_u**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`<br />\n* Module#i32.**store**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`<br />\n* Module#i32.**store8**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`<br />\n* Module#i32.**store16**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`<br />\n>\n* Module#i64.**load**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**load8_s**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**load8_u**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**load16_s**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**load16_u**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**load32_s**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**load32_u**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**store**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**store8**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**store16**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**store32**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n>\n* Module#f32.**load**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#f32.**store**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n>\n* Module#f64.**load**(offset: `number`, align: `number`, ptr: `Expression`): `Expression`\n* Module#f64.**store**(offset: `number`, align: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n\n#### [Host operations](http://webassembly.org/docs/semantics/#resizing)\n\n* Module#**current_memory/currentMemory**(): `Expression`\n* Module#**grow_memory/growMemory**(value: `number`): `Expression`\n\n#### [Atomic memory accesses](https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#atomic-memory-accesses) 🦄\n\n* Module#i32.**atomic.load**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i32.**atomic.load8_u**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i32.**atomic.load16_u**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i32.**atomic.store**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.store8**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.store16**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n>\n* Module#i64.**atomic.load**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**atomic.load8_u**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**atomic.load16_u**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**atomic.load32_u**(offset: `number`, ptr: `Expression`): `Expression`\n* Module#i64.**atomic.store**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.store8**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.store16**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.store32**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n\n#### [Atomic read-modify-write operations](https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#read-modify-write) 🦄\n\n* Module#i32.**atomic.rmw.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw8_u.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i32.**atomic.rmw16_u.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n>\n* Module#i64.**atomic.rmw.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw8_u.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw16_u.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.add**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.sub**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.and**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.or**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.xor**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.xchg**(offset: `number`, ptr: `Expression`, value: `Expression`): `Expression`\n* Module#i64.**atomic.rmw32_u.cmpxchg**(offset: `number`, ptr: `Expression`, expected: `Expression`, replacement: `Expression`): `Expression`\n\n#### [Atomic wait and wake operations](https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait-and-wake-operators) 🦄\n\n* Module#i32.**wait**(ptr: `Expression`, expected: `Expression`, timeout: `Expression`): `Expression`\n* Module#i64.**wait**(ptr: `Expression`, expected: `Expression`, timeout: `Expression`): `Expression`\n* Module#**wake**(ptr: `Expression`, wakeCount: `Expression`): `Expression`\n\n#### [Sign extension operations](https://github.com/WebAssembly/sign-extension-ops/blob/master/proposals/sign-extension-ops/Overview.md) 🦄\n\n* Module#i32.**extend8_s**(value: `Expression`): `Expression`\n* Module#i32.**extend16_s**(value: `Expression`): `Expression`\n>\n* Module#i64.**extend8_s**(value: `Expression`): `Expression`\n* Module#i64.**extend16_s**(value: `Expression`): `Expression`\n* Module#i64.**extend32_s**(value: `Expression`): `Expression`\n\n### Expression manipulation\n\n* **getExpressionId**(expr: `Expression`): `ExpressionId`<br />\n  Gets the id (kind) of the specified expression. Possible values are:\n\n  * **InvalidId**: `ExpressionId`\n  * **BlockId**: `ExpressionId`\n  * **IfId**: `ExpressionId`\n  * **LoopId**: `ExpressionId`\n  * **BreakId**: `ExpressionId`\n  * **SwitchId**: `ExpressionId`\n  * **CallId**: `ExpressionId`\n  * **CallImportId**: `ExpressionId`\n  * **CallIndirectId**: `ExpressionId`\n  * **GetLocalId**: `ExpressionId`\n  * **SetLocalId**: `ExpressionId`\n  * **GetGlobalId**: `ExpressionId`\n  * **SetGlobalId**: `ExpressionId`\n  * **LoadId**: `ExpressionId`\n  * **StoreId**: `ExpressionId`\n  * **ConstId**: `ExpressionId`\n  * **UnaryId**: `ExpressionId`\n  * **BinaryId**: `ExpressionId`\n  * **SelectId**: `ExpressionId`\n  * **DropId**: `ExpressionId`\n  * **ReturnId**: `ExpressionId`\n  * **HostId**: `ExpressionId`\n  * **NopId**: `ExpressionId`\n  * **UnreachableId**: `ExpressionId`\n  * **AtomicCmpxchgId**: `ExpressionId`\n  * **AtomicRMWId**: `ExpressionId`\n  * **AtomicWaitId**: `ExpressionId`\n  * **AtomicWakeId**: `ExpressionId`\n\n* **getExpressionType**(expr: `Expression`): `Type`<br />\n  Gets the type of the specified expression.\n\n* **getExpressionInfo**(expr: `Expression`: `ExpressionInfo`<br />\n  Obtains information about an expression, always including:\n\n  * Info#**id**: `ExpressionId`\n  * Info#**type**: `Type`\n\n  Additional properties depend on the expression's `id` and are usually equivalent to the respective parameters when creating such an expression:\n\n  * BlockInfo#**name**: `string`\n  * BlockInfo#**children**: `Expression[]`\n  >\n  * IfInfo#**condition**: `Expression`\n  * IfInfo#**ifTrue**: `Expression`\n  * IfInfo#**ifFalse**: `Expression | null`\n  >\n  * LoopInfo#**name**: `string`\n  * LoopInfo#**body**: `Expression`\n  >\n  * BreakInfo#**name**: `string`\n  * BreakInfo#**condition**: `Expression | null`\n  * BreakInfo#**value**: `Expression | null`\n  >\n  * SwitchInfo#**names**: `string[]`\n  * SwitchInfo#**defaultName**: `string | null`\n  * SwitchInfo#**condition**: `Expression`\n  * SwitchInfo#**value**: `Expression | null`\n  >\n  * CallInfo#**target**: `string`\n  * CallInfo#**operands**: `Expression[]`\n  >\n  * CallImportInfo#**target**: `string`\n  * CallImportInfo#**operands**: `Expression[]`\n  >\n  * CallIndirectInfo#**target**: `Expression`\n  * CallIndirectInfo#**operands**: `Expression[]`\n  >\n  * GetLocalInfo#**index**: `number`\n  >\n  * SetLocalInfo#**isTee**: `boolean`\n  * SetLocalInfo#**index**: `number`\n  * SetLocalInfo#**value**: `Expression`\n  >\n  * GetGlobalInfo#**name**: `string`\n  >\n  * SetGlobalInfo#**name**: `string`\n  * SetGlobalValue#**value**: `Expression`\n  >\n  * LoadInfo#**isAtomic**: `boolean`\n  * LoadInfo#**isSigned**: `boolean`\n  * LoadInfo#**offset**: `number`\n  * LoadInfo#**bytes**: `number`\n  * LoadInfo#**align**: `number`\n  * LoadInfo#**ptr**: `Expression`\n  >\n  * StoreInfo#**isAtomic**: `boolean`\n  * StoreInfo#**offset**: `number`\n  * StoreInfo#**bytes**: `number`\n  * StoreInfo#**align**: `number`\n  * StoreInfo#**ptr**: `Expression`\n  * StoreInfo#**value**: `Expression`\n  >\n  * ConstInfo#**value**: `number | { low: number, high: number }`\n  >\n  * UnaryInfo#**op**: `number`\n  * UnaryInfo#**value**: `Expression`\n  >\n  * BinaryInfo#**op**: `number`\n  * BinaryInfo#**left**: `Expression`\n  * BinaryInfo#**right**: `Expression`\n  >\n  * SelectInfo#**ifTrue**: `Expression`\n  * SelectInfo#**ifFalse**: `Expression`\n  * SelectInfo#**condition**: `Expression`\n  >\n  * DropInfo#**value**: `Expression`\n  >\n  * ReturnInfo#**value**: `Expression | null`\n  >\n  * HostInfo#**op**: `number`\n  * HostInfo#**nameOperand**: `string | null`\n  * HostInfo#**operands**: `Expression[]`\n  >\n  * AtomicRMWInfo#**op**: `number`\n  * AtomicRMWInfo#**bytes**: `number`\n  * AtomicRMWInfo#**offset**: `number`\n  * AtomicRMWInfo#**ptr**: `Expression`\n  * AtomicRMWInfo#**value**: `Expression`\n  >\n  * AtomicCmpxchgInfo#**bytes**: `number`\n  * AtomicCmpxchgInfo#**offset**: `number`\n  * AtomicCmpxchgInfo#**ptr**: `Expression`\n  * AtomicCmpxchgInfo#**expected**: `Expression`\n  * AtomicCmpxchgInfo#**replacement**: `Expression`\n  >\n  * AtomicWaitInfo#**ptr**: `Expression`\n  * AtomicWaitInfo#**expected**: `Expression`\n  * AtomicWaitInfo#**timeout**: `Expression`\n  * AtomicWaitInfo#**expectedType**: `Type`\n  >\n  * AtomicWakeInfo#**ptr**: `Expression`\n  * AtomicWakeInfo#**wakeCount**: `Expression`\n\n  NopInfo and UnreachableInfo do not include any additional properties.\n\n### Relooper\n\n* new **Relooper**(module: `Module`): `Relooper`<br />\n  Constructs a relooper instance. This lets you provide an arbitrary CFG, and the relooper will structure it for WebAssembly.\n\n* Relooper#**addBlock**(code: `Expression`): `RelooperBlock`<br />\n  Adds a new block to the CFG, containing the provided code as its body.\n\n* Relooper#**addBranch**(from: `RelooperBlock`, to: `RelooperBlock`, condition: `Expression`, code: `Expression`): `void`<br />\n  Adds a branch from a block to another block, with a condition (or nothing, if this is the default branch to take from the origin - each block must have one such branch), and optional code to execute on the branch (useful for phis).\n\n* Relooper#**addBlockWithSwitch**(code: `Expression`, condition: `Expression`): `RelooperBlock`<br />\n  Adds a new block, which ends with a switch/br_table, with provided code and condition (that determines where we go in the switch).\n\n* Relooper#**addBranchForSwitch**(from: `RelooperBlock`, to: `RelooperBlock`, indexes: `number[]`, code: `Expression`): `void`<br />\n  Adds a branch from a block ending in a switch, to another block, using an array of indexes that determine where to go, and optional code to execute on the branch.\n\n* Relooper#**renderAndDispose**(entry: `RelooperBlock`, labelHelper: `number`): `Expression`<br />\n  Renders and cleans up the Relooper instance. Call this after you have created all the blocks and branches, giving it the entry block (where control flow begins) and a label helper variable (an index of a local we can use, necessary for irreducible control flow). This returns an expression - normal WebAssembly code - that you can use normally anywhere.\n\n### Source maps\n\n* Module#**addDebugInfoFileName**(filename: `string`): `number`<br />\n  Adds a debug info file name to the module and returns its index.\n\n* Module#**getDebugInfoFileName**(index: `number`): `string | null` <br />\n  Gets the name of the debug info file at the specified index.\n\n* Module#**setDebugLocation**(func: `Function`, expr: `Expression`, fileIndex: `number`, lineNumber: `number`, columnNumber: `number`): `void`<br />\n  Sets the debug location of the specified `Expression` within the specified `Function`.\n\n### Debugging\n\n* Module#**setAPITracing**(on: `boolean`): `void`<br />\n  Enables tracing of the C-API in the console. Can be very useful when filing bug reports.\n\n* Module#**interpret**(): `void`<br />\n  Runs the module in the interpreter, calling the start function.\n\n<!-- END API.md -->\n\nBuilding\n--------\n\nClone the GitHub repository including submodules and install the development dependencies:\n\n```\n$> git clone --recursive https://github.com/AssemblyScript/binaryen.js.git\n$> cd binaryen.js\n$> npm install\n```\n\nMake sure [Emscripten](https://github.com/kripken/emscripten) is properly set up on your system.\n\nAfterwards, to build the `binaryen` submodule to `index.js`, run:\n\n```\n$> npm run build\n```\n\nTo run the [tests](./tests), do:\n\n```\n$> npm test\n```\n","gitHead":"cf1146c6c0c2a29772d78e83ace68baa8fdb9e3b","scripts":{"test":"npm run test:check && npm run test:binaryen","build":"node scripts/build","readme":"doctoc API.md --github --title \"### Contents\" && node scripts/api","test:check":"tsc index.d.ts --noEmit --strict --noImplicitAny --strictNullChecks --listFiles --diagnostics","test:binaryen":"node tests"},"typings":"index.d.ts","_npmUser":{"name":"assemblyscript","email":"dcode+assemblyscript@dcode.io"},"repository":{"url":"git+https://github.com/AssemblyScript/binaryen.js.git","type":"git"},"_npmVersion":"6.4.1","description":"JavaScript version of Binaryen, a compiler infrastructure and toolchain library for WebAssembly.","directories":{},"_nodeVersion":"8.14.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"glob":"^7.1.3","tape":"^4.9.1","chalk":"^2.4.1","doctoc":"^1.3.1","semver":"^5.5.1","dateformat":"^2.2.0","simple-git":"^1.96.0","typescript":"^2.9.2"},"_npmOperationalInternal":{"tmp":"tmp/binaryen_58.0.0-nightly.20181208_1544283468261_0.7850658692728107","host":"s3://npm-registry-packages"},"publish_time":1544283468490,"_cnpm_publish_time":1544283468490,"dist-tags":{"latest":"132.0.0","nightly":"132.0.0-nightly.20260918"}}