Skip to content

Commit e8f457f

Browse files
committed
Remove tag registry.
1 parent ee0c136 commit e8f457f

File tree

5 files changed

+3
-94
lines changed

5 files changed

+3
-94
lines changed

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/Linker.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,7 @@ void resolveTagImport(WasmStore store, WasmInstance instance, ImportDescriptor i
549549
final WasmTag importedTag;
550550
final WasmTag externalTag = lookupImportObject(instance, importDescriptor, imports, WasmTag.class);
551551
if (externalTag != null) {
552-
final int contextTagIndex = store.tags().register(externalTag);
553-
importedTag = store.tags().tag(contextTagIndex);
552+
importedTag = externalTag;
554553
assert tagIndex == importDescriptor.targetIndex();
555554
} else {
556555
final WasmInstance importedInstance = store.lookupModuleInstance(importedModuleName);

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/SymbolTable.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,9 +1165,7 @@ public void allocateTag(int index, byte attribute, int typeIndex) {
11651165
addTag(index, attribute, typeIndex);
11661166
module().addLinkAction((context, store, instance, imports) -> {
11671167
final WasmTag tag = new WasmTag(typeAt(typeIndex));
1168-
final int tagAddress = store.tags().register(tag);
1169-
final WasmTag allocatedTag = store.tags().tag(tagAddress);
1170-
instance.setTag(index, allocatedTag);
1168+
instance.setTag(index, tag);
11711169
});
11721170
}
11731171

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/TagRegistry.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/WasmInstantiator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ static List<LinkAction> recreateLinkActions(WasmModule module) {
210210
} else {
211211
linkActions.add((context, store, instance, imports) -> {
212212
final WasmTag tag = new WasmTag(type);
213-
final int address = store.tags().register(tag);
214-
final WasmTag allocatedTag = store.tags().tag(address);
215-
instance.setTag(tagIndex, allocatedTag);
213+
instance.setTag(tagIndex, tag);
216214
});
217215
}
218216
}

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/WasmStore.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public final class WasmStore implements TruffleObject {
7070
private final WasmLanguage language;
7171
private final MemoryRegistry memoryRegistry;
7272
private final TableRegistry tableRegistry;
73-
private final TagRegistry tagRegistry;
7473
private final Linker linker;
7574
private final Map<String, WasmInstance> moduleInstances;
7675
private final FdManager filesManager;
@@ -82,7 +81,6 @@ public WasmStore(WasmContext context, WasmLanguage language) {
8281
this.contextOptions = context.getContextOptions();
8382
this.tableRegistry = new TableRegistry();
8483
this.memoryRegistry = new MemoryRegistry();
85-
this.tagRegistry = new TagRegistry();
8684
this.moduleInstances = new LinkedHashMap<>();
8785
this.linker = new Linker();
8886
this.filesManager = context.fdManager();
@@ -108,10 +106,6 @@ public TableRegistry tables() {
108106
return tableRegistry;
109107
}
110108

111-
public TagRegistry tags() {
112-
return tagRegistry;
113-
}
114-
115109
public Linker linker() {
116110
return linker;
117111
}

0 commit comments

Comments
 (0)