org.jetbrains.jet.lang.cfg
Interface JetControlFlowBuilder

All Known Implementing Classes:
JetControlFlowBuilderAdapter, JetControlFlowInstructionsGenerator

public interface JetControlFlowBuilder


Nested Class Summary
static class JetControlFlowBuilder.PredefinedOperation
           
 
Method Summary
 void bindLabel(Label label)
           
 void bindValue(PseudoValue value, JetElement element)
           
 PseudoValue call(JetExpression expression, ResolvedCall<?> resolvedCall, java.util.List<PseudoValue> inputValues)
           
 void compilationError(JetElement element, java.lang.String message)
           
 PseudoValue createAnonymousObject(JetObjectLiteralExpression expression)
           
 PseudoValue 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)
           
 void enterLexicalScope(JetElement element)
           
 LoopInfo enterLoop(JetExpression expression, Label loopExitPoint, Label conditionEntryPoint)
           
 void enterSubroutine(JetElement subroutine)
           
 void enterTryFinally(GenerationTrigger trigger)
           
 void exitLexicalScope(JetElement element)
           
 void exitLoop(JetExpression expression)
           
 Pseudocode exitSubroutine(JetElement subroutine)
           
 void exitTryFinally()
           
 PseudoValue getBoundValue(JetElement element)
           
 JetElement getCurrentLoop()
           
 JetElement getCurrentSubroutine()
           
 Label getEntryPoint(JetElement labelElement)
           
 Label getExitPoint(JetElement labelElement)
           
 JetElement getReturnSubroutine()
           
 void jump(Label label, JetElement element)
           
 void jumpOnFalse(Label label, JetElement element, PseudoValue conditionValue)
           
 void jumpOnTrue(Label label, JetElement element, PseudoValue conditionValue)
           
 void jumpToError(JetElement element)
           
 PseudoValue loadConstant(JetExpression expression, CompileTimeConstant<?> constant)
           
 PseudoValue loadStringTemplate(JetStringTemplateExpression expression, java.util.List<PseudoValue> inputValues)
           
 void loadUnit(JetExpression expression)
           
 PseudoValue magic(JetElement instructionElement, JetElement valueElement, java.util.List<PseudoValue> inputValues, boolean synthetic)
           
 void mark(JetElement element)
           
 void nondeterministicJump(Label label, JetElement element, PseudoValue inputValue)
           
 void nondeterministicJump(java.util.List<Label> label, JetElement element)
           
 PseudoValue predefinedOperation(JetExpression expression, JetControlFlowBuilder.PredefinedOperation operation, java.util.List<PseudoValue> inputValues)
           
 PseudoValue readThis(JetExpression expression, ReceiverParameterDescriptor parameterDescriptor)
           
 PseudoValue readVariable(JetExpression expression, VariableDescriptor variableDescriptor, PseudoValue receiverValue)
           
 void repeatPseudocode(Label startLabel, Label finishLabel)
           
 void returnNoValue(JetReturnExpression returnExpression, JetElement subroutine)
           
 void returnValue(JetReturnExpression returnExpression, PseudoValue returnValue, JetElement subroutine)
           
 void throwException(JetThrowExpression throwExpression, PseudoValue thrownValue)
           
 void unsupported(JetElement element)
           
 void write(JetElement assignment, JetElement lValue, PseudoValue rValue, PseudoValue receiverValue)
           
 

Method Detail

enterSubroutine

void enterSubroutine(@NotNull
                     JetElement subroutine)

exitSubroutine

@NotNull
Pseudocode exitSubroutine(@NotNull
                                  JetElement subroutine)

getCurrentSubroutine

@NotNull
JetElement getCurrentSubroutine()

getReturnSubroutine

@Nullable
JetElement getReturnSubroutine()

enterLexicalScope

void enterLexicalScope(@NotNull
                       JetElement element)

exitLexicalScope

void exitLexicalScope(@NotNull
                      JetElement element)

getEntryPoint

@NotNull
Label getEntryPoint(@NotNull
                            JetElement labelElement)

getExitPoint

@NotNull
Label getExitPoint(@NotNull
                           JetElement labelElement)

declareParameter

void declareParameter(@NotNull
                      JetParameter parameter)

declareVariable

void declareVariable(@NotNull
                     JetVariableDeclaration property)

declareFunction

void declareFunction(@NotNull
                     JetElement subroutine,
                     @NotNull
                     Pseudocode pseudocode)

createUnboundLabel

@NotNull
Label createUnboundLabel()

createUnboundLabel

@NotNull
Label createUnboundLabel(@NotNull
                                 java.lang.String name)

bindLabel

void bindLabel(@NotNull
               Label label)

jump

void jump(@NotNull
          Label label,
          @NotNull
          JetElement element)

jumpOnFalse

void jumpOnFalse(@NotNull
                 Label label,
                 @NotNull
                 JetElement element,
                 @Nullable
                 PseudoValue conditionValue)

jumpOnTrue

void jumpOnTrue(@NotNull
                Label label,
                @NotNull
                JetElement element,
                @Nullable
                PseudoValue conditionValue)

nondeterministicJump

void nondeterministicJump(@NotNull
                          Label label,
                          @NotNull
                          JetElement element,
                          @Nullable
                          PseudoValue inputValue)

nondeterministicJump

void nondeterministicJump(@NotNull
                          java.util.List<Label> label,
                          @NotNull
                          JetElement element)

jumpToError

void jumpToError(@NotNull
                 JetElement element)

returnValue

void returnValue(@NotNull
                 JetReturnExpression returnExpression,
                 @NotNull
                 PseudoValue returnValue,
                 @NotNull
                 JetElement subroutine)

returnNoValue

void returnNoValue(@NotNull
                   JetReturnExpression returnExpression,
                   @NotNull
                   JetElement subroutine)

throwException

void throwException(@NotNull
                    JetThrowExpression throwExpression,
                    @NotNull
                    PseudoValue thrownValue)

enterLoop

LoopInfo enterLoop(@NotNull
                   JetExpression expression,
                   @Nullable
                   Label loopExitPoint,
                   @Nullable
                   Label conditionEntryPoint)

exitLoop

void exitLoop(@NotNull
              JetExpression expression)

getCurrentLoop

@Nullable
JetElement getCurrentLoop()

enterTryFinally

void enterTryFinally(@NotNull
                     GenerationTrigger trigger)

exitTryFinally

void exitTryFinally()

repeatPseudocode

void repeatPseudocode(@NotNull
                      Label startLabel,
                      @NotNull
                      Label finishLabel)

mark

void mark(@NotNull
          JetElement element)

getBoundValue

@Nullable
PseudoValue getBoundValue(@Nullable
                                   JetElement element)

bindValue

void bindValue(@NotNull
               PseudoValue value,
               @NotNull
               JetElement element)

loadUnit

void loadUnit(@NotNull
              JetExpression expression)

loadConstant

@NotNull
PseudoValue loadConstant(@NotNull
                                 JetExpression expression,
                                 @Nullable
                                 CompileTimeConstant<?> constant)

createAnonymousObject

@NotNull
PseudoValue createAnonymousObject(@NotNull
                                          JetObjectLiteralExpression expression)

createFunctionLiteral

@NotNull
PseudoValue createFunctionLiteral(@NotNull
                                          JetFunctionLiteralExpression expression)

loadStringTemplate

@NotNull
PseudoValue loadStringTemplate(@NotNull
                                       JetStringTemplateExpression expression,
                                       @NotNull
                                       java.util.List<PseudoValue> inputValues)

magic

@NotNull
PseudoValue magic(@NotNull
                          JetElement instructionElement,
                          @Nullable
                          JetElement valueElement,
                          @NotNull
                          java.util.List<PseudoValue> inputValues,
                          boolean synthetic)

readThis

@NotNull
PseudoValue readThis(@NotNull
                             JetExpression expression,
                             @Nullable
                             ReceiverParameterDescriptor parameterDescriptor)

readVariable

@NotNull
PseudoValue readVariable(@NotNull
                                 JetExpression expression,
                                 @Nullable
                                 VariableDescriptor variableDescriptor,
                                 @Nullable
                                 PseudoValue receiverValue)

call

@Nullable
PseudoValue call(@NotNull
                          JetExpression expression,
                          @NotNull
                          ResolvedCall<?> resolvedCall,
                          @NotNull
                          java.util.List<PseudoValue> inputValues)

predefinedOperation

@NotNull
PseudoValue predefinedOperation(@NotNull
                                        JetExpression expression,
                                        @NotNull
                                        JetControlFlowBuilder.PredefinedOperation operation,
                                        @NotNull
                                        java.util.List<PseudoValue> inputValues)

compilationError

void compilationError(@NotNull
                      JetElement element,
                      @NotNull
                      java.lang.String message)

write

void write(@NotNull
           JetElement assignment,
           @NotNull
           JetElement lValue,
           @NotNull
           PseudoValue rValue,
           @Nullable
           PseudoValue receiverValue)

unsupported

void unsupported(JetElement element)