Package org.jruby.ir.instructions
Class ReceiveKeywordsInstr
java.lang.Object
org.jruby.ir.instructions.Instr
org.jruby.ir.instructions.ResultBaseInstr
org.jruby.ir.instructions.NoOperandResultBaseInstr
org.jruby.ir.instructions.ReceiveKeywordsInstr
- All Implemented Interfaces:
ArgReceiver
,ResultInstr
Gets the keyword arg (or representation of what might be holding keyword args).
The result of this is passed into the other keyword arg instructions to get what
those instrs are interested in. One intent of this result is that it can be
mutable so it can toggle off keyword arg flags early in the method before any
exceptions or side-effects in the method can occur. It also can remove key/value pairs
as individual keyword instructions execute. After all individual instructions have
executed anything left is either kwrest or an arity error.
-
Field Summary
Fields inherited from class org.jruby.ir.instructions.ResultBaseInstr
result
Fields inherited from class org.jruby.ir.instructions.Instr
EMPTY_OPERANDS
-
Constructor Summary
ConstructorsConstructorDescriptionReceiveKeywordsInstr
(Variable result, boolean hasRestArg, boolean acceptsKeywords) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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).static ReceiveKeywordsInstr
void
boolean
receiveArg
(ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject[] args, boolean ruby2keywords) void
Methods inherited from class org.jruby.ir.instructions.NoOperandResultBaseInstr
getOperands, setOperand
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, toStringNonOperandArgs, transfersControl
-
Constructor Details
-
ReceiveKeywordsInstr
-
-
Method Details
-
hasRestArg
public boolean hasRestArg() -
acceptsKeywords
public boolean acceptsKeywords() -
encode
- Overrides:
encode
in classResultBaseInstr
-
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. -
decode
-
receiveArg
public IRubyObject receiveArg(ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject[] args, boolean ruby2keywords) - Specified by:
receiveArg
in interfaceArgReceiver
-
visit
-