summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-07-02 19:26:42 -0700
committerGitHub <noreply@github.com>2019-07-02 19:26:42 -0700
commit2d773d6ddfeaefffe7161fdd26b523f16608dce8 (patch)
treef73ac9f81098bc568119baa7fff291022e789c43
parentf154364c01603b0b8cfd0055951e8283f20fabd7 (diff)
downloadbinaryen-2d773d6ddfeaefffe7161fdd26b523f16608dce8.tar.gz
binaryen-2d773d6ddfeaefffe7161fdd26b523f16608dce8.tar.bz2
binaryen-2d773d6ddfeaefffe7161fdd26b523f16608dce8.zip
Fix event section order (#2202)
The event section should be between the global section and the export section, if present. Here tests are missing, but we don't have a very good way of testing validity of binary anyway. We are planning to add d8 tests in a separate PR.
-rw-r--r--src/wasm/wasm-binary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 8804257a4..5fb3a8550 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -52,13 +52,13 @@ void WasmBinaryWriter::write() {
writeFunctionTableDeclaration();
writeMemory();
writeGlobals();
+ writeEvents();
writeExports();
writeStart();
writeTableElements();
writeDataCount();
writeFunctions();
writeDataSegments();
- writeEvents();
if (debugInfo) {
writeNames();
}