Top Constructors Methods
org.jruby.ir.instructions

public Class BuildLambdaInstr

extends OneOperandResultBaseInstr
implements FixedArityInstr, ClosureAcceptingInstr
Class Inheritance
All Implemented Interfaces
org.jruby.ir.instructions.ClosureAcceptingInstr, org.jruby.ir.instructions.FixedArityInstr
Imports
org.jruby.RubyProc, org.jruby.ir.IRScope, .IRVisitor, .Operation, .IRFlags, org.jruby.ir.operands.*, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.Block, .DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, java.util.EnumSet

Constructor Summary

AccessConstructor and Description
public
BuildLambdaInstr(Variable result, WrappedIRClosure lambdaBody)

The position for the block

Method Summary

Modifier and TypeMethod and Description
public Instr
clone(CloneInfo
This object manages renaming of variables and labels, handles args and return values.
ii
)

Implements abstract org.jruby.ir.instructions.Instr.clone.

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).

public boolean
computeScopeFlags(IRScope scope, EnumSet<IRFlags> flags)

Overrides org.jruby.ir.instructions.Instr.computeScopeFlags.

Does this instruction do anything the scope is interested in?

public static BuildLambdaInstr
public Operand
public WrappedIRClosure
public boolean
public Object
public void
Inherited from org.jruby.ir.instructions.OneOperandResultBaseInstr:
encodegetOperand1getOperandssetOperandsetOperand1

Constructor Detail

BuildLambdaInstrback to summary
public BuildLambdaInstr(Variable result, WrappedIRClosure lambdaBody)

The position for the block

Method Detail

cloneback to summary
public Instr clone(CloneInfo ii)

Implements abstract org.jruby.ir.instructions.Instr.clone.

Doc from org.jruby.ir.instructions.Instr.clone.

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.

Parameters
ii:CloneInfo

This object manages renaming of variables and labels, handles args and return values.

Returns:Instr

a new instruction that can be used in the target scope.

Annotations
@Override
computeScopeFlagsback to summary
public boolean computeScopeFlags(IRScope scope, EnumSet<IRFlags> flags)

Overrides org.jruby.ir.instructions.Instr.computeScopeFlags.

Doc from org.jruby.ir.instructions.Instr.computeScopeFlags.

Does this instruction do anything the scope is interested in?

Returns:boolean

true if it modified the scope or set any flags.

Annotations
@Override
decodeback to summary
public static BuildLambdaInstr decode(IRReaderDecoder d)
getClosureArgback to summary
public Operand getClosureArg()

Implements org.jruby.ir.instructions.ClosureAcceptingInstr.getClosureArg.

getLambdaBodyback to summary
public WrappedIRClosure getLambdaBody()
hasLiteralClosureback to summary
public boolean hasLiteralClosure()

Implements org.jruby.ir.instructions.ClosureAcceptingInstr.hasLiteralClosure.

interpretback to summary
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)

Overrides org.jruby.ir.instructions.Instr.interpret.

Annotations
@Override
visitback to summary
public void visit(IRVisitor visitor)

Overrides org.jruby.ir.instructions.Instr.visit.

Annotations
@Override