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

public Class BuildDynRegExpInstr

extends NOperandResultBaseInstr
Class Inheritance
Imports
org.jruby.RubyRegexp, .RubyString, org.jruby.ir.IRVisitor, .Operation, org.jruby.ir.operands.Operand, .Variable, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.RegexpOptions, java.util.concurrent.atomic.AtomicReferenceFieldUpdater

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final RegexpOptions
private final BuildDynRegExpInstr.RECache

Constructor Summary

AccessConstructor and Description
private
public

Method Summary

Modifier and TypeMethod and Description
private RubyRegexp
buildRegexp(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)

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 BuildDynRegExpInstr
public void
public RegexpOptions
public Operand[]
public RubyRegexp
public Object
private RubyString[]
retrievePieces(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)

public String[]
public void
Inherited from org.jruby.ir.instructions.NOperandResultBaseInstr:
getOperandssetOperand

Field Detail

optionsback to summary
private final RegexpOptions options
reCacheback to summary
private final BuildDynRegExpInstr.RECache reCache

Constructor Detail

BuildDynRegExpInstrback to summary
private BuildDynRegExpInstr(Variable result, Operand[] pieces, RegexpOptions options, BuildDynRegExpInstr.RECache reCache)
BuildDynRegExpInstrback to summary
public BuildDynRegExpInstr(Variable result, Operand[] pieces, RegexpOptions options)

Method Detail

buildRegexpback to summary
private RubyRegexp buildRegexp(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)
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 BuildDynRegExpInstr decode(IRReaderDecoder d)
encodeback to summary
public void encode(IRWriterEncoder e)

Overrides org.jruby.ir.instructions.ResultBaseInstr.encode.

Annotations
@Override
getOptionsback to summary
public RegexpOptions getOptions()
getPiecesback to summary
public Operand[] getPieces()
getRegexpback to summary
public RubyRegexp getRegexp()
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
retrievePiecesback to summary
private RubyString[] retrievePieces(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
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
org.jruby.ir.instructions back to summary

private Class BuildDynRegExpInstr.RECache

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private volatile RubyRegexp
private static final AtomicReferenceFieldUpdater<BuildDynRegExpInstr.RECache, RubyRegexp>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
updateCache(boolean isOnce, RubyRegexp re)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rubyRegexpback to summary
private volatile RubyRegexp rubyRegexp
UPDATERback to summary
private static final AtomicReferenceFieldUpdater<BuildDynRegExpInstr.RECache, RubyRegexp> UPDATER

Constructor Detail

RECacheback to summary
private RECache()

Method Detail

updateCacheback to summary
public void updateCache(boolean isOnce, RubyRegexp re)