use of com.oracle.truffle.espresso.nodes.EspressoRootNode in project graal by oracle.
the class JDWPContextImpl method clearFrameMonitors.
@Override
public void clearFrameMonitors(CallFrame frame) {
RootNode rootNode = frame.getRootNode();
if (rootNode instanceof EspressoRootNode) {
EspressoRootNode espressoRootNode = (EspressoRootNode) rootNode;
espressoRootNode.abortInternalMonitors(frame.getFrame());
}
}
use of com.oracle.truffle.espresso.nodes.EspressoRootNode in project graal by oracle.
the class JDWPContextImpl method getNextBCI.
@Override
public int getNextBCI(RootNode callerRoot, Frame frame) {
if (callerRoot instanceof EspressoRootNode) {
EspressoRootNode espressoRootNode = (EspressoRootNode) callerRoot;
int bci = (int) readBCIFromFrame(callerRoot, frame);
if (bci != -1) {
BytecodeStream bs = new BytecodeStream(espressoRootNode.getMethodVersion().getOriginalCode());
return bs.nextBCI(bci);
}
}
return -1;
}
use of com.oracle.truffle.espresso.nodes.EspressoRootNode in project graal by oracle.
the class InvokeStaticQuickNode method execute.
@Override
public int execute(VirtualFrame frame) {
// Support for AccessController.doPrivileged.
if (callsDoPrivileged) {
EspressoRootNode rootNode = (EspressoRootNode) getRootNode();
if (rootNode != null) {
// Put cookie in the caller frame.
rootNode.setFrameId(frame, VM.GlobalFrameIDs.getID());
}
}
Object[] args = BytecodeNode.popArguments(frame, top, false, method.getMethod().getParsedSignature());
Object result = invokeStatic.execute(args);
if (!returnsPrimitiveType) {
getBytecodeNode().checkNoForeignObjectAssumption((StaticObject) result);
}
return (getResultAt() - top) + BytecodeNode.putKind(frame, getResultAt(), result, method.getMethod().getReturnKind());
}
use of com.oracle.truffle.espresso.nodes.EspressoRootNode in project graal by oracle.
the class VM method getRawEspressoRootFromFrame.
/**
* Returns the espresso root node for this frame, event if it comes from a different context.
*/
private static EspressoRootNode getRawEspressoRootFromFrame(FrameInstance frameInstance) {
if (frameInstance.getCallTarget() instanceof RootCallTarget) {
RootCallTarget callTarget = (RootCallTarget) frameInstance.getCallTarget();
RootNode rootNode = callTarget.getRootNode();
if (rootNode instanceof EspressoRootNode) {
return ((EspressoRootNode) rootNode);
}
}
return null;
}
use of com.oracle.truffle.espresso.nodes.EspressoRootNode in project graal by oracle.
the class VM method getMethodFromFrame.
@TruffleBoundary
public Method getMethodFromFrame(FrameInstance frameInstance) {
EspressoRootNode root = getRawEspressoRootFromFrame(frameInstance);
if (root == null) {
return null;
}
Method method = root.getMethod();
if (method.getContext() != getContext()) {
return null;
}
return method;
}
Aggregations