Skip to content

Commit

Permalink
Fix invalid slow-path call on fast-path.
Browse files Browse the repository at this point in the history
  • Loading branch information
rschatz committed Oct 11, 2019
1 parent 740e20b commit c8e8b96
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.CachedContext;
import com.oracle.truffle.api.dsl.CachedLanguage;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.llvm.runtime.LLVMContext;
Expand Down Expand Up @@ -99,10 +100,11 @@ protected LangStartVtableType createLangStartVtable(Type vtableType) {
@SuppressWarnings("unused")
protected long doOp(StackPointer stackPointer, LLVMNativePointer mainPointer, LLVMNativePointer vtable, long argc, LLVMPointer argv,
@CachedContext(LLVMLanguage.class) LLVMContext ctx,
@CachedLanguage LLVMLanguage language,
@Cached("createToNativeWithTarget()") LLVMToNativeNode toNative,
@Cached("createClosureDispatchNode()") LLVMClosureDispatchNode fnDispatchNode,
@Cached("createClosureDispatchNode()") LLVMClosureDispatchNode dropInPlaceDispatchNode) {
LLVMMemory memory = getLLVMMemory();
LLVMMemory memory = language.getCapability(LLVMMemory.class);
LLVMGlobal vtableGlobal = ctx.findGlobal(vtable);
LangStartVtableType langStartVtable = createLangStartVtable(vtableGlobal.getPointeeType());
LLVMNativePointer fn = readFn(memory, vtable, langStartVtable);
Expand Down

0 comments on commit c8e8b96

Please sign in to comment.