View | Details | Raw Unified | Return to bug 339139 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java (-1 / +1 lines)
Lines 38-44 Link Here
38
38
39
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
39
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
40
	// record variable initialization if any
40
	// record variable initialization if any
41
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
41
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
42
		this.bits |= ASTNode.IsLocalDeclarationReachable; // only set if actually reached
42
		this.bits |= ASTNode.IsLocalDeclarationReachable; // only set if actually reached
43
	}
43
	}
44
	if (this.binding != null && this.type.resolvedType instanceof TypeVariableBinding) {
44
	if (this.binding != null && this.type.resolvedType instanceof TypeVariableBinding) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java (-2 / +2 lines)
Lines 159-165 Link Here
159
						catchInfo);
159
						catchInfo);
160
				this.catchExitInitStateIndexes[i] = currentScope.methodScope().recordInitializationStates(catchInfo);
160
				this.catchExitInitStateIndexes[i] = currentScope.methodScope().recordInitializationStates(catchInfo);
161
				this.catchExits[i] =
161
				this.catchExits[i] =
162
					(catchInfo.tagBits & FlowInfo.UNREACHABLE) != 0;
162
					(catchInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0;
163
				tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());
163
				tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());
164
			}
164
			}
165
		}
165
		}
Lines 268-274 Link Here
268
						catchInfo);
268
						catchInfo);
269
				this.catchExitInitStateIndexes[i] = currentScope.methodScope().recordInitializationStates(catchInfo);
269
				this.catchExitInitStateIndexes[i] = currentScope.methodScope().recordInitializationStates(catchInfo);
270
				this.catchExits[i] =
270
				this.catchExits[i] =
271
					(catchInfo.tagBits & FlowInfo.UNREACHABLE) != 0;
271
					(catchInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0;
272
				tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());
272
				tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());
273
			}
273
			}
274
		}
274
		}
(-)compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 227-234 Link Here
227
}
227
}
228
228
229
public void recordReturnFrom(UnconditionalFlowInfo flowInfo) {
229
public void recordReturnFrom(UnconditionalFlowInfo flowInfo) {
230
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
230
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
231
		if ((this.initsOnReturn.tagBits & FlowInfo.UNREACHABLE) == 0) {
231
		if ((this.initsOnReturn.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
232
			this.initsOnReturn = this.initsOnReturn.mergedWith(flowInfo);
232
			this.initsOnReturn = this.initsOnReturn.mergedWith(flowInfo);
233
		}
233
		}
234
		else {
234
		else {
(-)compiler/org/eclipse/jdt/internal/compiler/flow/InsideSubRoutineFlowContext.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 43-49 Link Here
43
}
43
}
44
44
45
public void recordReturnFrom(UnconditionalFlowInfo flowInfo) {
45
public void recordReturnFrom(UnconditionalFlowInfo flowInfo) {
46
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)	{
46
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0)	{
47
	if (this.initsOnReturn == FlowInfo.DEAD_END) {
47
	if (this.initsOnReturn == FlowInfo.DEAD_END) {
48
		this.initsOnReturn = (UnconditionalFlowInfo) flowInfo.copy();
48
		this.initsOnReturn = (UnconditionalFlowInfo) flowInfo.copy();
49
	} else {
49
	} else {
(-)compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java (-2 / +2 lines)
Lines 385-392 Link Here
385
}
385
}
386
386
387
public void recordContinueFrom(FlowContext innerFlowContext, FlowInfo flowInfo) {
387
public void recordContinueFrom(FlowContext innerFlowContext, FlowInfo flowInfo) {
388
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)	{
388
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0)	{
389
		if ((this.initsOnContinue.tagBits & FlowInfo.UNREACHABLE) == 0) {
389
		if ((this.initsOnContinue.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
390
			this.initsOnContinue = this.initsOnContinue.
390
			this.initsOnContinue = this.initsOnContinue.
391
					mergedWith(flowInfo.unconditionalInitsWithoutSideEffect());
391
					mergedWith(flowInfo.unconditionalInitsWithoutSideEffect());
392
		}
392
		}
(-)compiler/org/eclipse/jdt/internal/compiler/flow/SwitchFlowContext.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 42-48 Link Here
42
}
42
}
43
43
44
public void recordBreakFrom(FlowInfo flowInfo) {
44
public void recordBreakFrom(FlowInfo flowInfo) {
45
	if ((this.initsOnBreak.tagBits & FlowInfo.UNREACHABLE) == 0) {
45
	if ((this.initsOnBreak.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
46
		this.initsOnBreak = this.initsOnBreak.mergedWith(flowInfo.unconditionalInits());
46
		this.initsOnBreak = this.initsOnBreak.mergedWith(flowInfo.unconditionalInits());
47
	}
47
	}
48
	else {
48
	else {
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 409-415 Link Here
409
}
409
}
410
410
411
public final int recordInitializationStates(FlowInfo flowInfo) {
411
public final int recordInitializationStates(FlowInfo flowInfo) {
412
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return -1;
412
	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return -1;
413
	UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
413
	UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
414
	long[] extraInits = unconditionalFlowInfo.extra == null ?
414
	long[] extraInits = unconditionalFlowInfo.extra == null ?
415
			null : unconditionalFlowInfo.extra[0];
415
			null : unconditionalFlowInfo.extra[0];

Return to bug 339139