#14579·graal

使用 FrameWithoutBoxing 材料化的 Bytecode DSL 根无法在 Native Image 中进行第 2 层运行时编译

作者: guillermomolina创建于 2026年10月1日更新于 2026年10月1日
标签truffle

A minimal generated Bytecode DSL root compiles successfully at Tier 2 on the JVM, but the same root fails Truffle Tier-2 runtime compilation when executed inside a Native Image. The minimum root: - uses `@GenerateBytecode(enableYield = false)`; - declares no custom operations; - has no locals, loops, or yields; - only returns the constant `1`. The Native runtime compiler reports: "Object of type Lcom/oracle/truffle/api/impl/FrameWithoutBoxing; should not be materialized (must not pass virtual object into an invoke that cannot be inlined)". The guest result is still `1` because `CompilationFailureAction=Print` reports the bailout and execution falls back to the interpreter. The issue is the failed Tier-2 compilation, not an incorrect guest result. On the same `25.5.5-SNAPSHOT` plane, the JVM compiles the same `MiniPlainRootGen` successfully at Tier 2.