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 intThe method/block parameter list has a maximum of this many optional argumentsfinal intThe method/block parameter list has these many required parameters after opt+rest argsfinal intThe method/block parameter list has these many required parameters before opt+rest argsfinal booleanDoes this method/block accept a rest argumentFields inherited from class org.jruby.ir.instructions.ReceiveIndexedArgBase
argIndexFields inherited from class org.jruby.ir.instructions.ResultBaseInstr
resultFields 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 ReceivePostReqdArgInstrvoidreceivePostReqdArg(ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject[] args) String[]voidMethods inherited from class org.jruby.ir.instructions.ReceiveIndexedArgBase
getArgIndexMethods inherited from class org.jruby.ir.instructions.ReceiveArgBase
getKeywords, receiveArgMethods inherited from class org.jruby.ir.instructions.OneOperandResultBaseInstr
getOperand1, getOperands, setOperand, setOperand1Methods inherited from class org.jruby.ir.instructions.ResultBaseInstr
getResult, updateResultMethods 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:
toStringNonOperandArgsin classInstr
-
clone
Description copied from class:InstrClone 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:
encodein classReceiveIndexedArgBase
-
decode
-
receivePostReqdArg
public IRubyObject receivePostReqdArg(ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject[] args) -
visit
-