You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GR-64533] Fix uncached should include all specializations that do not have multiple instances, to avoid bad stack values produced by uncached interpreters.
Copy file name to clipboardExpand all lines: compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/truffle/test/LibrarySplittingStrategyTest.java
Copy file name to clipboardExpand all lines: truffle/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ This changelog summarizes major changes between Truffle versions relevant to lan
14
14
* GR-63201 Added `TruffleLanguage.Registration.optionalResources` and `TruffleInstrument.Registration.optionalResources` attributes to support optional resources which implementations are not available at the runtime. Optional resources, if omitted at runtime, can still be used as long as their resource path is specified via the `polyglot.engine.resourcePath.<componentId>` system property.
15
15
* GR-61282 Bytecode DSL: Bytecode builders now also allow emitting source sections using the start and length source indices in the end method in addition to the begin method. This was added to support linear parsing without look-ahead.
16
16
* GR-61282 Bytecode DSL: (breaking) If multiple source sections were specified around root operations, only the innermost source section directly encapsulating the root will be accessible. Other encapsulating source sections will be discarded for outer most root operations.
17
+
* GR-64533 By default every specialization is now included for {@link GenerateUncached}, except specializations that require a {@link Specialization#limit() limit} and are replaced, those are excluded by default. By setting `@Specialization(excludeForUncached=..)` explicitly the default behavior can be overridden, e.g. to include or exclude a specialization for uncached. Specializations which are no longer compatible with uncached will produce a warning instead of an error for compatibility reasons until all languages are migrated. It is therefore expected that language implementations may see new warnings with this version.
17
18
18
19
## Version 24.2.0
19
20
* GR-60636 Truffle now stops compiling when the code cache fills up on HotSpot. A warning is printed when that happens.
Copy file name to clipboardExpand all lines: truffle/src/com.oracle.truffle.api.bytecode.test/src/com/oracle/truffle/api/bytecode/test/SetTraceFuncTest.java
Copy file name to clipboardExpand all lines: truffle/src/com.oracle.truffle.api.bytecode.test/src/com/oracle/truffle/api/bytecode/test/basic_interpreter/BasicInterpreter.java
Copy file name to clipboardExpand all lines: truffle/src/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/CachedNodeTest.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -377,8 +377,8 @@ public abstract static class ErrorNode4 extends Node {
377
377
@Specialization
378
378
staticObjects0(Objectarg0,
379
379
@ExpectError("Failed to generate code for @GenerateUncached: The specialization uses @Cached without valid uncached expression. " +
380
-
"Error parsing expression 'getUncached()': The method getUncached is undefined for the enclosing scope.. " +
381
-
"To resolve this specify the uncached or allowUncached attribute in @Cached.") //
380
+
"Error parsing expression 'getUncached()': The method getUncached is undefined for the enclosing scope. " +
381
+
"To resolve this specify the uncached or allowUncached attribute in @Cached or exclude the specialization from @GenerateUncached using @Specialization(excludeForUncached=true).") //
@ExpectError("Failed to generate code for @GenerateUncached: The specialization uses @Cached without valid uncached expression. " +
485
-
"Error parsing expression 'getUncached()': The method getUncached is undefined for the enclosing scope.. " +
486
-
"To resolve this specify the uncached or allowUncached attribute in @Cached.") //
621
+
"Error parsing expression 'getUncached()': The method getUncached is undefined for the enclosing scope. " +
622
+
"To resolve this specify the uncached or allowUncached attribute in @Cached or exclude the specialization from @GenerateUncached using @Specialization(excludeForUncached=true).") //
487
623
@Cached("nonTrivialCache(v)") intcachedV) {
488
624
returnv;
489
625
}
@@ -533,23 +669,6 @@ static int f0(int v) {
533
669
534
670
}
535
671
536
-
@GenerateUncached
537
-
abstractstaticclassErrorNode7extendsNode {
538
-
539
-
abstractObjectexecute(Objectarg);
540
-
541
-
@ExpectError("Failed to generate code for @GenerateUncached: The specialization rewrites on exceptions and there is no specialization that replaces it. Add a replaces=\"s1\" class to specialization below to resolve this problem.")
@ExpectError("Failed to generate code for @GenerateUncached: The specialization uses @Cached without valid uncached expression. " +
561
-
"Error parsing expression 'getUncached()': The method getUncached is undefined for the enclosing scope.. " +
562
-
"To resolve this specify the uncached or allowUncached attribute in @Cached.")//
680
+
"Error parsing expression 'getUncached()': The method getUncached is undefined for the enclosing scope. " +
681
+
"To resolve this specify the uncached or allowUncached attribute in @Cached or exclude the specialization from @GenerateUncached using @Specialization(excludeForUncached=true).")//
563
682
@Cached("foo(v)") Objectcached) {
564
683
return"s1";
565
684
}
@@ -768,4 +887,57 @@ public void testNodeChild1() {
Copy file name to clipboardExpand all lines: truffle/src/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SpecializationStatisticsTest.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -74,10 +74,10 @@ public class SpecializationStatisticsTest {
0 commit comments