oracle/graal · error · GraalError

Call to should have been intrinsified by a . This is…

Error message

Call to %s should have been intrinsified by a %s. This is typically caused by Eclipse failing to run an annotation processor. This can usually be fixed by forcing Eclipse to rebuild the source file in which %s is declared

What it means

While parsing an intrinsic's graph, every call must be inlined, intrinsified, or be a call to the original method. ReplacementsImpl.notifyNotInlined (ReplacementsImpl.java:230) found a call to a method that HAS an intrinsifying plugin (e.g., a @NodeIntrinsic-annotated method) but was not intrinsified. The classic root cause named in the message: Eclipse did not run the Graal annotation processor, so the generated plugin lookup metadata is stale.

Solutions

  1. Force Eclipse to rebuild the source file that declares the intrinsified method (the message names it): Project > Clean, or touch and re-save the file
  2. Prefer building/running via mx (mx build / mx ideinit refresh) so annotation processors always run
  3. Verify the node intrinsic's signature matches the plugin (parameter types/counts) so the plugin actually applies
Defensive patterns

Strategy: try-catch

Try / catch

try {
    result = compileWithEclipseClasses();
} catch (GraalError e) {
    if (e.getMessage().contains("annotation")) { cleanAndRebuildEclipseProject(); result = compileWithEclipseClasses(); }
    else throw e;
}

Prevention

When it happens

Trigger: Compiling Graal compiler sources in Eclipse where the annotation processor did not regenerate plugin metadata after editing a file containing @NodeIntrinsic (or similar) usages; a call site inside an intrinsic to a method with a registered plugin that failed to apply.

Common situations: IDE-only builds after adding/renaming node intrinsics; mixed IDE + mx builds where Eclipse's output is stale; CI works but local Eclipse run fails.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/5e73f85d98c286a1. Report an issue: GitHub.

Appendix: source

Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/ReplacementsImpl.java:230

            // Force inlining when parsing replacements
            return createIntrinsicInlineInfo(method, defaultBytecodeProvider);
        } else {
            assert inRuntimeCode() || AnnotationValueSupport.getAnnotationValue(method, NodeIntrinsic.class) == null : String.format("@%s method %s must only be called from within a replacement%n%s",
                            NodeIntrinsic.class.getSimpleName(),
                            method.format("%h.%n"), b);
        }
        return null;
    }

    @Override
    public void notifyNotInlined(GraphBuilderContext b, ResolvedJavaMethod method, Invoke invoke) {
        if (b.parsingIntrinsic()) {
            IntrinsicContext intrinsic = b.getIntrinsic();
            if (!intrinsic.isCallToOriginal(method)) {
                Class<? extends GraphBuilderPlugin> pluginClass = getIntrinsifyingPlugin(method);
                if (pluginClass != null) {
                    String methodDesc = method.format("%H.%n(%p)");
                    throw new GraalError("Call to %s should have been intrinsified by a %s. " +
                                    "This is typically caused by Eclipse failing to run an annotation " +
                                    "processor. This can usually be fixed by forcing Eclipse to rebuild " +
                                    "the source file in which %s is declared",
                                    methodDesc, pluginClass.getSimpleName(), methodDesc);
                }
                throw new GraalError("All non-recursive calls in the intrinsic %s must be inlined or intrinsified: found call to %s",
                                intrinsic.getIntrinsicMethod().format("%H.%n(%p)"), method.format("%h.%n(%p)"));
            }
        }
    }

    // This map is key'ed by a class name instead of a Class object so that
    // it is stable across VM executions (in support of replay compilation).
    private final EconomicMap<String, SnippetTemplateCache> snippetTemplateCache;

    @SuppressWarnings("this-escape")
    public ReplacementsImpl(DebugDumpHandlersFactory debugHandlersFactory, Providers providers, BytecodeProvider bytecodeProvider, TargetDescription target) {
        this.providers = providers.copyWith(this);

View on GitHub (pinned to a66e9ccd1d)