protected IRubyObject[] prepareArguments(ThreadContext context, IRubyObject self, Operand[] arguments, DynamicScope dynamicScope, Object[] temp) { return containsSplat ? prepareArgumentsComplex(context, self, arguments, dynamicScope, temp) : prepareArgumentsSimple(context, self, arguments, dynamicScope, temp); }
protected 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); }
protected IRubyObject[] prepareArgumentsComplex(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) { // ENEBO: we can probably do this more efficiently than using ArrayList // SSS: For regular calls, IR builder never introduces splats except as the first argument // But when zsuper is converted to SuperInstr with known args, splats can appear anywhere // in the list. So, this looping handles both these scenarios, although if we wanted to // optimize for CallInstr which has splats only in the first position, we could do that. // CON: Using same logic as super splatting, but this will at least only allocate at // most two "carrier" arrays. return IRRuntimeHelpers.splatArguments( prepareArgumentsSimple(context, self, currScope, currDynScope, temp), splatMap); }
protected IRubyObject[] prepareArgumentsComplex(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) { // ENEBO: we can probably do this more efficiently than using ArrayList // SSS: For regular calls, IR builder never introduces splats except as the first argument // But when zsuper is converted to SuperInstr with known args, splats can appear anywhere // in the list. So, this looping handles both these scenarios, although if we wanted to // optimize for CallInstr which has splats only in the first position, we could do that. // CON: Using same logic as super splatting, but this will at least only allocate at // most two "carrier" arrays. return IRRuntimeHelpers.splatArguments( prepareArgumentsSimple(context, self, currScope, currDynScope, temp), splatMap); }
protected 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); }
protected IRubyObject[] prepareArguments(ThreadContext context, IRubyObject self, Operand[] arguments, DynamicScope dynamicScope, Object[] temp) { return containsSplat ? prepareArgumentsComplex(context, self, arguments, dynamicScope, temp) : prepareArgumentsSimple(context, self, arguments, dynamicScope, temp); }