X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/ExceptionHandlingFlowContext.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/ExceptionHandlingFlowContext.java index e483357..9348747 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/ExceptionHandlingFlowContext.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/flow/ExceptionHandlingFlowContext.java @@ -14,10 +14,13 @@ import java.util.ArrayList; import net.sourceforge.phpdt.internal.compiler.codegen.ObjectCache; import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.CompilerModifiers; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding; import net.sourceforge.phpdt.internal.compiler.lookup.Scope; import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; import net.sourceforge.phpeclipse.internal.compiler.ast.ASTNode; +import net.sourceforge.phpeclipse.internal.compiler.ast.AbstractMethodDeclaration; import net.sourceforge.phpeclipse.internal.compiler.ast.TryStatement; /** @@ -69,31 +72,32 @@ public class ExceptionHandlingFlowContext extends FlowContext { System.arraycopy(this.isReached, 0, this.isNeeded, 0, cacheSize); this.initsOnReturn = FlowInfo.DEAD_END; } - - public void complainIfUnusedExceptionHandlers( - ASTNode[] exceptionHandlers, - BlockScope scope, - TryStatement tryStatement) { - // report errors for unreachable exception handlers - for (int i = 0, count = handledExceptions.length; i < count; i++) { - int index = indexes.get(handledExceptions[i]); - int cacheIndex = index / BitCacheSize; - int bitMask = 1 << (index % BitCacheSize); - if ((isReached[cacheIndex] & bitMask) == 0) { - scope.problemReporter().unreachableExceptionHandler( - handledExceptions[index], - exceptionHandlers[index]); - } else { - if ((isNeeded[cacheIndex] & bitMask) == 0) { - scope.problemReporter().maskedExceptionHandler( - handledExceptions[index], - exceptionHandlers[index]); - } - } - } - // will optimized out unnecessary catch block during code gen - tryStatement.preserveExceptionHandler = isNeeded; - } + + +// public void complainIfUnusedExceptionHandlers( +// ASTNode[] exceptionHandlers, +// BlockScope scope, +// TryStatement tryStatement) { +// // report errors for unreachable exception handlers +// for (int i = 0, count = handledExceptions.length; i < count; i++) { +// int index = indexes.get(handledExceptions[i]); +// int cacheIndex = index / BitCacheSize; +// int bitMask = 1 << (index % BitCacheSize); +// if ((isReached[cacheIndex] & bitMask) == 0) { +// scope.problemReporter().unreachableExceptionHandler( +// handledExceptions[index], +// exceptionHandlers[index]); +// } else { +// if ((isNeeded[cacheIndex] & bitMask) == 0) { +// scope.problemReporter().maskedExceptionHandler( +// handledExceptions[index], +// exceptionHandlers[index]); +// } +// } +// } +// // will optimized out unnecessary catch block during code gen +// tryStatement.preserveExceptionHandler = isNeeded; +// } public String individualToString() {