Top Description Fields Constructors Methods
org.jruby.ir.instructions

public Class SearchModuleForConstInstr

extends OneOperandResultBaseInstr
implements FixedArityInstr
Class Inheritance
All Implemented Interfaces
org.jruby.ir.instructions.FixedArityInstr
Imports
org.jruby.Ruby, .RubyModule, .RubySymbol, org.jruby.ir.IRVisitor, .Operation, org.jruby.ir.operands.Operand, .UndefinedValue, .Variable, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.targets.simple.ConstantLookupSite, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.opto.ConstantCache, .Invalidator

Search for a constant within the current module. If it cannot find then call const_missing.

Field Summary

Modifier and TypeField and Description
private final boolean
private final RubySymbol
private final boolean
private final ConstantLookupSite

Constructor Summary

AccessConstructor and Description
public
SearchModuleForConstInstr(Variable result, Operand currentModule, RubySymbol constantName, boolean noPrivateConsts)

public
SearchModuleForConstInstr(Variable result, Operand currentModule, RubySymbol constantName, boolean noPrivateConsts, boolean callConstMissing)

Method Summary

Modifier and TypeMethod and Description
public boolean
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 static SearchModuleForConstInstr
public void
public Operand
public String
public RubySymbol
public Object
public boolean
public String[]
public void
Inherited from org.jruby.ir.instructions.OneOperandResultBaseInstr:
getOperand1getOperandssetOperandsetOperand1

Field Detail

callConstMissingback to summary
private final boolean callConstMissing
constantNameback to summary
private final RubySymbol constantName
noPrivateConstsback to summary
private final boolean noPrivateConsts
siteback to summary
private final ConstantLookupSite site

Constructor Detail

SearchModuleForConstInstrback to summary
public SearchModuleForConstInstr(Variable result, Operand currentModule, RubySymbol constantName, boolean noPrivateConsts)
SearchModuleForConstInstrback to summary
public SearchModuleForConstInstr(Variable result, Operand currentModule, RubySymbol constantName, boolean noPrivateConsts, boolean callConstMissing)

Method Detail

callConstMissingback to summary
public boolean callConstMissing()
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
decodeback to summary
public static SearchModuleForConstInstr decode(IRReaderDecoder d)
encodeback to summary
public void encode(IRWriterEncoder e)

Overrides org.jruby.ir.instructions.OneOperandResultBaseInstr.encode.

Annotations
@Override
getCurrentModuleback to summary
public Operand getCurrentModule()
getIdback to summary
public String getId()
getNameback to summary
public RubySymbol getName()
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
isNoPrivateConstsback to summary
public boolean isNoPrivateConsts()
toStringNonOperandArgsback to summary
public String[] toStringNonOperandArgs()

Overrides org.jruby.ir.instructions.Instr.toStringNonOperandArgs.

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

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

Annotations
@Override