diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-05-13 10:33:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 10:33:55 -0700 |
commit | 67019f9a72175bc7a098d72aa14a6f6afeb2efce (patch) | |
tree | 83adc3d4a235c00f6bf545fc5aeeeadb8f1a5663 /src/binaryen-c.h | |
parent | a1ff274b6bca0ff8d1635c32a6d206863f0a2fc3 (diff) | |
download | binaryen-67019f9a72175bc7a098d72aa14a6f6afeb2efce.tar.gz binaryen-67019f9a72175bc7a098d72aa14a6f6afeb2efce.tar.bz2 binaryen-67019f9a72175bc7a098d72aa14a6f6afeb2efce.zip |
Add missing methods for globals to binaryen.js (#2099)
- Print `globals` array in the tracing mode like other arrays
(`functions`, `exports`, `imports`, ...)
- Add accessor functions for globals
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r-- | src/binaryen-c.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h index 62ffa4348..310ca3a2a 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -1105,6 +1105,21 @@ void BinaryenFunctionSetDebugLocation(BinaryenFunctionRef func, BinaryenIndex columnNumber); // +// ========== Global Operations ========== +// + +// Gets the name of the specified `Global`. +const char* BinaryenGlobalGetName(BinaryenGlobalRef global); +// Gets the name of the `GlobalType` associated with the specified `Global`. May +// be `NULL` if the signature is implicit. +BinaryenType BinaryenGlobalGetType(BinaryenGlobalRef global); +// Returns true if the specified `Global` is mutable. +int BinaryenGlobalIsMutable(BinaryenGlobalRef global); +// Gets the initialization expression of the specified `Global`. +BinaryenExpressionRef BinaryenGlobalGetInitExpr(BinaryenGlobalRef global); + +// +// // ========== Import Operations ========== // |