summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index c030d9d60..b9d0d6822 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1125,6 +1125,7 @@ public:
std::map<Name, Function*> functionsMap;
Table table;
Memory memory;
+ Name start;
Module() : functionTypeIndex(0), importIndex(0), exportIndex(0), functionIndex(0) {}
@@ -1168,6 +1169,9 @@ public:
functionsMap[numericName] = curr;
functionIndex++;
}
+ void addStart(const Name &s) {
+ start = s;
+ }
void removeImport(Name name) {
for (size_t i = 0; i < imports.size(); i++) {
@@ -1211,6 +1215,10 @@ public:
o << "\")";
}
o << (module.memory.segments.size() > 0 ? "\n " : "") << ")\n";
+ if (module.start.is()) {
+ doIndent(o, indent);
+ printOpening(o, "start") << " " << module.start << ")\n";
+ }
for (auto& curr : module.functionTypes) {
doIndent(o, indent);
curr->print(o, indent, true);