You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/04/27 23:26:10 UTC

[groovy] branch master updated: Eliminate redundant checks and trying to cache spread calls

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

sunlan 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 e3c39cb  Eliminate redundant checks and trying to cache spread calls
e3c39cb is described below

commit e3c39cb959a4519f60b013f0bba3701fe921c2ae
Author: Daniel Sun <su...@apache.org>
AuthorDate: Tue Apr 28 07:25:48 2020 +0800

    Eliminate redundant checks and trying to cache spread calls
    
    spread calls won't be cacheable
---
 src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
index a32cc2a..5391b3d 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
@@ -305,11 +305,7 @@ public class IndyInterface {
                 );
 
         if (NULL_METHOD_HANDLE_WRAPPER == mhw) {
-            final MethodHandleWrapper fbMhw = fallbackSupplier.get();
-            if (fbMhw.isCanSetTarget()) {
-                doWithCallSite(callSite, arguments, (cs, receiver) -> cs.put(receiver.getClass().getName(), fbMhw));
-            }
-            mhw = fbMhw;
+            mhw = fallbackSupplier.get();
         }
 
         if (mhw.isCanSetTarget() && (callSite.getTarget() != mhw.getTargetMethodHandle()) && (mhw.getLatestHitCount() > INDY_OPTIMIZE_THRESHOLD)) {