org.jikesrvm.compilers.opt.specialization
Class InvokeeThreadLocalContext

java.lang.Object
  extended by org.jikesrvm.compilers.opt.specialization.InvokeeThreadLocalContext
All Implemented Interfaces:
SpecializationContext

public final class InvokeeThreadLocalContext
extends Object
implements SpecializationContext

This class represents a specialization context meaning "the invokee is thread local". We use this context to remove unnecessary synchronizations.


Field Summary
private static OptimizationPlanElement[] optimizationPlan
          The default optimization plan.
private static OptOptions options
          The default optimization options, with the INVOKEE_THREAD_LOCAL flag set true.
 
Constructor Summary
InvokeeThreadLocalContext()
           
 
Method Summary
private  SpecializedMethod createSpecializedMethod(NormalMethod method)
          Create specialized method in this context.
 SpecializedMethod findOrCreateSpecializedVersion(NormalMethod source)
          Find or create a specialized method in this context.
static void init()
          Initialize static members.
 CompiledMethod specialCompile(NormalMethod source)
          Generate code to specialize a method in this context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

private static OptOptions options
The default optimization options, with the INVOKEE_THREAD_LOCAL flag set true.


optimizationPlan

private static OptimizationPlanElement[] optimizationPlan
The default optimization plan.

Constructor Detail

InvokeeThreadLocalContext

public InvokeeThreadLocalContext()
Method Detail

findOrCreateSpecializedVersion

public SpecializedMethod findOrCreateSpecializedVersion(NormalMethod source)
Find or create a specialized method in this context.

Specified by:
findOrCreateSpecializedVersion in interface SpecializationContext
Parameters:
source -

createSpecializedMethod

private SpecializedMethod createSpecializedMethod(NormalMethod method)
Create specialized method in this context.

Parameters:
method -

specialCompile

public CompiledMethod specialCompile(NormalMethod source)
Generate code to specialize a method in this context. Namely, invoke the opt compiler with the INVOKEE_THREAD_LOCAL option.

Specified by:
specialCompile in interface SpecializationContext
Parameters:
source -

init

public static void init()
Initialize static members.