protected JavaType lookupType(int cpi, int bytecode) { maybeEagerlyResolve(cpi, bytecode); JavaType result = constantPool.lookupType(cpi, bytecode); assert !graphBuilderConfig.unresolvedIsError() || result instanceof ResolvedJavaType; return result; }
private Object lookupConstant(int cpi, int opcode) { maybeEagerlyResolve(cpi, opcode); Object result = constantPool.lookupConstant(cpi); assert !graphBuilderConfig.unresolvedIsError() || !(result instanceof JavaType) || (result instanceof ResolvedJavaType) : result; return result; }
private JavaMethod lookupMethod(int cpi, int opcode) { maybeEagerlyResolve(cpi, opcode); JavaMethod result = constantPool.lookupMethod(cpi, opcode); assert !graphBuilderConfig.unresolvedIsError() || result instanceof ResolvedJavaMethod : unresolvedMethodAssertionMessage(result); return result; }
/** * @param field the unresolved field * @param receiver the object containing the field or {@code null} if {@code field} is static */ protected void handleUnresolvedLoadField(JavaField field, ValueNode receiver) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param field the unresolved field * @param value the value being stored to the field * @param receiver the object containing the field or {@code null} if {@code field} is static */ protected void handleUnresolvedStoreField(JavaField field, ValueNode value, ValueNode receiver) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type the type being instantiated */ protected void handleIllegalNewInstance(JavaType type) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type the type being instantiated * @param dims the dimensions for the multi-array */ protected void handleUnresolvedNewMultiArray(JavaType type, ValueNode[] dims) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type the unresolved type of the constant */ protected void handleUnresolvedLoadConstant(JavaType type) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); /* * Track source position for deopt nodes even if * GraphBuilderConfiguration.trackNodeSourcePosition is not set. */ deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type the type being instantiated */ protected void handleUnresolvedNewInstance(JavaType type) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type the type of the array being instantiated * @param length the length of the array */ protected void handleUnresolvedNewObjectArray(JavaType type, ValueNode length) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type */ protected void handleUnresolvedExceptionType(JavaType type) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param javaMethod * @param invokeKind */ protected void handleUnresolvedInvoke(JavaMethod javaMethod, InvokeKind invokeKind) { assert !graphBuilderConfig.unresolvedIsError(); DeoptimizeNode deopt = append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); }
/** * @param type the unresolved type of the type check * @param object the object value whose type is being checked against {@code type} */ protected void handleUnresolvedCheckCast(JavaType type, ValueNode object) { assert !graphBuilderConfig.unresolvedIsError(); append(new FixedGuardNode(graph.addOrUniqueWithInputs(IsNullNode.create(object)), Unresolved, InvalidateRecompile)); frameState.push(JavaKind.Object, appendConstant(JavaConstant.NULL_POINTER)); }
protected JavaField lookupField(JavaField result) { assert !graphBuilderConfig.unresolvedIsError() || result instanceof ResolvedJavaField : "Not resolved: " + result; if (parsingIntrinsic() || eagerInitializing) { if (result instanceof ResolvedJavaField) { ResolvedJavaType declaringClass = ((ResolvedJavaField) result).getDeclaringClass(); if (!declaringClass.isInitialized()) { // Even with eager initialization, superinterfaces are not always initialized. // See StaticInterfaceFieldTest assert !eagerInitializing || declaringClass.isInterface() : "Declaring class not initialized but not an interface? " + declaringClass; initialize(declaringClass); } } } assert !uninitializedIsError || (result instanceof ResolvedJavaField && ((ResolvedJavaField) result).getDeclaringClass().isInitialized()) : result; return result; }
/** * @param type the unresolved type of the type check * @param object the object value whose type is being checked against {@code type} */ protected void handleUnresolvedInstanceOf(JavaType type, ValueNode object) { assert !graphBuilderConfig.unresolvedIsError(); AbstractBeginNode successor = graph.add(new BeginNode()); DeoptimizeNode deopt = graph.add(new DeoptimizeNode(InvalidateRecompile, Unresolved)); deopt.updateNodeSourcePosition(() -> createBytecodePosition()); append(new IfNode(graph.addOrUniqueWithInputs(IsNullNode.create(object)), successor, deopt, 1)); lastInstr = successor; frameState.push(JavaKind.Int, appendConstant(JavaConstant.INT_0)); }
} else { eagerInitializing = graphBuilderConfig.eagerResolving(); uninitializedIsError = graphBuilderConfig.unresolvedIsError();