org.jetbrains.jet.lang.cfg
Class TailRecursionDetector

java.lang.Object
  extended by org.jetbrains.jet.lang.cfg.pseudocode.InstructionVisitorWithResult<java.lang.Boolean>
      extended by org.jetbrains.jet.lang.cfg.TailRecursionDetector
All Implemented Interfaces:
PseudocodeTraverser.InstructionHandler

public class TailRecursionDetector
extends InstructionVisitorWithResult<java.lang.Boolean>
implements PseudocodeTraverser.InstructionHandler


Constructor Summary
TailRecursionDetector(JetElement subroutine, Instruction start)
           
 
Method Summary
 boolean handle(Instruction instruction)
           
 java.lang.Boolean visitInstruction(Instruction instruction)
           
 java.lang.Boolean visitJump(AbstractJumpInstruction instruction)
           
 java.lang.Boolean visitMarkInstruction(MarkInstruction instruction)
           
 java.lang.Boolean visitSubroutineExit(SubroutineExitInstruction instruction)
           
 java.lang.Boolean visitSubroutineSink(SubroutineSinkInstruction instruction)
           
 java.lang.Boolean visitThrowExceptionInstruction(ThrowExceptionInstruction instruction)
           
 
Methods inherited from class org.jetbrains.jet.lang.cfg.pseudocode.InstructionVisitorWithResult
visitCallInstruction, visitCompilationErrorInstruction, visitConditionalJump, visitInstructionWithNext, visitLoadUnitValue, visitLocalFunctionDeclarationInstruction, visitNondeterministicJump, visitReadValue, visitReturnNoValue, visitReturnValue, visitSubroutineEnter, visitUnconditionalJump, visitUnsupportedElementInstruction, visitVariableDeclarationInstruction, visitWriteValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TailRecursionDetector

public TailRecursionDetector(@NotNull
                             JetElement subroutine,
                             @NotNull
                             Instruction start)
Method Detail

handle

public boolean handle(@NotNull
                      Instruction instruction)
Specified by:
handle in interface PseudocodeTraverser.InstructionHandler

visitInstruction

public java.lang.Boolean visitInstruction(Instruction instruction)
Specified by:
visitInstruction in class InstructionVisitorWithResult<java.lang.Boolean>

visitSubroutineExit

public java.lang.Boolean visitSubroutineExit(SubroutineExitInstruction instruction)
Overrides:
visitSubroutineExit in class InstructionVisitorWithResult<java.lang.Boolean>

visitSubroutineSink

public java.lang.Boolean visitSubroutineSink(SubroutineSinkInstruction instruction)
Overrides:
visitSubroutineSink in class InstructionVisitorWithResult<java.lang.Boolean>

visitJump

public java.lang.Boolean visitJump(AbstractJumpInstruction instruction)
Overrides:
visitJump in class InstructionVisitorWithResult<java.lang.Boolean>

visitThrowExceptionInstruction

public java.lang.Boolean visitThrowExceptionInstruction(ThrowExceptionInstruction instruction)
Overrides:
visitThrowExceptionInstruction in class InstructionVisitorWithResult<java.lang.Boolean>

visitMarkInstruction

public java.lang.Boolean visitMarkInstruction(MarkInstruction instruction)
Overrides:
visitMarkInstruction in class InstructionVisitorWithResult<java.lang.Boolean>