Skip to content

Request: Add global variable support to binaryen.js #1028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dcodeIO opened this issue May 27, 2017 · 0 comments
Closed

Request: Add global variable support to binaryen.js #1028

dcodeIO opened this issue May 27, 2017 · 0 comments

Comments

@dcodeIO
Copy link
Contributor

dcodeIO commented May 27, 2017

It seems that setGlobal and getGlobal are not supported by binaryen.js.

Opening this issue in the hope that someone more familiar with the code finds some time to add it.

dcodeIO added a commit to dcodeIO/binaryen that referenced this issue Jun 7, 2017
…bly#1029

This PR adds global variable support (addGlobal, getGlobal, setGlobal), host operations (currentMemory, growMemory), a few utility functions (removeImport, removeExport, getFunctionTypeBySignature with the latter being scheduled for removal once a better alternative is in place) and it introduces an additional argument to specify the result type in BinaryenBlock (effectively breaking the C-API but retaining previous behaviour by introducing the BinaryenUndefined() type for this purpose). Additionally, it enables compilation with exception support in build-js.sh as exceptions are thrown and caught when optimizing endless loops, intentionally resulting in an unreachable opcode. Affected test cases have been updated accordingly.
@kripken kripken closed this as completed in 2c220f5 Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant