| // beginning a Binaryen API trace |
| #include <math.h> |
| #include <map> |
| #include "binaryen-c.h" |
| int main() { |
| std::map<size_t, BinaryenExpressionRef> expressions; |
| std::map<size_t, BinaryenFunctionRef> functions; |
| std::map<size_t, BinaryenGlobalRef> globals; |
| std::map<size_t, BinaryenEventRef> events; |
| std::map<size_t, BinaryenExportRef> exports; |
| std::map<size_t, RelooperBlockRef> relooperBlocks; |
| BinaryenModuleRef the_module = NULL; |
| RelooperRef the_relooper = NULL; |
| BinaryenGetPassArgument("theKey"); |
| BinaryenSetPassArgument("theKey", "theValue"); |
| BinaryenGetPassArgument("theKey"); |
| BinaryenSetPassArgument("theKey", NULL); |
| BinaryenGetPassArgument("theKey"); |
| BinaryenSetPassArgument("theKey", "theValue2"); |
| BinaryenGetPassArgument("theKey"); |
| BinaryenClearPassArguments(); |
| BinaryenGetPassArgument("theKey"); |
| return 0; |
| } |
| // ending a Binaryen API trace |