Package org.jruby.ir.instructions
Class ReceivePostReqdArgInstr
java.lang.Object
org.jruby.ir.instructions.Instr
org.jruby.ir.instructions.ResultBaseInstr
org.jruby.ir.instructions.NoOperandResultBaseInstr
org.jruby.ir.instructions.ReceiveArgBase
org.jruby.ir.instructions.ReceivePostReqdArgInstr
- All Implemented Interfaces:
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.ReceiveArgBase
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, 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[] args, boolean acceptsKeywordArgument) String[]voidMethods inherited from class org.jruby.ir.instructions.ReceiveArgBase
getArgIndex, receiveArgMethods inherited from class org.jruby.ir.instructions.NoOperandResultBaseInstr
getOperands, setOperandMethods 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, simplifyAndGetResult, 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
public ReceivePostReqdArgInstr(Variable result, int argIndex, int preReqdArgsCount, int optArgCount, boolean restArg, int postReqdArgsCount)
-
-
Method Details
-
toStringNonOperandArgs
- Overrides:
toStringNonOperandArgsin classReceiveArgBase
-
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 classResultBaseInstr
-
decode
-
receivePostReqdArg
public IRubyObject receivePostReqdArg(ThreadContext context, IRubyObject[] args, boolean acceptsKeywordArgument) -
visit
-