aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-06-28 00:18:06 +0100
committerMichael Williamson <mike@zwobble.org>2023-06-28 00:18:06 +0100
commit2ac63745004d385fd47599d658b03dcfbbc7b17d (patch)
treeb2db15416148380c1e6fb26f0043bfee01e12f77
parent25f05f12773ea5710941822ce0e168325cc7ce14 (diff)
Put linking section before name section
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected16
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithNoArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected14
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected22
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDiscardTests]/[method:discardCompilesToDrop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalLoadTests]/[method:localLoadCompilesToLocalGet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalStoreTests]/[method:localStoreCompilesToLocalSet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenNamespaceFieldStoreTests]/[method:namespaceFieldStorePopsFromStackAndUpdatesFieldOnNamespace(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushFalseIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushTrueIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushIntTests]/[method:pushIntIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:canHaveMultipleStrings(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:pushStringIsCompiledToDataAndIndexToData(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushUnitTests]/[method:pushUnitIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenReturnTests]/[method:returnCompilesToReturnInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected6
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeEmptyModule(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithDataSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithElementSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected10
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctionImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected10
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobalImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected8
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithInitFuncs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected10
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemories(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemoryImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTableImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTables(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTypes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected4
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:localNamesHaveCorrectFuncIndexWhenThereAreImportedFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected10
-rw-r--r--src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryFormatModules.java2
30 files changed, 113 insertions, 113 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 1a62ea62..045732f0 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -14,14 +14,6 @@ Function[1]:
Code[1]:
- func[0] size=44 <f>
Custom:
- - name: "name"
- - func[0] <f>
- - func[0] local[0] <callArgNamed__a__0>
- - func[0] local[1] <callArgNamed__b__0>
- - func[0] local[2] <callArgPositional__1__0>
- - func[0] local[3] <callArgPositional__0__0>
- - func[0] local[4] <receiver__0>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
@@ -29,6 +21,14 @@ Custom:
- name: "reloc.CODE"
- relocations for section: 3 (Code) [1]
- R_WASM_TYPE_INDEX_LEB offset=0x00002b(file=0x000090) type=0
+Custom:
+ - name: "name"
+ - func[0] <f>
+ - func[0] local[0] <callArgNamed__a__0>
+ - func[0] local[1] <callArgNamed__b__0>
+ - func[0] local[2] <callArgPositional__1__0>
+ - func[0] local[3] <callArgPositional__0__0>
+ - func[0] local[4] <receiver__0>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithNoArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithNoArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index bdeb7cec..8e41f9b3 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithNoArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenCallTests]/[method:canCallFunctionWithNoArgs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -14,10 +14,6 @@ Function[1]:
Code[1]:
- func[0] size=20 <f>
Custom:
- - name: "name"
- - func[0] <f>
- - func[0] local[0] <receiver__0>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
@@ -25,6 +21,10 @@ Custom:
- name: "reloc.CODE"
- relocations for section: 3 (Code) [1]
- R_WASM_TYPE_INDEX_LEB offset=0x000013(file=0x000078) type=0
+Custom:
+ - name: "name"
+ - func[0] <f>
+ - func[0] local[0] <receiver__0>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index e0f30646..2b159ad8 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -17,13 +17,6 @@ Code[2]:
- func[1] size=5 <shed__function__f__0>
- func[2] size=27 <f>
Custom:
- - name: "name"
- - func[0] <shed__runtime__alloc>
- - func[1] <shed__function__f__0>
- - func[2] <f>
- - func[1] local[0] <closurePointer__0>
- - func[2] local[0] <closurePointer__0>
-Custom:
- name: "linking"
- symbol table [count=3]
- 0: F <shed__runtime__alloc> func=0 [ undefined explicit_name binding=global vis=default ]
@@ -34,6 +27,13 @@ Custom:
- relocations for section: 3 (Code) [2]
- R_WASM_FUNCTION_INDEX_LEB offset=0x000016(file=0x000097) symbol=0 <shed__runtime__alloc>
- R_WASM_TABLE_INDEX_SLEB offset=0x000020(file=0x0000a1) symbol=1 <shed__function__f__0>
+Custom:
+ - name: "name"
+ - func[0] <shed__runtime__alloc>
+ - func[1] <shed__function__f__0>
+ - func[2] <f>
+ - func[1] local[0] <closurePointer__0>
+ - func[2] local[0] <closurePointer__0>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index f0e26329..ec34c83b 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -17,6 +17,17 @@ Code[2]:
- func[1] size=23 <shed__function__f__0>
- func[2] size=47 <f>
Custom:
+ - name: "linking"
+ - symbol table [count=3]
+ - 0: F <shed__runtime__alloc> func=0 [ undefined explicit_name binding=global vis=default ]
+ - 1: F <shed__function__f__0> func=1 [ binding=global vis=default ]
+ - 2: F <f> func=2 [ binding=global vis=default ]
+Custom:
+ - name: "reloc.CODE"
+ - relocations for section: 3 (Code) [2]
+ - R_WASM_FUNCTION_INDEX_LEB offset=0x00002e(file=0x0000af) symbol=0 <shed__runtime__alloc>
+ - R_WASM_TABLE_INDEX_SLEB offset=0x000038(file=0x0000b9) symbol=1 <shed__function__f__0>
+Custom:
- name: "name"
- func[0] <shed__runtime__alloc>
- func[1] <shed__function__f__0>
@@ -28,17 +39,6 @@ Custom:
- func[2] local[1] <local__c__0>
- func[2] local[2] <local__a__0>
- func[2] local[3] <closurePointer__0>
-Custom:
- - name: "linking"
- - symbol table [count=3]
- - 0: F <shed__runtime__alloc> func=0 [ undefined explicit_name binding=global vis=default ]
- - 1: F <shed__function__f__0> func=1 [ binding=global vis=default ]
- - 2: F <f> func=2 [ binding=global vis=default ]
-Custom:
- - name: "reloc.CODE"
- - relocations for section: 3 (Code) [2]
- - R_WASM_FUNCTION_INDEX_LEB offset=0x00002e(file=0x0000af) symbol=0 <shed__runtime__alloc>
- - R_WASM_TABLE_INDEX_SLEB offset=0x000038(file=0x0000b9) symbol=1 <shed__function__f__0>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDiscardTests]/[method:discardCompilesToDrop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDiscardTests]/[method:discardCompilesToDrop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 2b68d4b9..6aac3c72 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDiscardTests]/[method:discardCompilesToDrop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDiscardTests]/[method:discardCompilesToDrop(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,12 +13,12 @@ Function[1]:
Code[1]:
- func[0] size=3 <f>
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalLoadTests]/[method:localLoadCompilesToLocalGet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalLoadTests]/[method:localLoadCompilesToLocalGet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index da1552f0..285fad62 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalLoadTests]/[method:localLoadCompilesToLocalGet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalLoadTests]/[method:localLoadCompilesToLocalGet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,15 +13,15 @@ Function[1]:
Code[1]:
- func[0] size=10 <f>
Custom:
+ - name: "linking"
+ - symbol table [count=1]
+ - 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
- name: "name"
- func[0] <f>
- func[0] local[0] <local__y__0>
- func[0] local[1] <local__x__0>
- func[0] local[2] <local__z__0>
-Custom:
- - name: "linking"
- - symbol table [count=1]
- - 0: F <f> func=0 [ binding=global vis=default ]
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalStoreTests]/[method:localStoreCompilesToLocalSet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalStoreTests]/[method:localStoreCompilesToLocalSet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 55650ae8..6a1ead86 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalStoreTests]/[method:localStoreCompilesToLocalSet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenLocalStoreTests]/[method:localStoreCompilesToLocalSet(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,13 +13,13 @@ Function[1]:
Code[1]:
- func[0] size=6 <f>
Custom:
- - name: "name"
- - func[0] <f>
- - func[0] local[0] <local__x__0>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
+ - func[0] local[0] <local__x__0>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenNamespaceFieldStoreTests]/[method:namespaceFieldStorePopsFromStackAndUpdatesFieldOnNamespace(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenNamespaceFieldStoreTests]/[method:namespaceFieldStorePopsFromStackAndUpdatesFieldOnNamespace(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 141c48ad..60eb3352 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenNamespaceFieldStoreTests]/[method:namespaceFieldStorePopsFromStackAndUpdatesFieldOnNamespace(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenNamespaceFieldStoreTests]/[method:namespaceFieldStorePopsFromStackAndUpdatesFieldOnNamespace(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -16,10 +16,6 @@ Data[1]:
- segment[0] <.data> memory=0 size=12 - init i32=0
- 0000000: 0000 0000 0000 0000 0000 0000 ............
Custom:
- - name: "name"
- - func[0] <f>
- - func[0] local[0] <fieldValue__y__0>
-Custom:
- name: "linking"
- segment info [count=1]
- 0: .data p2align=2 [ ]
@@ -30,6 +26,10 @@ Custom:
- name: "reloc.CODE"
- relocations for section: 3 (Code) [1]
- R_WASM_MEMORY_ADDR_SLEB offset=0x00000c(file=0x00006c) symbol=1 <shed__namespace__Example_Project>
+Custom:
+ - name: "name"
+ - func[0] <f>
+ - func[0] local[0] <fieldValue__y__0>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushFalseIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushFalseIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 0606bd55..e7b90dc6 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushFalseIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushFalseIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,12 +13,12 @@ Function[1]:
Code[1]:
- func[0] size=4 <f>
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushTrueIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushTrueIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 677cb60f..a9266337 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushTrueIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushBoolTests]/[method:pushTrueIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,12 +13,12 @@ Function[1]:
Code[1]:
- func[0] size=4 <f>
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushIntTests]/[method:pushIntIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushIntTests]/[method:pushIntIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 403f3c05..9f89e279 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushIntTests]/[method:pushIntIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushIntTests]/[method:pushIntIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,12 +13,12 @@ Function[1]:
Code[1]:
- func[0] size=4 <f>
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:canHaveMultipleStrings(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:canHaveMultipleStrings(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index b23c9e83..0bc8c636 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:canHaveMultipleStrings(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:canHaveMultipleStrings(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -17,9 +17,6 @@ Data[1]:
- 0000000: 0000 0005 6865 6c6c 6f00 0000 0000 0005 ....hello.......
- 0000010: 776f 726c 64 world
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- segment info [count=1]
- 0: .data p2align=2 [ ]
@@ -32,6 +29,9 @@ Custom:
- relocations for section: 3 (Code) [2]
- R_WASM_MEMORY_ADDR_SLEB offset=0x000008(file=0x000068) symbol=1 <shed__string__0>
- R_WASM_MEMORY_ADDR_SLEB offset=0x00000e(file=0x00006e) symbol=2 <shed__string__1>
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:pushStringIsCompiledToDataAndIndexToData(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:pushStringIsCompiledToDataAndIndexToData(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 8b897e0d..914b6ce4 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:pushStringIsCompiledToDataAndIndexToData(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushStringTests]/[method:pushStringIsCompiledToDataAndIndexToData(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -16,9 +16,6 @@ Data[1]:
- segment[0] <.data> memory=0 size=9 - init i32=0
- 0000000: 0000 0005 6865 6c6c 6f ....hello
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- segment info [count=1]
- 0: .data p2align=2 [ ]
@@ -29,6 +26,9 @@ Custom:
- name: "reloc.CODE"
- relocations for section: 3 (Code) [1]
- R_WASM_MEMORY_ADDR_SLEB offset=0x000008(file=0x000068) symbol=1 <shed__string__0>
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushUnitTests]/[method:pushUnitIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushUnitTests]/[method:pushUnitIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 0606bd55..e7b90dc6 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushUnitTests]/[method:pushUnitIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenPushUnitTests]/[method:pushUnitIsCompiledToOperandInStack(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,12 +13,12 @@ Function[1]:
Code[1]:
- func[0] size=4 <f>
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenReturnTests]/[method:returnCompilesToReturnInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenReturnTests]/[method:returnCompilesToReturnInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 86ad8060..4ceb9ac1 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenReturnTests]/[method:returnCompilesToReturnInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenReturnTests]/[method:returnCompilesToReturnInstruction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,12 +13,12 @@ Function[1]:
Code[1]:
- func[0] size=3 <f>
Custom:
- - name: "name"
- - func[0] <f>
-Custom:
- name: "linking"
- symbol table [count=1]
- 0: F <f> func=0 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeEmptyModule(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeEmptyModule(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 340b1609..cb06a6f7 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeEmptyModule(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeEmptyModule(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -4,8 +4,8 @@ module.wasm: file format wasm 0x1
Section Details:
Custom:
- - name: "name"
-Custom:
- name: "linking"
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithDataSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithDataSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index eadaac30..131f4676 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithDataSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithDataSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -11,8 +11,6 @@ Data[2]:
- segment[1] <.rodata> memory=0 size=4 - init i32=4
- 0000004: 0405 0607 ....
Custom:
- - name: "name"
-Custom:
- name: "linking"
- segment info [count=2]
- 0: .data p2align=2 [ ]
@@ -21,5 +19,7 @@ Custom:
- 0: D <data1> segment=0 offset=0 size=2 [ binding=global vis=default ]
- 1: D <data2> segment=0 offset=2 size=2 [ binding=global vis=default ]
- 2: D <rodata1> segment=1 offset=0 size=4 [ binding=global vis=default ]
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithElementSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithElementSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 659781e1..e807b3e9 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithElementSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithElementSegments(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -20,16 +20,16 @@ Code[3]:
- func[1] size=2 <f2>
- func[2] size=2 <f3>
Custom:
- - name: "name"
- - func[0] <f1>
- - func[1] <f2>
- - func[2] <f3>
-Custom:
- name: "linking"
- symbol table [count=3]
- 0: F <f1> func=0 [ binding=global vis=default ]
- 1: F <f2> func=1 [ binding=global vis=default ]
- 2: F <f3> func=2 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <f1>
+ - func[1] <f2>
+ - func[2] <f3>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctionImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctionImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 640d7d80..41e847fc 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctionImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctionImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -10,13 +10,13 @@ Import[2]:
- func[0] sig=0 <Identifier1> <- ModuleName1.EntityName1
- func[1] sig=1 <Identifier2> <- ModuleName2.EntityName2
Custom:
- - name: "name"
- - func[0] <Identifier1>
- - func[1] <Identifier2>
-Custom:
- name: "linking"
- symbol table [count=2]
- 0: F <Identifier1> func=0 [ undefined explicit_name binding=global vis=default ]
- 1: F <Identifier2> func=1 [ undefined explicit_name binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <Identifier1>
+ - func[1] <Identifier2>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 6cc896e6..a846fad6 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,6 +13,11 @@ Code[2]:
- func[0] size=8 <f1>
- func[1] size=6 <f2>
Custom:
+ - name: "linking"
+ - symbol table [count=2]
+ - 0: F <f1> func=0 [ binding=global vis=default ]
+ - 1: F <f2> func=1 [ binding=global vis=default ]
+Custom:
- name: "name"
- func[0] <f1>
- func[1] <f2>
@@ -22,11 +27,6 @@ Custom:
- func[0] local[3] <localB>
- func[1] local[0] <paramA>
- func[1] local[1] <localA>
-Custom:
- - name: "linking"
- - symbol table [count=2]
- - 0: F <f1> func=0 [ binding=global vis=default ]
- - 1: F <f2> func=1 [ binding=global vis=default ]
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobalImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobalImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 95cb2134..ef15199b 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobalImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobalImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -7,13 +7,13 @@ Import[2]:
- global[0] i32 mutable=1 <- ModuleName1.EntityName1
- global[1] i64 mutable=0 <- ModuleName2.EntityName2
Custom:
- - name: "name"
- - global[0] <Global1>
- - global[1] <Global2>
-Custom:
- name: "linking"
- symbol table [count=2]
- 0: G <Global1> global=0 [ undefined explicit_name binding=global vis=default ]
- 1: G <Global2> global=1 [ undefined explicit_name binding=global vis=default ]
+Custom:
+ - name: "name"
+ - global[0] <Global1>
+ - global[1] <Global2>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 6e1ab2a7..c5d8ef4c 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithGlobals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -7,13 +7,13 @@ Global[2]:
- global[0] i32 mutable=1 <Global1> - init i32=7
- global[1] i64 mutable=0 <Global2> - init i64=9
Custom:
- - name: "name"
- - global[0] <Global1>
- - global[1] <Global2>
-Custom:
- name: "linking"
- symbol table [count=2]
- 0: G <Global1> global=0 [ binding=global vis=default ]
- 1: G <Global2> global=1 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - global[0] <Global1>
+ - global[1] <Global2>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithInitFuncs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithInitFuncs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 3a116975..1acd85c1 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithInitFuncs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithInitFuncs(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -14,11 +14,6 @@ Code[3]:
- func[1] size=2 <f2>
- func[2] size=2 <f3>
Custom:
- - name: "name"
- - func[0] <f1>
- - func[1] <f2>
- - func[2] <f3>
-Custom:
- name: "linking"
- symbol table [count=3]
- 0: F <f1> func=0 [ binding=global vis=default ]
@@ -27,6 +22,11 @@ Custom:
- init functions [count=2]
- 2: priority=0 <f3>
- 0: priority=4 <f1>
+Custom:
+ - name: "name"
+ - func[0] <f1>
+ - func[1] <f2>
+ - func[2] <f3>
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemories(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemories(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 8b870190..219d44b4 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemories(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemories(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -6,8 +6,8 @@ Section Details:
Memory[1]:
- memory[0] pages: initial=1
Custom:
- - name: "name"
-Custom:
- name: "linking"
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemoryImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemoryImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 6a59736f..1056e9f6 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemoryImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithMemoryImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -6,8 +6,8 @@ Section Details:
Import[1]:
- memory[0] pages: initial=1 <- ModuleName1.EntityName1
Custom:
- - name: "name"
-Custom:
- name: "linking"
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTableImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTableImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 67836ea0..81acd316 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTableImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTableImports(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -7,8 +7,8 @@ Import[2]:
- table[0] type=externref initial=1 <- ModuleName1.EntityName1
- table[1] type=funcref initial=2 max=5 <- ModuleName2.EntityName2
Custom:
- - name: "name"
-Custom:
- name: "linking"
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTables(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTables(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index cf945e0d..5d8e2af5 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTables(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTables(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -7,8 +7,8 @@ Table[2]:
- table[0] type=funcref initial=1
- table[1] type=externref initial=2 max=3
Custom:
- - name: "name"
-Custom:
- name: "linking"
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTypes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTypes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 9434e657..0bac0740 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTypes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:canSerializeModuleWithTypes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -7,8 +7,8 @@ Type[2]:
- type[0] () -> nil
- type[1] (i32, i64) -> (f32, f64)
Custom:
- - name: "name"
-Custom:
- name: "linking"
+Custom:
+ - name: "name"
Code Disassembly:
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:localNamesHaveCorrectFuncIndexWhenThereAreImportedFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:localNamesHaveCorrectFuncIndexWhenThereAreImportedFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 1104ee19..f76a0a68 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:localNamesHaveCorrectFuncIndexWhenThereAreImportedFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.structure.WasmBinaryFormatModuleTests]/[method:localNamesHaveCorrectFuncIndexWhenThereAreImportedFunctions(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -13,15 +13,15 @@ Function[1]:
Code[1]:
- func[1] size=4 <f>
Custom:
- - name: "name"
- - func[0] <Identifier1>
- - func[1] <f>
- - func[1] local[0] <paramA>
-Custom:
- name: "linking"
- symbol table [count=2]
- 0: F <Identifier1> func=0 [ undefined explicit_name binding=global vis=default ]
- 1: F <f> func=1 [ binding=global vis=default ]
+Custom:
+ - name: "name"
+ - func[0] <Identifier1>
+ - func[1] <f>
+ - func[1] local[0] <paramA>
Code Disassembly:
diff --git a/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryFormatModules.java b/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryFormatModules.java
index da479ca9..1709f78d 100644
--- a/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryFormatModules.java
+++ b/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryFormatModules.java
@@ -339,8 +339,8 @@ public class WasmBinaryFormatModules {
writeElementSection(module, writer);
writeCodeSection(module, writer);
writeDataSection(module, writer);
- writeNameSection(module, indexTable, writer);
writeLinkingSections(module, writer);
+ writeNameSection(module, indexTable, writer);
outputStream.write(writer.toBytes());
}