use of org.graalvm.wasm.Linker.ResolutionDag.Sym in project graal by oracle.
the class Linker method resolveGlobalInitialization.
void resolveGlobalInitialization(WasmContext context, WasmInstance instance, int globalIndex, int sourceGlobalIndex) {
final Runnable resolveAction = () -> {
final int sourceAddress = instance.globalAddress(sourceGlobalIndex);
final int address = instance.globalAddress(globalIndex);
final GlobalRegistry globals = context.globals();
globals.storeLong(address, globals.loadAsLong(sourceAddress));
};
final Sym[] dependencies = new Sym[] { new InitializeGlobalSym(instance.name(), sourceGlobalIndex) };
resolutionDag.resolveLater(new InitializeGlobalSym(instance.name(), globalIndex), dependencies, resolveAction);
}
use of org.graalvm.wasm.Linker.ResolutionDag.Sym in project graal by oracle.
the class Linker method resolveGlobalInitialization.
void resolveGlobalInitialization(WasmInstance instance, int globalIndex) {
final Sym[] dependencies = ResolutionDag.NO_DEPENDENCIES;
resolutionDag.resolveLater(new InitializeGlobalSym(instance.name(), globalIndex), dependencies, NO_RESOLVE_ACTION);
}
Aggregations