This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 00d067fc3b GROOVY-12165: note the call override cache's intended
end-state (GEP-27)
00d067fc3b is described below
commit 00d067fc3bce66a53adf6f6f9c9e00e0f48a7cde
Author: Paul King <[email protected]>
AuthorDate: Wed Jul 15 13:22:11 2026 +1000
GROOVY-12165: note the call override cache's intended end-state (GEP-27)
---
src/main/java/groovy/lang/Closure.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/main/java/groovy/lang/Closure.java
b/src/main/java/groovy/lang/Closure.java
index 000f8b595e..3845f661b6 100644
--- a/src/main/java/groovy/lang/Closure.java
+++ b/src/main/java/groovy/lang/Closure.java
@@ -1430,6 +1430,13 @@ public abstract class Closure<V> extends
GroovyObjectSupport implements Cloneabl
}
}
+ /**
+ * NOTE: this reflective cache is a bridge, not a destination. For
compiler-generated closure
+ * classes the long-term plan (GEP-27) is for the compiler to emit a
{@code call(Object...)}
+ * override that arity-dispatches directly to the right {@code doCall} —
plain virtual
+ * dispatch, no reflection, module-system-clean — at which point this
cache serves only
+ * legacy jars and hand-written subclasses. Extend it with that
destination in mind.
+ */
private static final class CallOverride {
/**
* Cached arities: {@code 0..ARITY_LIMIT-1}. Sized to cover every
callback shape the GDK