Browse Source

clean up a bit more

Robert Muir 9 years ago
parent
commit
60176afdde

+ 2 - 2
modules/lang-painless/src/main/java/org/elasticsearch/painless/DefBootstrap.java

@@ -149,7 +149,7 @@ public final class DefBootstrap {
          * Creates the {@link MethodHandle} for the megamorphic call site
          * using {@link ClassValue} and {@link MethodHandles#exactInvoker(MethodType)}:
          */
-        private MethodHandle createMegamorphicHandle(final Object[] callArgs) throws Throwable {
+        private MethodHandle createMegamorphicHandle() throws Throwable {
             final MethodType type = type();
             final ClassValue<MethodHandle> megamorphicCache = new ClassValue<MethodHandle>() {
                 @Override
@@ -178,7 +178,7 @@ public final class DefBootstrap {
         Object fallback(final Object[] callArgs) throws Throwable {
             if (depth >= MAX_DEPTH) {
                 // we revert the whole cache and build a new megamorphic one
-                final MethodHandle target = this.createMegamorphicHandle(callArgs);
+                final MethodHandle target = this.createMegamorphicHandle();
                 
                 setTarget(target);
                 return target.invokeWithArguments(callArgs);                    

+ 1 - 1
modules/lang-painless/src/main/java/org/elasticsearch/painless/node/ECapturingFunctionRef.java

@@ -84,7 +84,7 @@ public class ECapturingFunctionRef extends AExpression {
         if (defPointer != null) {
             // dynamic interface: push captured parameter on stack
             // TODO: don't do this: its just to cutover :)
-            writer.push(defPointer);
+            writer.push((String)null);
             writer.visitVarInsn(captured.type.type.getOpcode(Opcodes.ILOAD), captured.slot);
         } else if (ref == null) {
             // typed interface, dynamic implementation

+ 1 - 1
modules/lang-painless/src/main/java/org/elasticsearch/painless/node/EFunctionRef.java

@@ -111,7 +111,7 @@ public class EFunctionRef extends AExpression {
             }
         } else {
             // TODO: don't do this: its just to cutover :)
-            writer.push(defPointer);
+            writer.push((String)null);
         }
     }
 }