Search in sources :

Example 66 with JavaConstant

use of jdk.vm.ci.meta.JavaConstant in project graal by oracle.

the class PEReadEliminationClosure method processLoadIndexed.

private boolean processLoadIndexed(LoadIndexedNode load, PEReadEliminationBlockState state, GraphEffectList effects) {
    if (load.index().isConstant()) {
        int index = ((JavaConstant) load.index().asConstant()).asInt();
        // BALOAD (with elementKind being Byte) can be used to retrieve values from boolean
        // arrays.
        JavaKind elementKind = load.elementKind();
        if (elementKind == JavaKind.Byte) {
            elementKind = getElementKindFromStamp(load.array());
            if (elementKind == JavaKind.Illegal) {
                return false;
            }
        }
        LocationIdentity arrayLocation = NamedLocationIdentity.getArrayLocation(elementKind);
        return processLoad(load, load.array(), arrayLocation, index, elementKind, state, effects);
    }
    return false;
}
Also used : LocationIdentity(org.graalvm.word.LocationIdentity) FieldLocationIdentity(org.graalvm.compiler.nodes.FieldLocationIdentity) NamedLocationIdentity(org.graalvm.compiler.nodes.NamedLocationIdentity) JavaConstant(jdk.vm.ci.meta.JavaConstant) MemoryCheckpoint(org.graalvm.compiler.nodes.memory.MemoryCheckpoint) JavaKind(jdk.vm.ci.meta.JavaKind)

Example 67 with JavaConstant

use of jdk.vm.ci.meta.JavaConstant in project graal by oracle.

the class ComputedValueField method readValue.

@Override
public JavaConstant readValue(JavaConstant receiver) {
    if (constantValue != null) {
        return constantValue;
    }
    if (kind == RecomputeFieldValue.Kind.None || kind == RecomputeFieldValue.Kind.Manual) {
        return ReadableJavaField.readFieldValue(GraalAccess.getOriginalProviders().getConstantReflection(), original, receiver);
    }
    JavaConstant result = valueCache.get(receiver);
    if (result != null) {
        return result;
    }
    SnippetReflectionProvider originalSnippetReflection = GraalAccess.getOriginalSnippetReflection();
    switch(kind) {
        case ArrayBaseOffset:
            constantValue = asConstant(ConfigurationValues.getObjectLayout().getArrayBaseOffset(JavaKind.fromJavaClass(targetClass.getComponentType())));
            return constantValue;
        case ArrayIndexScale:
            constantValue = asConstant(ConfigurationValues.getObjectLayout().getArrayIndexScale(JavaKind.fromJavaClass(targetClass.getComponentType())));
            return constantValue;
        case ArrayIndexShift:
            constantValue = asConstant(ConfigurationValues.getObjectLayout().getArrayIndexShift(JavaKind.fromJavaClass(targetClass.getComponentType())));
            return constantValue;
        case NewInstance:
            try {
                Constructor<?> constructor = targetClass.getDeclaredConstructor();
                constructor.setAccessible(true);
                result = originalSnippetReflection.forObject(constructor.newInstance());
            } catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException ex) {
                throw shouldNotReachHere("Error performing field recomputation for alias " + annotated.format("%H.%n"), ex);
            }
            break;
        case AtomicFieldUpdaterOffset:
            result = computeAtomicFieldUpdaterOffset(receiver);
            break;
        case TranslateFieldOffset:
            result = translateFieldOffset(receiver, targetClass);
            break;
        case Custom:
            try {
                Constructor<?>[] constructors = targetClass.getDeclaredConstructors();
                if (constructors.length != 1) {
                    throw shouldNotReachHere("The " + CustomFieldValueComputer.class.getSimpleName() + " class " + targetClass.getName() + " has more than one constructor");
                }
                Constructor<?> constructor = constructors[0];
                Object[] constructorArgs = new Object[constructor.getParameterCount()];
                for (int i = 0; i < constructorArgs.length; i++) {
                    constructorArgs[i] = configurationValue(constructor.getParameterTypes()[i]);
                }
                constructor.setAccessible(true);
                CustomFieldValueComputer computer = (CustomFieldValueComputer) constructor.newInstance(constructorArgs);
                Object receiverValue = receiver == null ? null : originalSnippetReflection.asObject(Object.class, receiver);
                result = originalSnippetReflection.forBoxed(annotated.getJavaKind(), computer.compute(original, annotated, receiverValue));
                assert result.getJavaKind() == annotated.getJavaKind();
            } catch (InvocationTargetException | InstantiationException | IllegalAccessException ex) {
                throw shouldNotReachHere("Error performing field recomputation for alias " + annotated.format("%H.%n"), ex);
            }
            break;
        default:
            throw shouldNotReachHere("Field recomputation of kind " + kind + " specified by alias " + annotated.format("%H.%n") + " not yet supported");
    }
    valueCache.put(receiver, result);
    return result;
}
Also used : CustomFieldValueComputer(com.oracle.svm.core.annotate.RecomputeFieldValue.CustomFieldValueComputer) Constructor(java.lang.reflect.Constructor) JavaConstant(jdk.vm.ci.meta.JavaConstant) InvocationTargetException(java.lang.reflect.InvocationTargetException) SnippetReflectionProvider(org.graalvm.compiler.api.replacements.SnippetReflectionProvider)

Example 68 with JavaConstant

use of jdk.vm.ci.meta.JavaConstant in project graal by oracle.

the class IntrinsifyMethodHandlesInvocationPlugin method processInvokeWithMethodHandle.

@SuppressWarnings("try")
private void processInvokeWithMethodHandle(GraphBuilderContext b, BytecodeProvider bytecodeProvider, ResolvedJavaMethod methodHandleMethod, ValueNode[] methodHandleArguments) {
    Plugins graphBuilderPlugins = new Plugins(((ReplacementsImpl) originalProviders.getReplacements()).getGraphBuilderPlugins());
    registerInvocationPlugins(graphBuilderPlugins.getInvocationPlugins(), bytecodeProvider);
    graphBuilderPlugins.prependParameterPlugin(new MethodHandlesParameterPlugin(methodHandleArguments));
    graphBuilderPlugins.clearInlineInvokePlugins();
    graphBuilderPlugins.prependInlineInvokePlugin(new MethodHandlesInlineInvokePlugin());
    graphBuilderPlugins.prependNodePlugin(new MethodHandlePlugin(originalProviders.getConstantReflection().getMethodHandleAccess(), false));
    /* We do all the word type rewriting because parameters to the lambda can be word types. */
    SnippetReflectionProvider originalSnippetReflection = GraalAccess.getOriginalSnippetReflection();
    WordOperationPlugin wordOperationPlugin = new WordOperationPlugin(originalSnippetReflection, new WordTypes(originalProviders.getMetaAccess(), FrameAccess.getWordKind()));
    graphBuilderPlugins.appendInlineInvokePlugin(wordOperationPlugin);
    graphBuilderPlugins.appendTypePlugin(wordOperationPlugin);
    graphBuilderPlugins.appendTypePlugin(new TrustedInterfaceTypePlugin());
    graphBuilderPlugins.appendNodePlugin(wordOperationPlugin);
    GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getSnippetDefault(graphBuilderPlugins);
    GraphBuilderPhase.Instance graphBuilder = new GraphBuilderPhase.Instance(originalProviders.getMetaAccess(), originalProviders.getStampProvider(), originalProviders.getConstantReflection(), originalProviders.getConstantFieldProvider(), graphBuilderConfig, OptimisticOptimizations.NONE, null);
    DebugContext debug = b.getDebug();
    StructuredGraph graph = new StructuredGraph.Builder(b.getOptions(), debug).method(toOriginal(methodHandleMethod)).build();
    try (DebugContext.Scope s = debug.scope("IntrinsifyMethodHandles", graph)) {
        graphBuilder.apply(graph);
        /*
             * We do not care about the improved type information from Pi nodes, so we just delete
             * them to simplify our graph.
             */
        for (PiNode pi : graph.getNodes(PiNode.TYPE)) {
            pi.replaceAndDelete(pi.object());
        }
        /*
             * Support for MethodHandle that adapt the input type to a more generic type, i.e., a
             * MethodHandle that does a dynamic type check on a parameter.
             */
        for (UnaryOpLogicNode node : graph.getNodes().filter(UnaryOpLogicNode.class).filter(v -> v instanceof IsNullNode || v instanceof InstanceOfNode)) {
            ValueNode value = node.getValue();
            if (value instanceof ParameterNode) {
                /*
                     * We just assume that the InstanceOfNode or IsNullNode are used in an If and
                     * the true-successor is actually the branch we want. If that assumption is
                     * wrong, nothing bad happens - we will just continue to report the invocation
                     * as unsupported because the updated stamp for the parameter will not simplify
                     * the graph.
                     */
                if (node instanceof InstanceOfNode) {
                    InstanceOfNode inst = (InstanceOfNode) node;
                    TypeReference typeRef = inst.type();
                    value.setStamp(new ObjectStamp(typeRef.getType(), typeRef.isExact(), !inst.allowsNull(), false));
                } else {
                    assert node instanceof IsNullNode;
                    ResolvedJavaType type = value.stamp(NodeView.DEFAULT).javaType(originalProviders.getMetaAccess());
                    value.setStamp(new ObjectStamp(type, false, /* non-null */
                    true, false));
                }
            }
        }
        /*
             * The canonicalizer converts unsafe field accesses for get/set method handles back to
             * high-level field load and store nodes.
             */
        new CanonicalizerPhase().apply(graph, new PhaseContext(originalProviders));
        for (FixedGuardNode guard : graph.getNodes(FixedGuardNode.TYPE)) {
            if (guard.next() instanceof AccessFieldNode && guard.condition() instanceof IsNullNode && guard.isNegated() && ((IsNullNode) guard.condition()).getValue() == ((AccessFieldNode) guard.next()).object()) {
                /*
                     * Method handles to load and stores fields have null checks. Remove them, since
                     * the null check is implicitly done by the field access.
                     */
                GraphUtil.removeFixedWithUnusedInputs(guard);
            }
        }
        debug.dump(DebugContext.VERY_DETAILED_LEVEL, graph, "Final intrinisfication graph");
        /*
             * After parsing (and recursive inlining during parsing), the graph must contain only
             * one invocation (and therefore only one MethodCallTargetNode), plus the parameters,
             * constants, start, and return nodes.
             */
        Node singleFunctionality = null;
        ReturnNode singleReturn = null;
        for (Node node : graph.getNodes()) {
            if (node == graph.start() || node instanceof ParameterNode || node instanceof ConstantNode || node instanceof FrameState) {
                /* Ignore the allowed framework around the nodes we care about. */
                continue;
            } else if (node instanceof Invoke) {
                /* We check the MethodCallTargetNode, so we can ignore the invoke. */
                continue;
            } else if ((node instanceof MethodCallTargetNode || node instanceof LoadFieldNode || node instanceof StoreFieldNode) && singleFunctionality == null) {
                singleFunctionality = node;
                continue;
            } else if (node instanceof ReturnNode && singleReturn == null) {
                singleReturn = (ReturnNode) node;
                continue;
            }
            throw new UnsupportedFeatureException("Invoke with MethodHandle argument could not be reduced to at most a single call: " + methodHandleMethod.format("%H.%n(%p)"));
        }
        if (singleFunctionality instanceof MethodCallTargetNode) {
            MethodCallTargetNode singleCallTarget = (MethodCallTargetNode) singleFunctionality;
            assert singleReturn.result() == null || singleReturn.result() == singleCallTarget.invoke();
            /*
                 * Replace the originalTarget with the replacementTarget. Note that the
                 * replacementTarget node belongs to a different graph than originalTarget, so we
                 * need to match parameter back to the original graph and allocate a new
                 * MethodCallTargetNode for the original graph.
                 */
            ValueNode[] replacedArguments = new ValueNode[singleCallTarget.arguments().size()];
            for (int i = 0; i < replacedArguments.length; i++) {
                replacedArguments[i] = lookup(b, methodHandleArguments, singleCallTarget.arguments().get(i));
            }
            b.handleReplacedInvoke(singleCallTarget.invokeKind(), lookup(singleCallTarget.targetMethod()), replacedArguments, false);
        } else if (singleFunctionality instanceof LoadFieldNode) {
            LoadFieldNode fieldLoad = (LoadFieldNode) singleFunctionality;
            b.addPush(b.getInvokeReturnType().getJavaKind(), LoadFieldNode.create(null, lookup(b, methodHandleArguments, fieldLoad.object()), lookup(fieldLoad.field())));
        } else if (singleFunctionality instanceof StoreFieldNode) {
            StoreFieldNode fieldStore = (StoreFieldNode) singleFunctionality;
            b.add(new StoreFieldNode(lookup(b, methodHandleArguments, fieldStore.object()), lookup(fieldStore.field()), lookup(b, methodHandleArguments, fieldStore.value())));
        } else if (singleReturn.result() != null) {
            /* Replace the invocation with he constant result. */
            JavaConstant constantResult = singleReturn.result().asJavaConstant();
            assert b.getInvokeReturnType().getJavaKind() == constantResult.getJavaKind();
            b.addPush(constantResult.getJavaKind(), ConstantNode.forConstant(lookup(constantResult), universeProviders.getMetaAccess()));
        } else {
            /* No invoke and no return value, so nothing to do. */
            assert b.getInvokeReturnType().getJavaKind() == JavaKind.Void;
        }
    } catch (Throwable ex) {
        throw debug.handle(ex);
    }
}
Also used : ObjectStamp(org.graalvm.compiler.core.common.type.ObjectStamp) MethodCallTargetNode(org.graalvm.compiler.nodes.java.MethodCallTargetNode) AccessFieldNode(org.graalvm.compiler.nodes.java.AccessFieldNode) ReturnNode(org.graalvm.compiler.nodes.ReturnNode) FixedGuardNode(org.graalvm.compiler.nodes.FixedGuardNode) PiNode(org.graalvm.compiler.nodes.PiNode) UnaryOpLogicNode(org.graalvm.compiler.nodes.UnaryOpLogicNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) IsNullNode(org.graalvm.compiler.nodes.calc.IsNullNode) FloatingNode(org.graalvm.compiler.nodes.calc.FloatingNode) LoadFieldNode(org.graalvm.compiler.nodes.java.LoadFieldNode) ConstantNode(org.graalvm.compiler.nodes.ConstantNode) InstanceOfNode(org.graalvm.compiler.nodes.java.InstanceOfNode) ParameterNode(org.graalvm.compiler.nodes.ParameterNode) StoreFieldNode(org.graalvm.compiler.nodes.java.StoreFieldNode) Node(org.graalvm.compiler.graph.Node) WordTypes(org.graalvm.compiler.word.WordTypes) JavaConstant(jdk.vm.ci.meta.JavaConstant) PiNode(org.graalvm.compiler.nodes.PiNode) FrameState(org.graalvm.compiler.nodes.FrameState) UnaryOpLogicNode(org.graalvm.compiler.nodes.UnaryOpLogicNode) ResolvedJavaType(jdk.vm.ci.meta.ResolvedJavaType) Invoke(org.graalvm.compiler.nodes.Invoke) PhaseContext(org.graalvm.compiler.phases.tiers.PhaseContext) SnippetReflectionProvider(org.graalvm.compiler.api.replacements.SnippetReflectionProvider) ConstantNode(org.graalvm.compiler.nodes.ConstantNode) StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) ParameterNode(org.graalvm.compiler.nodes.ParameterNode) TypeReference(org.graalvm.compiler.core.common.type.TypeReference) GraphBuilderPhase(org.graalvm.compiler.java.GraphBuilderPhase) InvocationPlugins(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins) Plugins(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins) StoreFieldNode(org.graalvm.compiler.nodes.java.StoreFieldNode) UnsupportedFeatureException(com.oracle.graal.pointsto.constraints.UnsupportedFeatureException) GraphBuilderConfiguration(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration) DebugContext(org.graalvm.compiler.debug.DebugContext) LoadFieldNode(org.graalvm.compiler.nodes.java.LoadFieldNode) TrustedInterfaceTypePlugin(com.oracle.svm.core.graal.phases.TrustedInterfaceTypePlugin) FixedGuardNode(org.graalvm.compiler.nodes.FixedGuardNode) ReturnNode(org.graalvm.compiler.nodes.ReturnNode) MethodCallTargetNode(org.graalvm.compiler.nodes.java.MethodCallTargetNode) IsNullNode(org.graalvm.compiler.nodes.calc.IsNullNode) AccessFieldNode(org.graalvm.compiler.nodes.java.AccessFieldNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) CanonicalizerPhase(org.graalvm.compiler.phases.common.CanonicalizerPhase) InstanceOfNode(org.graalvm.compiler.nodes.java.InstanceOfNode) MethodHandlePlugin(org.graalvm.compiler.replacements.MethodHandlePlugin) WordOperationPlugin(org.graalvm.compiler.word.WordOperationPlugin)

Example 69 with JavaConstant

use of jdk.vm.ci.meta.JavaConstant in project graal by oracle.

the class JNINativeCallWrapperMethod method buildGraph.

@Override
public StructuredGraph buildGraph(DebugContext debug, ResolvedJavaMethod method, HostedProviders providers, Purpose purpose) {
    JNIGraphKit kit = new JNIGraphKit(debug, providers, method);
    StructuredGraph graph = kit.getGraph();
    InvokeWithExceptionNode handleFrame = kit.nativeCallPrologue();
    ValueNode callAddress = kit.nativeCallAddress(kit.createObject(linkage));
    ValueNode environment = kit.environment();
    JavaType javaReturnType = method.getSignature().getReturnType(null);
    JavaType[] javaArgumentTypes = method.toParameterTypes();
    List<ValueNode> javaArguments = kit.loadArguments(javaArgumentTypes);
    List<ValueNode> jniArguments = new ArrayList<>(2 + javaArguments.size());
    List<JavaType> jniArgumentTypes = new ArrayList<>(jniArguments.size());
    JavaType environmentType = providers.getMetaAccess().lookupJavaType(JNIEnvironment.class);
    JavaType objectHandleType = providers.getMetaAccess().lookupJavaType(JNIObjectHandle.class);
    jniArguments.add(environment);
    jniArgumentTypes.add(environmentType);
    if (method.isStatic()) {
        JavaConstant clazz = providers.getConstantReflection().asJavaClass(method.getDeclaringClass());
        ConstantNode clazzNode = ConstantNode.forConstant(clazz, providers.getMetaAccess(), graph);
        ValueNode box = kit.boxObjectInLocalHandle(clazzNode);
        jniArguments.add(box);
        jniArgumentTypes.add(objectHandleType);
    }
    for (int i = 0; i < javaArguments.size(); i++) {
        ValueNode arg = javaArguments.get(i);
        JavaType argType = javaArgumentTypes[i];
        if (javaArgumentTypes[i].getJavaKind().isObject()) {
            ValueNode obj = javaArguments.get(i);
            arg = kit.boxObjectInLocalHandle(obj);
            argType = objectHandleType;
        }
        jniArguments.add(arg);
        jniArgumentTypes.add(argType);
    }
    assert jniArguments.size() == jniArgumentTypes.size();
    JavaType jniReturnType = javaReturnType;
    if (jniReturnType.getJavaKind().isObject()) {
        jniReturnType = objectHandleType;
    }
    if (getOriginal().isSynchronized()) {
        ValueNode monitorObject;
        if (method.isStatic()) {
            Constant hubConstant = providers.getConstantReflection().asObjectHub(method.getDeclaringClass());
            DynamicHub hub = (DynamicHub) SubstrateObjectConstant.asObject(hubConstant);
            monitorObject = ConstantNode.forConstant(SubstrateObjectConstant.forObject(hub), providers.getMetaAccess(), graph);
        } else {
            monitorObject = javaArguments.get(0);
        }
        MonitorIdNode monitorId = graph.add(new MonitorIdNode(kit.getFrameState().lockDepth(false)));
        MonitorEnterNode monitorEnter = kit.append(new MonitorEnterNode(monitorObject, monitorId));
        kit.getFrameState().pushLock(monitorEnter.object(), monitorEnter.getMonitorId());
        monitorEnter.setStateAfter(kit.getFrameState().create(kit.bci(), monitorEnter));
    }
    kit.getFrameState().clearLocals();
    Signature jniSignature = new JNISignature(jniArgumentTypes, jniReturnType);
    ValueNode returnValue = kit.createCFunctionCall(callAddress, method, jniArguments, jniSignature, true, false);
    if (getOriginal().isSynchronized()) {
        MonitorIdNode monitorId = kit.getFrameState().peekMonitorId();
        ValueNode monitorObject = kit.getFrameState().popLock();
        MonitorExitNode monitorExit = kit.append(new MonitorExitNode(monitorObject, monitorId, null));
        monitorExit.setStateAfter(kit.getFrameState().create(kit.bci(), monitorExit));
    }
    if (javaReturnType.getJavaKind().isObject()) {
        // before destroying handles in epilogue
        returnValue = kit.unboxHandle(returnValue);
    }
    kit.nativeCallEpilogue(handleFrame);
    kit.rethrowPendingException();
    if (javaReturnType.getJavaKind().isObject()) {
        // Just before return to always run the epilogue and never suppress a pending exception
        returnValue = castObject(kit, returnValue, (ResolvedJavaType) javaReturnType);
    }
    kit.createReturn(returnValue, javaReturnType.getJavaKind());
    kit.mergeUnwinds();
    assert graph.verify();
    return graph;
}
Also used : MonitorIdNode(org.graalvm.compiler.nodes.java.MonitorIdNode) Constant(jdk.vm.ci.meta.Constant) SubstrateObjectConstant(com.oracle.svm.core.meta.SubstrateObjectConstant) JavaConstant(jdk.vm.ci.meta.JavaConstant) ArrayList(java.util.ArrayList) JavaConstant(jdk.vm.ci.meta.JavaConstant) MonitorExitNode(org.graalvm.compiler.nodes.java.MonitorExitNode) ResolvedJavaType(jdk.vm.ci.meta.ResolvedJavaType) ResolvedJavaType(jdk.vm.ci.meta.ResolvedJavaType) JavaType(jdk.vm.ci.meta.JavaType) ConstantNode(org.graalvm.compiler.nodes.ConstantNode) StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) InvokeWithExceptionNode(org.graalvm.compiler.nodes.InvokeWithExceptionNode) MonitorEnterNode(org.graalvm.compiler.nodes.java.MonitorEnterNode) Signature(jdk.vm.ci.meta.Signature) ValueNode(org.graalvm.compiler.nodes.ValueNode) DynamicHub(com.oracle.svm.core.hub.DynamicHub)

Example 70 with JavaConstant

use of jdk.vm.ci.meta.JavaConstant in project graal by oracle.

the class ScalaAnalysisPlugin method handleInvoke.

@Override
public boolean handleInvoke(GraphBuilderContext b, ResolvedJavaMethod method, ValueNode[] args) {
    /* ClassTag(<type>.class) */
    if (method.getDeclaringClass().getName().equals("Lscala/reflect/ClassTag$;") && method.getName().equals("apply") && args.length == 2) {
        JavaConstant clazzConstant = args[1].asJavaConstant();
        if (clazzConstant != null) {
            AnalysisType type = (AnalysisType) b.getConstantReflection().asJavaType(clazzConstant);
            for (int i = 0; i < SUPPORTED_LEVEL_OF_NESTED_ARRAYS; i++) {
                type = type.getArrayClass();
                type.registerAsInHeap();
            }
        }
    }
    return false;
}
Also used : AnalysisType(com.oracle.graal.pointsto.meta.AnalysisType) JavaConstant(jdk.vm.ci.meta.JavaConstant)

Aggregations

JavaConstant (jdk.vm.ci.meta.JavaConstant)122 ConstantNode (org.graalvm.compiler.nodes.ConstantNode)33 ValueNode (org.graalvm.compiler.nodes.ValueNode)24 Test (org.junit.Test)19 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)17 StructuredGraph (org.graalvm.compiler.nodes.StructuredGraph)15 Stamp (org.graalvm.compiler.core.common.type.Stamp)11 LIRValueUtil.asJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.asJavaConstant)11 LIRValueUtil.isJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant)11 JavaKind (jdk.vm.ci.meta.JavaKind)10 Constant (jdk.vm.ci.meta.Constant)9 ResolvedJavaType (jdk.vm.ci.meta.ResolvedJavaType)8 AllocatableValue (jdk.vm.ci.meta.AllocatableValue)7 Condition (org.graalvm.compiler.core.common.calc.Condition)7 IntegerStamp (org.graalvm.compiler.core.common.type.IntegerStamp)6 FixedGuardNode (org.graalvm.compiler.nodes.FixedGuardNode)6 LogicNode (org.graalvm.compiler.nodes.LogicNode)6 FixedNode (org.graalvm.compiler.nodes.FixedNode)5 ParameterNode (org.graalvm.compiler.nodes.ParameterNode)5 ReturnNode (org.graalvm.compiler.nodes.ReturnNode)5