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 class JetControlFlowBuilderAdapter
extends java.lang.Object
implements JetControlFlowBuilder


Field Summary
protected  JetControlFlowBuilder builder
           
 
Constructor Summary
JetControlFlowBuilderAdapter()
           
 
Method Summary
 void bindLabel(Label label)
           
 Label createUnboundLabel()
           
 Label createUnboundLabel(java.lang.String name)
           
 void declare(JetParameter parameter)
           
 void declare(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()
           
 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 nondeterministicJump(Label label)
           
 void nondeterministicJump(java.util.List<Label> labels)
           
 void read(JetElement element)
           
 void readUnit(JetExpression expression)
           
 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
 

Field Detail

builder

@Nullable
protected JetControlFlowBuilder builder
Constructor Detail

JetControlFlowBuilderAdapter

public JetControlFlowBuilderAdapter()
Method Detail

read

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

readUnit

public void readUnit(@NotNull
                     JetExpression expression)
Specified by:
readUnit 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(Label label)
Specified by:
nondeterministicJump in interface JetControlFlowBuilder

nondeterministicJump

public void nondeterministicJump(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

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

getExitPoint

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

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

declare

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

declare

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

repeatPseudocode

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