org.jetbrains.jet.lang.cfg
Class JetControlFlowBuilderAdapter

java.lang.Object
  extended by org.jetbrains.jet.lang.cfg.JetControlFlowBuilderAdapter
All Implemented Interfaces:
JetControlFlowBuilder
Direct Known Subclasses:
JetControlFlowInstructionsGenerator

public abstract class JetControlFlowBuilderAdapter
extends java.lang.Object
implements JetControlFlowBuilder


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jetbrains.jet.lang.cfg.JetControlFlowBuilder
JetControlFlowBuilder.PredefinedOperation
 
Constructor Summary
JetControlFlowBuilderAdapter()
           
 
Method Summary
 void bindLabel(Label label)
           
 void call(JetExpression expression, ResolvedCall<?> resolvedCall)
           
 void compilationError(JetElement element, java.lang.String message)
           
 void createAnonymousObject(JetObjectLiteralExpression expression)
           
 void createFunctionLiteral(JetFunctionLiteralExpression expression)
           
 Label createUnboundLabel()
           
 Label createUnboundLabel(java.lang.String name)
           
 void declareFunction(JetElement subroutine, Pseudocode pseudocode)
           
 void declareParameter(JetParameter parameter)
           
 void declareVariable(JetVariableDeclaration property)
           
 LoopInfo enterLoop(JetExpression expression, Label loopExitPoint, Label conditionEntryPoint)
           
 void enterSubroutine(JetElement subroutine)
           
 void enterTryFinally(GenerationTrigger trigger)
           
 void exitLoop(JetExpression expression)
           
 Pseudocode exitSubroutine(JetElement subroutine)
           
 void exitTryFinally()
           
 JetElement getCurrentLoop()
           
 JetElement getCurrentSubroutine()
           
protected abstract  JetControlFlowBuilder getDelegateBuilder()
           
 Label getEntryPoint(JetElement labelElement)
           
 Label getExitPoint(JetElement labelElement)
           
 JetElement getReturnSubroutine()
           
 void jump(Label label)
           
 void jumpOnFalse(Label label)
           
 void jumpOnTrue(Label label)
           
 void jumpToError()
           
 void loadConstant(JetExpression expression, CompileTimeConstant<?> constant)
           
 void loadStringTemplate(JetStringTemplateExpression expression)
           
 void loadUnit(JetExpression expression)
           
 void mark(JetElement element)
           
 void nondeterministicJump(Label label)
           
 void nondeterministicJump(java.util.List<Label> labels)
           
 void predefinedOperation(JetExpression expression, JetControlFlowBuilder.PredefinedOperation operation)
           
 void readThis(JetExpression expression, ReceiverParameterDescriptor parameterDescriptor)
           
 void readVariable(JetExpression expression, VariableDescriptor variableDescriptor)
           
 void repeatPseudocode(Label startLabel, Label finishLabel)
           
 void returnNoValue(JetElement returnExpression, JetElement subroutine)
           
 void returnValue(JetExpression returnExpression, JetElement subroutine)
           
 void throwException(JetThrowExpression throwExpression)
           
 void unsupported(JetElement element)
           
 void write(JetElement assignment, JetElement lValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JetControlFlowBuilderAdapter

public JetControlFlowBuilderAdapter()
Method Detail

getDelegateBuilder

@NotNull
protected abstract JetControlFlowBuilder getDelegateBuilder()

loadUnit

public void loadUnit(@NotNull
                     JetExpression expression)
Specified by:
loadUnit in interface JetControlFlowBuilder

loadConstant

public void loadConstant(@NotNull
                         JetExpression expression,
                         @Nullable
                         CompileTimeConstant<?> constant)
Specified by:
loadConstant in interface JetControlFlowBuilder

createAnonymousObject

public void createAnonymousObject(@NotNull
                                  JetObjectLiteralExpression expression)
Specified by:
createAnonymousObject in interface JetControlFlowBuilder

createFunctionLiteral

public void createFunctionLiteral(@NotNull
                                  JetFunctionLiteralExpression expression)
Specified by:
createFunctionLiteral in interface JetControlFlowBuilder

loadStringTemplate

public void loadStringTemplate(@NotNull
                               JetStringTemplateExpression expression)
Specified by:
loadStringTemplate in interface JetControlFlowBuilder

readThis

public void readThis(@NotNull
                     JetExpression expression,
                     @Nullable
                     ReceiverParameterDescriptor parameterDescriptor)
Specified by:
readThis in interface JetControlFlowBuilder

readVariable

public void readVariable(@NotNull
                         JetExpression expression,
                         @Nullable
                         VariableDescriptor variableDescriptor)
Specified by:
readVariable in interface JetControlFlowBuilder

call

public void call(@NotNull
                 JetExpression expression,
                 @NotNull
                 ResolvedCall<?> resolvedCall)
Specified by:
call in interface JetControlFlowBuilder

predefinedOperation

public void predefinedOperation(@NotNull
                                JetExpression expression,
                                @Nullable
                                JetControlFlowBuilder.PredefinedOperation operation)
Specified by:
predefinedOperation in interface JetControlFlowBuilder

compilationError

public void compilationError(@NotNull
                             JetElement element,
                             @NotNull
                             java.lang.String message)
Specified by:
compilationError in interface JetControlFlowBuilder

createUnboundLabel

@NotNull
public Label createUnboundLabel()
Specified by:
createUnboundLabel in interface JetControlFlowBuilder

createUnboundLabel

@NotNull
public Label createUnboundLabel(@NotNull
                                        java.lang.String name)
Specified by:
createUnboundLabel in interface JetControlFlowBuilder

bindLabel

public void bindLabel(@NotNull
                      Label label)
Specified by:
bindLabel in interface JetControlFlowBuilder

jump

public void jump(@NotNull
                 Label label)
Specified by:
jump in interface JetControlFlowBuilder

jumpOnFalse

public void jumpOnFalse(@NotNull
                        Label label)
Specified by:
jumpOnFalse in interface JetControlFlowBuilder

jumpOnTrue

public void jumpOnTrue(@NotNull
                       Label label)
Specified by:
jumpOnTrue in interface JetControlFlowBuilder

nondeterministicJump

public void nondeterministicJump(@NotNull
                                 Label label)
Specified by:
nondeterministicJump in interface JetControlFlowBuilder

nondeterministicJump

public void nondeterministicJump(@NotNull
                                 java.util.List<Label> labels)
Specified by:
nondeterministicJump in interface JetControlFlowBuilder

jumpToError

public void jumpToError()
Specified by:
jumpToError in interface JetControlFlowBuilder

throwException

public void throwException(@NotNull
                           JetThrowExpression throwExpression)
Specified by:
throwException in interface JetControlFlowBuilder

getEntryPoint

@NotNull
public Label getEntryPoint(@NotNull
                                   JetElement labelElement)
Specified by:
getEntryPoint in interface JetControlFlowBuilder

getExitPoint

@NotNull
public Label getExitPoint(@NotNull
                                  JetElement labelElement)
Specified by:
getExitPoint in interface JetControlFlowBuilder

enterLoop

public LoopInfo enterLoop(@NotNull
                          JetExpression expression,
                          @Nullable
                          Label loopExitPoint,
                          Label conditionEntryPoint)
Specified by:
enterLoop in interface JetControlFlowBuilder

exitLoop

public void exitLoop(@NotNull
                     JetExpression expression)
Specified by:
exitLoop in interface JetControlFlowBuilder

getCurrentLoop

@Nullable
public JetElement getCurrentLoop()
Specified by:
getCurrentLoop in interface JetControlFlowBuilder

enterTryFinally

public void enterTryFinally(@NotNull
                            GenerationTrigger trigger)
Specified by:
enterTryFinally in interface JetControlFlowBuilder

exitTryFinally

public void exitTryFinally()
Specified by:
exitTryFinally in interface JetControlFlowBuilder

enterSubroutine

public void enterSubroutine(@NotNull
                            JetElement subroutine)
Specified by:
enterSubroutine in interface JetControlFlowBuilder

exitSubroutine

@NotNull
public Pseudocode exitSubroutine(@NotNull
                                         JetElement subroutine)
Specified by:
exitSubroutine in interface JetControlFlowBuilder

getCurrentSubroutine

@NotNull
public JetElement getCurrentSubroutine()
Specified by:
getCurrentSubroutine in interface JetControlFlowBuilder

getReturnSubroutine

@Nullable
public JetElement getReturnSubroutine()
Specified by:
getReturnSubroutine in interface JetControlFlowBuilder

returnValue

public void returnValue(@NotNull
                        JetExpression returnExpression,
                        @NotNull
                        JetElement subroutine)
Specified by:
returnValue in interface JetControlFlowBuilder

returnNoValue

public void returnNoValue(@NotNull
                          JetElement returnExpression,
                          @NotNull
                          JetElement subroutine)
Specified by:
returnNoValue in interface JetControlFlowBuilder

unsupported

public void unsupported(JetElement element)
Specified by:
unsupported in interface JetControlFlowBuilder

write

public void write(@NotNull
                  JetElement assignment,
                  @NotNull
                  JetElement lValue)
Specified by:
write in interface JetControlFlowBuilder

declareParameter

public void declareParameter(@NotNull
                             JetParameter parameter)
Specified by:
declareParameter in interface JetControlFlowBuilder

declareVariable

public void declareVariable(@NotNull
                            JetVariableDeclaration property)
Specified by:
declareVariable in interface JetControlFlowBuilder

declareFunction

public void declareFunction(@NotNull
                            JetElement subroutine,
                            @NotNull
                            Pseudocode pseudocode)
Specified by:
declareFunction in interface JetControlFlowBuilder

repeatPseudocode

public void repeatPseudocode(@NotNull
                             Label startLabel,
                             @NotNull
                             Label finishLabel)
Specified by:
repeatPseudocode in interface JetControlFlowBuilder

mark

public void mark(@NotNull
                 JetElement element)
Specified by:
mark in interface JetControlFlowBuilder