当前位置: 首页>>代码示例>>Java>>正文


Java ResolvedJavaMethod.isAbstract方法代码示例

本文整理汇总了Java中jdk.vm.ci.meta.ResolvedJavaMethod.isAbstract方法的典型用法代码示例。如果您正苦于以下问题:Java ResolvedJavaMethod.isAbstract方法的具体用法?Java ResolvedJavaMethod.isAbstract怎么用?Java ResolvedJavaMethod.isAbstract使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jdk.vm.ci.meta.ResolvedJavaMethod的用法示例。


在下文中一共展示了ResolvedJavaMethod.isAbstract方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkTargetConditionsHelper

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
private String checkTargetConditionsHelper(ResolvedJavaMethod method, int invokeBci) {
    OptionValues options = rootGraph.getOptions();
    if (method == null) {
        return "the method is not resolved";
    } else if (method.isNative() && (!Intrinsify.getValue(options) || !InliningUtil.canIntrinsify(context.getReplacements(), method, invokeBci))) {
        return "it is a non-intrinsic native method";
    } else if (method.isAbstract()) {
        return "it is an abstract method";
    } else if (!method.getDeclaringClass().isInitialized()) {
        return "the method's class is not initialized";
    } else if (!method.canBeInlined()) {
        return "it is marked non-inlinable";
    } else if (countRecursiveInlining(method) > MaximumRecursiveInlining.getValue(options)) {
        return "it exceeds the maximum recursive inlining depth";
    } else {
        if (new OptimisticOptimizations(rootGraph.getProfilingInfo(method), options).lessOptimisticThan(context.getOptimisticOptimizations())) {
            return "the callee uses less optimistic optimizations than caller";
        } else {
            return null;
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:InliningData.java

示例2: getCodeTest

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * @see ResolvedJavaMethod#getCode()
 */
@Test
public void getCodeTest() {
    for (Map.Entry<Method, ResolvedJavaMethod> e : methods.entrySet()) {
        ResolvedJavaMethod m = e.getValue();
        byte[] code = m.getCode();
        if (code == null) {
            assertTrue(m.getCodeSize() == 0);
        } else {
            if (m.isAbstract()) {
                assertTrue(code.length == 0);
            } else if (!m.isNative()) {
                assertTrue(code.length > 0);
            }
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:TestResolvedJavaMethod.java

示例3: process

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
@Override
protected void process() {
    if (callTarget.invokeKind().isDirect()) {
        /* Static and special calls: link the statically known callee method. */
        linkCallee(callTarget.targetMethod());
    } else {
        /* Virtual and interface call: Iterate all receiver types. */
        for (ResolvedJavaType type : getTypes()) {
            /*
             * Resolve the method call for one exact receiver type. The method linking
             * semantics of Java are complicated, but fortunatley we can use the linker of
             * the hosting Java VM. The Graal API exposes this functionality.
             */
            ResolvedJavaMethod method = type.resolveConcreteMethod(callTarget.targetMethod(), callTarget.invoke().getContextType());

            /*
             * Since the static analysis is conservative, the list of receiver types can
             * contain types that actually do not provide the method to be called. Ignore
             * these.
             */
            if (method != null && !method.isAbstract()) {
                linkCallee(method);
            }
        }
    }
    super.process();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:StaticAnalysis.java

示例4: getCodeSizeTest

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * @see ResolvedJavaMethod#getCodeSize()
 */
@Test
public void getCodeSizeTest() {
    for (Map.Entry<Method, ResolvedJavaMethod> e : methods.entrySet()) {
        ResolvedJavaMethod m = e.getValue();
        int codeSize = m.getCodeSize();
        if (m.isAbstract()) {
            assertTrue(codeSize == 0);
        } else if (!m.isNative()) {
            assertTrue(codeSize > 0);
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:TestResolvedJavaMethod.java


注:本文中的jdk.vm.ci.meta.ResolvedJavaMethod.isAbstract方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。