Blob Blame History Raw
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java,v
retrieving revision 1.60
diff -u -r1.60 UnconditionalFlowInfo.java
--- compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java	5 Dec 2006 11:46:08 -0000	1.60
+++ compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java	4 Mar 2009 16:56:17 -0000
@@ -1544,7 +1544,10 @@
 }
 
 public FlowInfo setReachMode(int reachMode) {
-	if (reachMode == REACHABLE && this != DEAD_END) { // cannot modify DEAD_END
+	if (this == DEAD_END) {
+		return this; // cannot modify DEAD_END
+	}
+	if (reachMode == REACHABLE) { 
 		this.tagBits &= ~UNREACHABLE;
 	}
 	else {
Index: compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java,v
retrieving revision 1.35
diff -u -r1.35 FlowInfo.java
--- compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java	26 Sep 2006 12:04:03 -0000	1.35
+++ compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java	4 Mar 2009 16:56:16 -0000
@@ -58,7 +58,7 @@
 	}
 
 	public static FlowInfo conditional(FlowInfo initsWhenTrue, FlowInfo initsWhenFalse){
-
+		if (initsWhenTrue == initsWhenFalse) return initsWhenTrue;
 		// if (initsWhenTrue.equals(initsWhenFalse)) return initsWhenTrue; -- could optimize if #equals is defined
 		return new ConditionalFlowInfo(initsWhenTrue, initsWhenFalse);
 	}
Index: compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java,v
retrieving revision 1.56
diff -u -r1.56 DoStatement.java
--- compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java	6 Mar 2007 02:38:48 -0000	1.56
+++ compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java	4 Mar 2009 16:56:16 -0000
@@ -144,19 +144,19 @@
 	// continue label (135602)
 	if (hasContinueLabel) {
 		this.continueLabel.place();
-	}
-	// generate condition
-	Constant cst = this.condition.optimizedBooleanConstant();
-	boolean isConditionOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false;		
-	if (isConditionOptimizedFalse){
-		this.condition.generateCode(currentScope, codeStream, false);
-	} else if (hasContinueLabel) {
-		this.condition.generateOptimizedBoolean(
-			currentScope,
-			codeStream,
-			actionLabel,
-			null,
-			true);
+		// generate condition
+		Constant cst = this.condition.optimizedBooleanConstant();
+		boolean isConditionOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false;		
+		if (isConditionOptimizedFalse){
+			this.condition.generateCode(currentScope, codeStream, false);
+		} else {
+			this.condition.generateOptimizedBoolean(
+				currentScope,
+				codeStream,
+				actionLabel,
+				null,
+				true);
+		}
 	}
 	// May loose some local variable initializations : affecting the local variable attributes
 	if (this.mergedInitStateIndex != -1) {