Skip to content

Instantly share code, notes, and snippets.

@enebo
Created December 4, 2020 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enebo/a950dccf08914ef51d85d8f085169435 to your computer and use it in GitHub Desktop.
Save enebo/a950dccf08914ef51d85d8f085169435 to your computer and use it in GitHub Desktop.
diff --git a/core/src/main/java/org/jruby/ir/instructions/CallBase.java b/core/src/main/java/org/jruby/ir/instructions/CallBase.java
index 8ea4f58bae..20ff6865a8 100644
--- a/core/src/main/java/org/jruby/ir/instructions/CallBase.java
+++ b/core/src/main/java/org/jruby/ir/instructions/CallBase.java
@@ -549,7 +549,7 @@ public abstract class CallBase extends NOperandInstr implements ClosureAccepting
return callSite.call(context, self, object, values, preparedBlock);
}
- protected IRubyObject[] prepareArguments(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope dynamicScope, Object[] temp) {
+ public IRubyObject[] prepareArguments(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope dynamicScope, Object[] temp) {
return splatMap != null ?
prepareArgumentsComplex(context, self, currScope, dynamicScope, temp) :
prepareArgumentsSimple(context, self, currScope, dynamicScope, temp);
diff --git a/core/src/main/java/org/jruby/ir/interpreter/ExitableInterpreterContext.java b/core/src/main/java/org/jruby/ir/interpreter/ExitableInterpreterContext.java
index 8dda3e3108..23421ee860 100644
--- a/core/src/main/java/org/jruby/ir/interpreter/ExitableInterpreterContext.java
+++ b/core/src/main/java/org/jruby/ir/interpreter/ExitableInterpreterContext.java
@@ -33,14 +33,6 @@ public class ExitableInterpreterContext extends InterpreterContext {
* @returns the live ruby values for the operand to the original super call.
*/
public IRubyObject[] getArgs(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temps) {
- Operand[] args = superCall.getCallArgs();
- int length = args.length;
- IRubyObject[] values = new IRubyObject[length];
-
- for(int i = 0; i < length; i++) {
- values[i] = (IRubyObject) args[i].retrieve(context, self, currScope, currDynScope, temps);
- }
-
- return values;
+ return superCall.prepareArguments(context, self, currScope, currDynScope, temps);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment