Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / flow / FlowContext.java
index 8daeeba..90a1f67 100644 (file)
  *******************************************************************************/
 package net.sourceforge.phpdt.internal.compiler.flow;
 
-import net.sourceforge.phpdt.core.compiler.CharOperation;
+//import net.sourceforge.phpdt.core.compiler.CharOperation;
 import net.sourceforge.phpdt.internal.compiler.ast.ASTNode;
 import net.sourceforge.phpdt.internal.compiler.ast.AbstractMethodDeclaration;
 import net.sourceforge.phpdt.internal.compiler.ast.Reference;
 import net.sourceforge.phpdt.internal.compiler.ast.TryStatement;
-import net.sourceforge.phpdt.internal.compiler.codegen.Label;
+//import net.sourceforge.phpdt.internal.compiler.codegen.Label;
 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
 import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.Scope;
@@ -42,10 +42,10 @@ public class FlowContext implements TypeConstants {
                this.associatedNode = associatedNode;
        }
 
-       public Label breakLabel() {
-
-               return null;
-       }
+//     public Label breakLabel() {
+//
+//             return null;
+//     }
 
        public void checkExceptionHandlers(TypeBinding[] raisedExceptions,
                        ASTNode location, FlowInfo flowInfo, BlockScope scope) {
@@ -289,169 +289,169 @@ public class FlowContext implements TypeConstants {
                scope.problemReporter().unhandledException(raisedException, location);
        }
 
-       public Label continueLabel() {
-
-               return null;
-       }
+//     public Label continueLabel() {
+//
+//             return null;
+//     }
 
        /*
         * lookup through break labels
         */
-       public FlowContext getTargetContextForBreakLabel(char[] labelName) {
-
-               FlowContext current = this, lastNonReturningSubRoutine = null;
-               while (current != null) {
-                       if (current.isNonReturningContext()) {
-                               lastNonReturningSubRoutine = current;
-                       }
-                       char[] currentLabelName;
-                       if (((currentLabelName = current.labelName()) != null)
-                                       && CharOperation.equals(currentLabelName, labelName)) {
-                               if (lastNonReturningSubRoutine == null) {
-                                       return current;
-                               } else {
-                                       return lastNonReturningSubRoutine;
-                               }
-                       }
-                       current = current.parent;
-               }
-               // not found
-               return null;
-       }
+//     public FlowContext getTargetContextForBreakLabel(char[] labelName) {
+//
+//             FlowContext current = this, lastNonReturningSubRoutine = null;
+//             while (current != null) {
+//                     if (current.isNonReturningContext()) {
+//                             lastNonReturningSubRoutine = current;
+//                     }
+//                     char[] currentLabelName;
+//                     if (((currentLabelName = current.labelName()) != null)
+//                                     && CharOperation.equals(currentLabelName, labelName)) {
+//                             if (lastNonReturningSubRoutine == null) {
+//                                     return current;
+//                             } else {
+//                                     return lastNonReturningSubRoutine;
+//                             }
+//                     }
+//                     current = current.parent;
+//             }
+//             // not found
+//             return null;
+//     }
 
        /*
         * lookup through continue labels
         */
-       public FlowContext getTargetContextForContinueLabel(char[] labelName) {
-
-               FlowContext current = this;
-               FlowContext lastContinuable = null;
-               FlowContext lastNonReturningSubRoutine = null;
-
-               while (current != null) {
-                       if (current.isNonReturningContext()) {
-                               lastNonReturningSubRoutine = current;
-                       } else {
-                               if (current.isContinuable()) {
-                                       lastContinuable = current;
-                               }
-                       }
-
-                       char[] currentLabelName;
-                       if ((currentLabelName = current.labelName()) != null
-                                       && CharOperation.equals(currentLabelName, labelName)) {
-
-                               // matching label found
-                               if ((lastContinuable != null)
-                                               && (current.associatedNode.concreteStatement() == lastContinuable.associatedNode)) {
-
-                                       if (lastNonReturningSubRoutine == null) {
-                                               return lastContinuable;
-                                       } else {
-                                               return lastNonReturningSubRoutine;
-                                       }
-                               } else {
-                                       // label is found, but not a continuable location
-                                       return NotContinuableContext;
-                               }
-                       }
-                       current = current.parent;
-               }
-               // not found
-               return null;
-       }
+//     public FlowContext getTargetContextForContinueLabel(char[] labelName) {
+//
+//             FlowContext current = this;
+//             FlowContext lastContinuable = null;
+//             FlowContext lastNonReturningSubRoutine = null;
+//
+//             while (current != null) {
+//                     if (current.isNonReturningContext()) {
+//                             lastNonReturningSubRoutine = current;
+//                     } else {
+//                             if (current.isContinuable()) {
+//                                     lastContinuable = current;
+//                             }
+//                     }
+//
+//                     char[] currentLabelName;
+//                     if ((currentLabelName = current.labelName()) != null
+//                                     && CharOperation.equals(currentLabelName, labelName)) {
+//
+//                             // matching label found
+//                             if ((lastContinuable != null)
+//                                             && (current.associatedNode.concreteStatement() == lastContinuable.associatedNode)) {
+//
+//                                     if (lastNonReturningSubRoutine == null) {
+//                                             return lastContinuable;
+//                                     } else {
+//                                             return lastNonReturningSubRoutine;
+//                                     }
+//                             } else {
+//                                     // label is found, but not a continuable location
+//                                     return NotContinuableContext;
+//                             }
+//                     }
+//                     current = current.parent;
+//             }
+//             // not found
+//             return null;
+//     }
 
        /*
         * lookup a default break through breakable locations
         */
-       public FlowContext getTargetContextForDefaultBreak() {
-
-               FlowContext current = this, lastNonReturningSubRoutine = null;
-               while (current != null) {
-                       if (current.isNonReturningContext()) {
-                               lastNonReturningSubRoutine = current;
-                       }
-                       if (current.isBreakable() && current.labelName() == null) {
-                               if (lastNonReturningSubRoutine == null) {
-                                       return current;
-                               } else {
-                                       return lastNonReturningSubRoutine;
-                               }
-                       }
-                       current = current.parent;
-               }
-               // not found
-               return null;
-       }
+//     public FlowContext getTargetContextForDefaultBreak() {
+//
+//             FlowContext current = this, lastNonReturningSubRoutine = null;
+//             while (current != null) {
+//                     if (current.isNonReturningContext()) {
+//                             lastNonReturningSubRoutine = current;
+//                     }
+//                     if (current.isBreakable() && current.labelName() == null) {
+//                             if (lastNonReturningSubRoutine == null) {
+//                                     return current;
+//                             } else {
+//                                     return lastNonReturningSubRoutine;
+//                             }
+//                     }
+//                     current = current.parent;
+//             }
+//             // not found
+//             return null;
+//     }
 
        /*
         * lookup a default continue amongst continuable locations
         */
-       public FlowContext getTargetContextForDefaultContinue() {
-
-               FlowContext current = this, lastNonReturningSubRoutine = null;
-               while (current != null) {
-                       if (current.isNonReturningContext()) {
-                               lastNonReturningSubRoutine = current;
-                       }
-                       if (current.isContinuable()) {
-                               if (lastNonReturningSubRoutine == null) {
-                                       return current;
-                               } else {
-                                       return lastNonReturningSubRoutine;
-                               }
-                       }
-                       current = current.parent;
-               }
-               // not found
-               return null;
-       }
+//     public FlowContext getTargetContextForDefaultContinue() {
+//
+//             FlowContext current = this, lastNonReturningSubRoutine = null;
+//             while (current != null) {
+//                     if (current.isNonReturningContext()) {
+//                             lastNonReturningSubRoutine = current;
+//                     }
+//                     if (current.isContinuable()) {
+//                             if (lastNonReturningSubRoutine == null) {
+//                                     return current;
+//                             } else {
+//                                     return lastNonReturningSubRoutine;
+//                             }
+//                     }
+//                     current = current.parent;
+//             }
+//             // not found
+//             return null;
+//     }
 
        public String individualToString() {
 
                return "Flow context"; //$NON-NLS-1$
        }
 
-       public FlowInfo initsOnBreak() {
+//     public FlowInfo initsOnBreak() {
+//
+//             return FlowInfo.DEAD_END;
+//     }
 
-               return FlowInfo.DEAD_END;
-       }
-
-       public UnconditionalFlowInfo initsOnReturn() {
-
-               return FlowInfo.DEAD_END;
-       }
-
-       public boolean isBreakable() {
-
-               return false;
-       }
+//     public UnconditionalFlowInfo initsOnReturn() {
+//
+//             return FlowInfo.DEAD_END;
+//     }
 
-       public boolean isContinuable() {
+//     public boolean isBreakable() {
+//
+//             return false;
+//     }
 
-               return false;
-       }
-
-       public boolean isNonReturningContext() {
+//     public boolean isContinuable() {
+//
+//             return false;
+//     }
 
-               return false;
-       }
+//     public boolean isNonReturningContext() {
+//
+//             return false;
+//     }
 
-       public boolean isSubRoutine() {
-
-               return false;
-       }
+//     public boolean isSubRoutine() {
+//
+//             return false;
+//     }
 
        public char[] labelName() {
 
                return null;
        }
 
-       public void recordBreakFrom(FlowInfo flowInfo) {
-       }
+//     public void recordBreakFrom(FlowInfo flowInfo) {
+//     }
 
-       public void recordContinueFrom(FlowInfo flowInfo) {
-       }
+//     public void recordContinueFrom(FlowInfo flowInfo) {
+//     }
 
        boolean recordFinalAssignment(VariableBinding variable,
                        Reference finalReference) {