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

public Class LocalOptimizationPass

extends CompilerPass
Class Inheritance
Imports
org.jruby.ir.Operation, org.jruby.ir.instructions.BranchInstr, .CopyInstr, .Instr, .ResultInstr, org.jruby.ir.interpreter.FullInterpreterContext, org.jruby.ir.operands.Operand, .Variable, org.jruby.ir.representations.BasicBlock, .CFG, java.util.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Inherited from org.jruby.ir.passes.CompilerPass:
LOG

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
execute(FullInterpreterContext
is the FullInterpreterContext to run this pass on
fic
,
Object...
is the data supplied to this pass to use to execute the pass
data
)

Implements abstract org.jruby.ir.passes.CompilerPass.execute.

Meat of an individual pass.

public String
getLabel()

Implements abstract org.jruby.ir.passes.CompilerPass.getLabel.

What is the user-friendly name of this compiler pass

public String
public static Instr
optInstr(FullInterpreterContext fic, Instr instr, Map<Operand, Operand> valueMap, Map<Variable, List<Variable>> simplificationMap)

private static void
recordSimplification(Variable res, Operand val, Map<Operand, Operand> valueMap, Map<Variable, List<Variable>> simplificationMap)

public static LocalOptimizationPass.Result
public static void
Inherited from org.jruby.ir.passes.CompilerPass:
createPassInstancecreatePassInstanceequalsgetDependenciesgetPassesFromStringhashCodeinvalidatepreviouslyRunrunrunrun

Constructor Detail

LocalOptimizationPassback to summary
public LocalOptimizationPass()

Method Detail

executeback to summary
public Object execute(FullInterpreterContext fic, Object... data)

Implements abstract org.jruby.ir.passes.CompilerPass.execute.

Doc from org.jruby.ir.passes.CompilerPass.execute.

Meat of an individual pass. run will call this after dependency resolution.

Parameters
fic:FullInterpreterContext

is the FullInterpreterContext to run this pass on

data:Object[]

is the data supplied to this pass to use to execute the pass

Annotations
@Override
getLabelback to summary
public String getLabel()

Implements abstract org.jruby.ir.passes.CompilerPass.getLabel.

Doc from org.jruby.ir.passes.CompilerPass.getLabel.

What is the user-friendly name of this compiler pass

Annotations
@Override
getShortLabelback to summary
public String getShortLabel()

Overrides org.jruby.ir.passes.CompilerPass.getShortLabel.

Doc from org.jruby.ir.passes.CompilerPass.getShortLabel.

Shorter label

Annotations
@Override
optInstrback to summary
public static Instr optInstr(FullInterpreterContext fic, Instr instr, Map<Operand, Operand> valueMap, Map<Variable, List<Variable>> simplificationMap)
recordSimplificationback to summary
private static void recordSimplification(Variable res, Operand val, Map<Operand, Operand> valueMap, Map<Variable, List<Variable>> simplificationMap)
runLocalOptsOnBasicBlockback to summary
public static LocalOptimizationPass.Result runLocalOptsOnBasicBlock(FullInterpreterContext fic, BasicBlock b)
runLocalOptsOnInstrArrayback to summary
public static void runLocalOptsOnInstrArray(FullInterpreterContext fic, Instr[] instrs)
org.jruby.ir.passes back to summary

private final Record LocalOptimizationPass.Result

extends Record
Class Inheritance
Record Components
reexamineCFG:boolean 
changed:boolean 

Field Summary

Modifier and TypeField and Description
private final boolean
changed

Record Component accessed by changed().

private final boolean
reexamineCFG

Record Component accessed by reexamineCFG().

Constructor Summary

AccessConstructor and Description
private
Result(boolean reexamineCFG, boolean changed)

Method Summary

Modifier and TypeMethod and Description
public boolean
changed()

Record Component getter of changed.

public final boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public boolean
reexamineCFG()

Record Component getter of reexamineCFG.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

changedback to summary
private final boolean changed

Record Component accessed by changed().

reexamineCFGback to summary
private final boolean reexamineCFG

Record Component accessed by reexamineCFG().

Constructor Detail

Resultback to summary
private Result(boolean reexamineCFG, boolean changed)

Method Detail

changedback to summary
public boolean changed()

Record Component getter of changed.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

Returns:int

a hash code value for this record.

reexamineCFGback to summary
public boolean reexamineCFG()

Record Component getter of reexamineCFG.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Returns:String

a string representation of the object.