Package org.jruby.ir.instructions
Class ReceivePostReqdArgInstr
java.lang.Object
org.jruby.ir.instructions.Instr
org.jruby.ir.instructions.ResultBaseInstr
org.jruby.ir.instructions.OneOperandResultBaseInstr
org.jruby.ir.instructions.ReceiveArgBase
org.jruby.ir.instructions.ReceiveIndexedArgBase
org.jruby.ir.instructions.ReceivePostReqdArgInstr
- All Implemented Interfaces:
ArgReceiver
,FixedArityInstr
,ResultInstr
This represents a required arg that shows up after optional/rest args
in a method/block parameter list. This instruction gets to pick an argument
based on how many arguments have already been accounted for by parameters
present earlier in the list.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
The method/block parameter list has a maximum of this many optional argumentsfinal int
The method/block parameter list has these many required parameters after opt+rest argsfinal int
The method/block parameter list has these many required parameters before opt+rest argsfinal boolean
Does this method/block accept a rest argumentFields inherited from class org.jruby.ir.instructions.ReceiveIndexedArgBase
argIndex
Fields inherited from class org.jruby.ir.instructions.ResultBaseInstr
result
Fields inherited from class org.jruby.ir.instructions.Instr
EMPTY_OPERANDS
-
Constructor Summary
ConstructorsConstructorDescriptionReceivePostReqdArgInstr
(Variable result, Variable keywords, int argIndex, int preReqdArgsCount, int optArgCount, boolean restArg, int postReqdArgsCount) -
Method Summary
Modifier and TypeMethodDescriptionClone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope).static ReceivePostReqdArgInstr
void
receivePostReqdArg
(ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject[] args) String[]
void
Methods inherited from class org.jruby.ir.instructions.ReceiveIndexedArgBase
getArgIndex
Methods inherited from class org.jruby.ir.instructions.ReceiveArgBase
getKeywords, receiveArg
Methods inherited from class org.jruby.ir.instructions.OneOperandResultBaseInstr
getOperand1, getOperands, setOperand, setOperand1
Methods inherited from class org.jruby.ir.instructions.ResultBaseInstr
getResult, updateResult
Methods inherited from class org.jruby.ir.instructions.Instr
canBeDeletedFromScope, canRaiseException, cloneOperands, computeScopeFlags, dumpableFields, getOperation, getUsedVariables, hasSideEffects, interpret, interpretAndGetNewIPC, isDead, isDeletable, markDead, renameVars, simplifyInstr, simplifyOperands, simplifyOperands, toString, transfersControl
-
Field Details
-
preReqdArgsCount
public final int preReqdArgsCountThe method/block parameter list has these many required parameters before opt+rest args -
optArgsCount
public final int optArgsCountThe method/block parameter list has a maximum of this many optional arguments -
restArg
public final boolean restArgDoes this method/block accept a rest argument -
postReqdArgsCount
public final int postReqdArgsCountThe method/block parameter list has these many required parameters after opt+rest args
-
-
Constructor Details
-
ReceivePostReqdArgInstr
-
-
Method Details
-
toStringNonOperandArgs
- Overrides:
toStringNonOperandArgs
in classInstr
-
clone
Description copied from class:Instr
Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). This might renaming variables and labels to eliminate naming conflicts. The implementation might vary on the cloning mode. -
encode
- Overrides:
encode
in classReceiveIndexedArgBase
-
decode
-
receivePostReqdArg
public IRubyObject receivePostReqdArg(ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject[] args) -
visit
-