use of jdk.vm.ci.meta.JavaMethod in project graal by oracle.
the class NodeSourcePosition method verifyCaller.
private static boolean verifyCaller(NodeSourcePosition current, NodeSourcePosition caller) {
if (!STRICT_SOURCE_POSITION) {
return true;
}
if (BytecodeFrame.isPlaceholderBci(caller.getBCI())) {
return true;
}
int opcode = BytecodeDisassembler.getBytecodeAt(caller.getMethod(), caller.getBCI());
JavaMethod method = BytecodeDisassembler.getInvokedMethodAt(caller.getMethod(), caller.getBCI());
/*
* It's not really possible to match the declaring classes since this might be an interface
* invoke. Matching name and signature probably provides enough accuracy.
*/
assert method == null || (method.getName().equals(current.getMethod().getName()) && method.getSignature().equals(current.getMethod().getSignature())) || caller.getMethod().getName().equals("linkToTargetMethod") || opcode == Bytecodes.INVOKEDYNAMIC || caller.getMethod().getDeclaringClass().getName().startsWith("Ljava/lang/invoke/LambdaForm$") || current.getMethod().getName().equals("callInlined") : "expected " + method + " but found " + current.getMethod();
return true;
}
use of jdk.vm.ci.meta.JavaMethod in project graal by oracle.
the class BytecodeParser method lookupMethod.
private JavaMethod lookupMethod(int cpi, int opcode) {
maybeEagerlyResolve(cpi, opcode);
JavaMethod result = constantPool.lookupMethod(cpi, opcode);
assert !graphBuilderConfig.unresolvedIsError() || result instanceof ResolvedJavaMethod : result;
return result;
}
use of jdk.vm.ci.meta.JavaMethod in project graal by oracle.
the class BytecodeParser method genInvokeInterface.
protected void genInvokeInterface(int cpi, int opcode) {
JavaMethod target = lookupMethod(cpi, opcode);
genInvokeInterface(target);
}
use of jdk.vm.ci.meta.JavaMethod in project graal by oracle.
the class BytecodeParser method genInvokeStatic.
protected void genInvokeStatic(int cpi, int opcode) {
JavaMethod target = lookupMethod(cpi, opcode);
assert !uninitializedIsError || (target instanceof ResolvedJavaMethod && ((ResolvedJavaMethod) target).getDeclaringClass().isInitialized()) : target;
genInvokeStatic(target);
}
use of jdk.vm.ci.meta.JavaMethod in project graal by oracle.
the class BytecodeParser method genInvokeVirtual.
protected void genInvokeVirtual(int cpi, int opcode) {
JavaMethod target = lookupMethod(cpi, opcode);
genInvokeVirtual(target);
}
Aggregations