Skip to content

Commit

Permalink
rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Palez committed Nov 5, 2019
1 parent 3bc2a90 commit ea3d4d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import com.oracle.truffle.llvm.runtime.nodes.intrinsics.llvm.LLVMIntrinsic;
import com.oracle.truffle.llvm.runtime.nodes.vars.LLVMReadNode.AttachInteropTypeNode;
import com.oracle.truffle.llvm.runtime.nodes.vars.LLVMReadNodeFactory.AttachInteropTypeNodeGen;
import com.oracle.truffle.llvm.runtime.pointer.LLVMManagedPointer;
import com.oracle.truffle.llvm.runtime.pointer.LLVMPointer;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.Location;
import com.oracle.truffle.api.object.Property;
import com.oracle.truffle.api.object.Shape;
import com.oracle.truffle.llvm.runtime.LLVMContext;
import com.oracle.truffle.llvm.runtime.LLVMLanguage;
Expand All @@ -49,19 +48,16 @@
public abstract class LLVMAccessGlobalVariableStorageNode extends LLVMExpressionNode {

protected final LLVMGlobal descriptor;
private final LLVMContext context;

public LLVMAccessGlobalVariableStorageNode(LLVMGlobal descriptor, LLVMContext context) {
public LLVMAccessGlobalVariableStorageNode(LLVMGlobal descriptor) {
this.descriptor = descriptor;
this.context = context;
}

public LLVMGlobal getDescriptor() {
return descriptor;
}

@Specialization
<<<<<<< HEAD
Object doAccess(
@CachedContext(LLVMLanguage.class) LLVMContext context,
@Cached ReadDynamicObjectHelper helper) {
Expand Down Expand Up @@ -137,9 +133,5 @@ protected Object updateShapeAndRead(DynamicObject object, LLVMGlobal descriptor,
protected Object readIndirect(DynamicObject dynamicObject, LLVMGlobal descriptor) {
return dynamicObject.get(descriptor);
}
=======
public Object accessGlobal() {
return context.getGlobalStorage(descriptor);
>>>>>>> LLVMAccessGlobalVariableStorageNode is a now an abstract class and now takes a context to access the global storage.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ private void allocGlobals(LLVMContext ctx, LLVMPointer roBase, LLVMPointer rwBas
// already bound before to a different target location
LLVMPointer ref = allocGlobal.allocate(roBase, rwBase);
initGlobal.execute(descriptor, ref);
ctx.registerGlobalReverseMap(descriptor, ref);
ctx.registerGlobalReverseMap(descriptor, ref);
}
}
}
Expand Down

0 comments on commit ea3d4d4

Please sign in to comment.