001 /*
002 * Copyright 2010-2013 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017 package org.jetbrains.jet.lang.cfg.pseudocode;
018
019 public class InstructionVisitor {
020 public void visitReadValue(ReadValueInstruction instruction) {
021 visitInstructionWithNext(instruction);
022 }
023
024 public void visitLocalDeclarationInstruction(LocalDeclarationInstruction instruction) {
025 visitInstructionWithNext(instruction);
026 }
027
028 public void visitVariableDeclarationInstruction(VariableDeclarationInstruction instruction) {
029 visitInstructionWithNext(instruction);
030 }
031
032 public void visitUnconditionalJump(UnconditionalJumpInstruction instruction) {
033 visitJump(instruction);
034 }
035
036 public void visitConditionalJump(ConditionalJumpInstruction instruction) {
037 visitJump(instruction);
038 }
039
040 public void visitReturnValue(ReturnValueInstruction instruction) {
041 visitJump(instruction);
042 }
043
044 public void visitReturnNoValue(ReturnNoValueInstruction instruction) {
045 visitJump(instruction);
046 }
047
048 public void visitThrowExceptionInstruction(ThrowExceptionInstruction instruction) {
049 visitJump(instruction);
050 }
051
052 public void visitNondeterministicJump(NondeterministicJumpInstruction instruction) {
053 visitInstruction(instruction);
054 }
055
056 public void visitUnsupportedElementInstruction(UnsupportedElementInstruction instruction) {
057 visitInstructionWithNext(instruction);
058 }
059
060 public void visitSubroutineExit(SubroutineExitInstruction instruction) {
061 visitInstruction(instruction);
062 }
063
064 public void visitSubroutineSink(SubroutineSinkInstruction instruction) {
065 visitInstruction(instruction);
066 }
067
068 public void visitJump(AbstractJumpInstruction instruction) {
069 visitInstruction(instruction);
070 }
071
072 public void visitInstructionWithNext(InstructionWithNext instruction) {
073 visitInstruction(instruction);
074 }
075
076 public void visitInstruction(Instruction instruction) {
077 }
078
079 public void visitSubroutineEnter(SubroutineEnterInstruction instruction) {
080 visitInstructionWithNext(instruction);
081 }
082
083 public void visitWriteValue(WriteValueInstruction writeValueInstruction) {
084 visitInstructionWithNext(writeValueInstruction);
085 }
086
087 public void visitReadUnitValue(ReadUnitValueInstruction instruction) {
088 visitInstructionWithNext(instruction);
089 }
090 }