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
Copy file name to clipboardExpand all lines: truffle/CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ Guards that only bind idempotent methods and no dynamic values can always be ass
49
49
The generated code leverages this information and asserts instead of executes the guard on the fast-path.
50
50
The DSL now emits warnings with for all guards where specifying the annotations may be beneficial.
51
51
Note that all guards that do not bind dynamic values are assumed idempotent by default for compatibility reasons.
52
+
* GR-43903 Usages of `@Specialization(assumptions=...)` that reach a `@Fallback` specialization now produce a suppressable warning. In most situations, such specializations should be migrated to use a regular guard instead. For example, instead of using `@Specialization(assumptions = "assumption")` you might need to be using `@Specialization(guards = "assumption.isValid()")`.
53
+
* GR-43903 Added `@Idempotent` and `@NonIdempotent` DSL annotations useful for DSL guard optimizations. Guards that only bind idempotent methods and no dynamic values can always be assumed `true` after they were `true` once on the slow-path. The generated code leverages this information and asserts instead of executes the guard on the fast-path. The DSL now emits warnings with for all guards where specifying the annotations may be beneficial. Note that all guards that do not bind dynamic values are assumed idempotent by default for compatibility reasons.
52
54
53
55
54
56
* GR-43903 DSL method guards that do not bind dynamic values are no longer just asserted on the fast-path.
Copy file name to clipboardExpand all lines: truffle/docs/DSLWarnings.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The following warning keys are supported:
26
26
*`truffle-static-method` warnings when the DSL recommends to use the `static` modifier.
27
27
*`truffle-unused` warnings if a DSL attribute or annotation has no effect and is recommended to be removed.
28
28
*`truffle-abstract-export` warnings if an abstract message of a Truffle library is not exported.
29
-
*`truffle-assumption` if the assumptions feature is used with a specialization that may never have multiple instances.
29
+
*`truffle-assumption` if the assumptions feature is used with a specialization that reaches a `@Fallback` specialization.
30
30
*`truffle-guard` if a guard uses methods where a `@Idempotent` or `@NonIdempotent` method may be beneficial for the generated code.
31
31
32
32
Specific warnings can also be suppressed globally using the `-Atruffle.dsl.SuppressWarnings=truffle-inlining,truffle-neverdefault` Java compiler processor option.
Copy file name to clipboardExpand all lines: truffle/src/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/CachedReachableFallbackTest.java
0 commit comments