You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/05/29 03:20:29 UTC

[groovy] 02/02: GROOVY-10643: CLONE - Consolidation of VMPlugin didn't account for API calls in the Groovy runtime

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 743f1bff706794e11ab6ebbad45b948f4282e1ce
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun May 29 13:20:06 2022 +1000

    GROOVY-10643: CLONE - Consolidation of VMPlugin didn't account for API calls in the Groovy runtime
---
 .../java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java    | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java b/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java
index 3a12a5267f..90b69a3d09 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java
@@ -18,6 +18,8 @@
  */
 package org.codehaus.groovy.vmplugin.v7;
 
+import org.codehaus.groovy.vmplugin.VMPluginFactory;
+
 import java.lang.invoke.CallSite;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodHandles.Lookup;
@@ -97,6 +99,14 @@ public class IndyInterface {
      */
     public static final MethodHandles.Lookup LOOKUP = org.codehaus.groovy.vmplugin.v8.IndyInterface.LOOKUP;
 
+
+    /**
+     * Callback for constant meta class update change (legacy API)
+     */
+    protected static void invalidateSwitchPoints() {
+        VMPluginFactory.getPlugin().invalidateCallSites();
+    }
+
     /**
      * bootstrap method for method calls from Groovy compiled code with indy
      * enabled. This method gets a flags parameter which uses the following