summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r--src/binaryen-c.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index e2086072b..7ca5cd6c7 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -294,14 +294,16 @@ BinaryenExpressionRef BinaryenCallIndirect(BinaryenModuleRef module, BinaryenExp
// for more details.
BinaryenExpressionRef BinaryenGetLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenType type);
BinaryenExpressionRef BinaryenSetLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExpressionRef value);
+BinaryenExpressionRef BinaryenTeeLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExpressionRef value);
// Load: align can be 0, in which case it will be the natural alignment (equal to bytes)
BinaryenExpressionRef BinaryenLoad(BinaryenModuleRef module, uint32_t bytes, int8_t signed_, uint32_t offset, uint32_t align, BinaryenType type, BinaryenExpressionRef ptr);
// Store: align can be 0, in which case it will be the natural alignment (equal to bytes)
-BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uint32_t align, BinaryenExpressionRef ptr, BinaryenExpressionRef value);
+BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uint32_t align, BinaryenExpressionRef ptr, BinaryenExpressionRef value, BinaryenType type);
BinaryenExpressionRef BinaryenConst(BinaryenModuleRef module, struct BinaryenLiteral value);
BinaryenExpressionRef BinaryenUnary(BinaryenModuleRef module, BinaryenOp op, BinaryenExpressionRef value);
BinaryenExpressionRef BinaryenBinary(BinaryenModuleRef module, BinaryenOp op, BinaryenExpressionRef left, BinaryenExpressionRef right);
BinaryenExpressionRef BinaryenSelect(BinaryenModuleRef module, BinaryenExpressionRef condition, BinaryenExpressionRef ifTrue, BinaryenExpressionRef ifFalse);
+BinaryenExpressionRef BinaryenDrop(BinaryenModuleRef module, BinaryenExpressionRef value);
// Return: value can be NULL
BinaryenExpressionRef BinaryenReturn(BinaryenModuleRef module, BinaryenExpressionRef value);
// Host: name may be NULL
@@ -366,6 +368,11 @@ int BinaryenModuleValidate(BinaryenModuleRef module);
// Run the standard optimization passes on the module.
void BinaryenModuleOptimize(BinaryenModuleRef module);
+// Auto-generate drop() operations where needed. This lets you generate code without
+// worrying about where they are needed. (It is more efficient to do it yourself,
+// but simpler to use autodrop).
+void BinaryenModuleAutoDrop(BinaryenModuleRef module);
+
// Serialize a module into binary form.
// @return how many bytes were written. This will be less than or equal to bufferSize
size_t BinaryenModuleWrite(BinaryenModuleRef module, char* output, size_t outputSize);