本文整理匯總了Java中jdk.vm.ci.meta.ResolvedJavaMethod.getName方法的典型用法代碼示例。如果您正苦於以下問題:Java ResolvedJavaMethod.getName方法的具體用法?Java ResolvedJavaMethod.getName怎麽用?Java ResolvedJavaMethod.getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jdk.vm.ci.meta.ResolvedJavaMethod
的用法示例。
在下文中一共展示了ResolvedJavaMethod.getName方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: compileGraph
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
@SuppressWarnings("try")
private CompilationResult compileGraph(ResolvedJavaMethod resolvedMethod, StructuredGraph graph, DebugContext debug) {
try (DebugContext.Scope s = debug.scope("AOTCompileMethod")) {
ProfilingInfo profilingInfo = DefaultProfilingInfo.get(TriState.FALSE);
final boolean isImmutablePIC = true;
CompilationIdentifier id = new CompilationIdentifier() {
@Override
public String toString(Verbosity verbosity) {
return resolvedMethod.getName();
}
};
CompilationResult compilationResult = new CompilationResult(id, isImmutablePIC);
return GraalCompiler.compileGraph(graph, resolvedMethod, providers, backend, graphBuilderSuite, OptimisticOptimizations.ALL, profilingInfo, getSuites(), getLirSuites(),
compilationResult, CompilationResultBuilderFactory.Default);
} catch (Throwable e) {
main.handleError(resolvedMethod, e, " (compiling graph)");
}
return null;
}
示例2: verify
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
@Override
protected boolean verify(StructuredGraph graph, PhaseContext context) {
final ResolvedJavaType graphType = context.getMetaAccess().lookupJavaType(Graph.class);
final ResolvedJavaType virtualizableType = context.getMetaAccess().lookupJavaType(Virtualizable.class);
final ResolvedJavaType constantNodeType = context.getMetaAccess().lookupJavaType(ConstantNode.class);
if (virtualizableType.isAssignableFrom(graph.method().getDeclaringClass()) && graph.method().getName().equals("virtualize")) {
for (MethodCallTargetNode t : graph.getNodes(MethodCallTargetNode.TYPE)) {
int bci = t.invoke().bci();
ResolvedJavaMethod callee = t.targetMethod();
String calleeName = callee.getName();
if (callee.getDeclaringClass().equals(graphType)) {
if (calleeName.equals("add") || calleeName.equals("addWithoutUnique") || calleeName.equals("addOrUnique") || calleeName.equals("addWithoutUniqueWithInputs") ||
calleeName.equals("addOrUniqueWithInputs")) {
verifyVirtualizableEffectArguments(constantNodeType, graph.method(), callee, bci, t.arguments(), 1);
}
}
}
}
return true;
}
示例3: verify
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
@Override
protected boolean verify(StructuredGraph graph, PhaseContext context) {
metaAccess = context.getMetaAccess();
ResolvedJavaType debugType = metaAccess.lookupJavaType(DebugContext.class);
ResolvedJavaType nodeType = metaAccess.lookupJavaType(Node.class);
ResolvedJavaType stringType = metaAccess.lookupJavaType(String.class);
ResolvedJavaType graalErrorType = metaAccess.lookupJavaType(GraalError.class);
for (MethodCallTargetNode t : graph.getNodes(MethodCallTargetNode.TYPE)) {
ResolvedJavaMethod callee = t.targetMethod();
String calleeName = callee.getName();
if (callee.getDeclaringClass().equals(debugType)) {
boolean isDump = calleeName.equals("dump");
if (calleeName.equals("log") || calleeName.equals("logAndIndent") || calleeName.equals("verify") || isDump) {
verifyParameters(t, graph, t.arguments(), stringType, isDump ? 2 : 1);
}
}
if (callee.getDeclaringClass().isAssignableFrom(nodeType)) {
if (calleeName.equals("assertTrue") || calleeName.equals("assertFalse")) {
verifyParameters(t, graph, t.arguments(), stringType, 1);
}
}
if (callee.getDeclaringClass().isAssignableFrom(graalErrorType) && !graph.method().getDeclaringClass().isAssignableFrom(graalErrorType)) {
if (calleeName.equals("guarantee")) {
verifyParameters(t, graph, t.arguments(), stringType, 0);
}
if (calleeName.equals("<init>") && callee.getSignature().getParameterCount(false) == 2) {
verifyParameters(t, graph, t.arguments(), stringType, 1);
}
}
}
return true;
}
示例4: methodName
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
@Override
public String methodName(ResolvedJavaMethod method) {
return method.getName();
}
示例5: get
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
InvocationPlugin get(ResolvedJavaMethod method) {
if (resolvedRegistrations != null) {
return resolvedRegistrations.get(method);
} else {
if (!method.isBridge()) {
ResolvedJavaType declaringClass = method.getDeclaringClass();
flushDeferrables();
String internalName = declaringClass.getName();
ClassPlugins classPlugins = registrations.get(internalName);
InvocationPlugin res = null;
if (classPlugins != null) {
res = classPlugins.get(method);
}
if (res == null) {
LateClassPlugins lcp = findLateClassPlugins(internalName);
if (lcp != null) {
res = lcp.get(method);
}
}
if (res != null) {
if (canBeIntrinsified(declaringClass)) {
return res;
}
}
if (testExtensions != null) {
// Avoid the synchronization in the common case that there
// are no test extensions.
synchronized (this) {
if (testExtensions != null) {
List<Binding> bindings = testExtensions.get(internalName);
if (bindings != null) {
String name = method.getName();
String descriptor = method.getSignature().toMethodDescriptor();
for (Binding b : bindings) {
if (b.isStatic == method.isStatic() &&
b.name.equals(name) &&
descriptor.startsWith(b.argumentsDescriptor)) {
return b.plugin;
}
}
}
}
}
}
} else {
// Supporting plugins for bridge methods would require including
// the return type in the registered signature. Until needed,
// this extra complexity is best avoided.
}
}
return null;
}
示例6: uniqueMethodName
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
/**
* Name a java method with class and signature to make it unique.
*
* @param method to generate unique identifier for
* @return Unique name for this method including class and signature
**/
static String uniqueMethodName(ResolvedJavaMethod method) {
String className = method.getDeclaringClass().toClassName();
String name = className + "." + method.getName() + method.getSignature().toMethodDescriptor();
return name;
}