diff options
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r-- | src/binaryen-c.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h index c136b5f70..88fe8904c 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -371,6 +371,18 @@ BinaryenExpressionId BinaryenExpressionGetId(BinaryenExpressionRef expr); BinaryenType BinaryenExpressionGetType(BinaryenExpressionRef expr); // Print an expression to stdout. Useful for debugging. void BinaryenExpressionPrint(BinaryenExpressionRef expr); +// Gets the 32-bit integer value of the specified `Const` expression. +int32_t BinaryenConstGetValueI32(BinaryenExpressionRef expr); +// Gets the 64-bit integer value of the specified `Const` expression. +int64_t BinaryenConstGetValueI64(BinaryenExpressionRef expr); +// Gets the low 32-bits of a 64-bit integer value of the specified `Const` expression. Useful where I64 returning exports are illegal, i.e. binaryen.js. +int32_t BinaryenConstGetValueI64Low(BinaryenExpressionRef expr); +// Gets the high 32-bits of a 64-bit integer value of the specified `Const` expression. Useful where I64 returning exports are illegal, i.e. binaryen.js. +int32_t BinaryenConstGetValueI64High(BinaryenExpressionRef expr); +// Gets the 32-bit float value of the specified `Const` expression. +float BinaryenConstGetValueF32(BinaryenExpressionRef expr); +// Gets the 64-bit float value of the specified `Const` expression. +double BinaryenConstGetValueF64(BinaryenExpressionRef expr); // Functions |