Top Fields Constructors Methods
org.jruby.ir.passes

public Class OptimizeDelegationPass

extends CompilerPass
Class Inheritance
Imports
org.jruby.ir.IRFlags, org.jruby.ir.instructions.ClosureAcceptingInstr, .CopyInstr, .Instr, .ReifyClosureInstr, org.jruby.ir.interpreter.FullInterpreterContext, org.jruby.ir.operands.LocalVariable, .Operand, .Variable, org.jruby.ir.representations.BasicBlock, java.util.*

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 boolean
invalidate(FullInterpreterContext
is where the pass stores its data.
fic
)

Overrides org.jruby.ir.passes.CompilerPass.invalidate.

The data that this pass is responsible for will get invalidated so that if this pass is then executed it will generate new pass data.

private static void
private static boolean
Inherited from org.jruby.ir.passes.CompilerPass:
createPassInstancecreatePassInstanceequalsgetDependenciesgetPassesFromStringhashCodepreviouslyRunrunrunrun

Constructor Detail

OptimizeDelegationPassback to summary
public OptimizeDelegationPass()

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
invalidateback to summary
public boolean invalidate(FullInterpreterContext fic)

Overrides org.jruby.ir.passes.CompilerPass.invalidate.

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

The data that this pass is responsible for will get invalidated so that if this pass is then executed it will generate new pass data. Note that some data will destructively manipulate dependent compiler pass data. In that case, the pass may wipe more than just it's data. In that case, an execute() should still rebuild everything fine because all compiler passes list their dependencies.

Parameters
fic:FullInterpreterContext

is where the pass stores its data.

Returns:boolean

true if invalidation succeeded, false otherwise.

Annotations
@Override
optimizeDelegatedVarsback to summary
private static void optimizeDelegatedVars(FullInterpreterContext fic)
usesVariableAsNonClosureArgback to summary
private static boolean usesVariableAsNonClosureArg(Instr i, Variable v)