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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java (-19 / +19 lines)
Lines 27-60 Link Here
27
	public final static int Bit2 = 0x2;					// return type (operator) | name reference kind (name ref) | has local type (type, method, field decl)
27
	public final static int Bit2 = 0x2;					// return type (operator) | name reference kind (name ref) | has local type (type, method, field decl)
28
	public final static int Bit3 = 0x4;					// return type (operator) | name reference kind (name ref) | implicit this (this ref)
28
	public final static int Bit3 = 0x4;					// return type (operator) | name reference kind (name ref) | implicit this (this ref)
29
	public final static int Bit4 = 0x8;					// return type (operator) | first assignment to local (name ref,local decl) | undocumented empty block (block, type and method decl)
29
	public final static int Bit4 = 0x8;					// return type (operator) | first assignment to local (name ref,local decl) | undocumented empty block (block, type and method decl)
30
	public final static int Bit5 = 0x10;				// value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl)
30
	public final static int Bit5 = 0x10;					// value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl)
31
	public final static int Bit6 = 0x20;				// depth (name ref, msg) | ignore need cast check (cast expression) | error in signature (method declaration/ initializer) | is recovered (annotation reference)
31
	public final static int Bit6 = 0x20;					// depth (name ref, msg) | ignore need cast check (cast expression) | error in signature (method declaration/ initializer) | is recovered (annotation reference)
32
	public final static int Bit7 = 0x40;				// depth (name ref, msg) | operator (operator) | need runtime checkcast (cast expression) | label used (labelStatement) | needFreeReturn (AbstractMethodDeclaration)
32
	public final static int Bit7 = 0x40;					// depth (name ref, msg) | operator (operator) | need runtime checkcast (cast expression) | label used (labelStatement) | needFreeReturn (AbstractMethodDeclaration)
33
	public final static int Bit8 = 0x80;				// depth (name ref, msg) | operator (operator) | unsafe cast (cast expression) | is default constructor (constructor declaration)
33
	public final static int Bit8 = 0x80;					// depth (name ref, msg) | operator (operator) | unsafe cast (cast expression) | is default constructor (constructor declaration)
34
	public final static int Bit9 = 0x100;				// depth (name ref, msg) | operator (operator) | is local type (type decl)
34
	public final static int Bit9 = 0x100;				// depth (name ref, msg) | operator (operator) | is local type (type decl)
35
	public final static int Bit10= 0x200;				// depth (name ref, msg) | operator (operator) | is anonymous type (type decl)
35
	public final static int Bit10= 0x200;				// depth (name ref, msg) | operator (operator) | is anonymous type (type decl)
36
	public final static int Bit11 = 0x400;				// depth (name ref, msg) | operator (operator) | is member type (type decl)
36
	public final static int Bit11 = 0x400;				// depth (name ref, msg) | operator (operator) | is member type (type decl)
37
	public final static int Bit12 = 0x800;				// depth (name ref, msg) | operator (operator) | has abstract methods (type decl)
37
	public final static int Bit12 = 0x800;				// depth (name ref, msg) | operator (operator) | has abstract methods (type decl)
38
	public final static int Bit13 = 0x1000;				// depth (name ref, msg) | is secondary type (type decl)
38
	public final static int Bit13 = 0x1000;			// depth (name ref, msg) | is secondary type (type decl)
39
	public final static int Bit14 = 0x2000;				// strictly assigned (reference lhs) | discard enclosing instance (explicit constr call) | hasBeenGenerated (type decl)
39
	public final static int Bit14 = 0x2000;			// strictly assigned (reference lhs) | discard enclosing instance (explicit constr call) | hasBeenGenerated (type decl)
40
	public final static int Bit15 = 0x4000;				// is unnecessary cast (expression) | is varargs (type ref) | isSubRoutineEscaping (try statement) | superAccess (javadoc allocation expression/javadoc message send/javadoc return statement)
40
	public final static int Bit15 = 0x4000;			// is unnecessary cast (expression) | is varargs (type ref) | isSubRoutineEscaping (try statement) | superAccess (javadoc allocation expression/javadoc message send/javadoc return statement)
41
	public final static int Bit16 = 0x8000;				// in javadoc comment (name ref, type ref, msg)
41
	public final static int Bit16 = 0x8000;			// in javadoc comment (name ref, type ref, msg)
42
	public final static int Bit17 = 0x10000;			// compound assigned (reference lhs)
42
	public final static int Bit17 = 0x10000;			// compound assigned (reference lhs)
43
	public final static int Bit18 = 0x20000;			// non null (expression) | onDemand (import reference)
43
	public final static int Bit18 = 0x20000;			// non null (expression) | onDemand (import reference)
44
	public final static int Bit19 = 0x40000;			// didResolve (parameterized qualified type ref/parameterized single type ref)  | empty (javadoc return statement)
44
	public final static int Bit19 = 0x40000;			// didResolve (parameterized qualified type ref/parameterized single type ref)  | empty (javadoc return statement)
45
	public final static int Bit20 = 0x80000;
45
	public final static int Bit20 = 0x80000;
46
	public final static int Bit21 = 0x100000;
46
	public final static int Bit21 = 0x100000;
47
	public final static int Bit22 = 0x200000;			// parenthesis count (expression) | used (import reference)
47
	public final static int Bit22 = 0x200000;		// parenthesis count (expression) | used (import reference)
48
	public final static int Bit23 = 0x400000;			// parenthesis count (expression)
48
	public final static int Bit23 = 0x400000;		// parenthesis count (expression)
49
	public final static int Bit24 = 0x800000;			// parenthesis count (expression)
49
	public final static int Bit24 = 0x800000;		// parenthesis count (expression)
50
	public final static int Bit25 = 0x1000000;			// parenthesis count (expression)
50
	public final static int Bit25 = 0x1000000;		// parenthesis count (expression)
51
	public final static int Bit26 = 0x2000000;			// parenthesis count (expression)
51
	public final static int Bit26 = 0x2000000;		// parenthesis count (expression)
52
	public final static int Bit27 = 0x4000000;			// parenthesis count (expression)
52
	public final static int Bit27 = 0x4000000;		// parenthesis count (expression)
53
	public final static int Bit28 = 0x8000000;			// parenthesis count (expression)
53
	public final static int Bit28 = 0x8000000;		// parenthesis count (expression)
54
	public final static int Bit29 = 0x10000000;			// parenthesis count (expression)
54
	public final static int Bit29 = 0x10000000;	// parenthesis count (expression)
55
	public final static int Bit30 = 0x20000000;			// elseif (if statement) | try block exit (try statement) | fall-through (case statement) | ignore no effect assign (expression ref) | needScope (for statement) | isAnySubRoutineEscaping (return statement) | blockExit (synchronized statement)
55
	public final static int Bit30 = 0x20000000;	// elseif (if statement) | try block exit (try statement) | fall-through (case statement) | ignore no effect assign (expression ref) | needScope (for statement) | isAnySubRoutineEscaping (return statement) | blockExit (synchronized statement)
56
	public final static int Bit31 = 0x40000000;			// local declaration reachable (local decl) | ignore raw type check (type ref) | discard entire assignment (assignment) | isSynchronized (return statement) | thenExit (if statement)
56
	public final static int Bit31 = 0x40000000;	// local declaration reachable (local decl) | ignore raw type check (type ref) | discard entire assignment (assignment) | isSynchronized (return statement) | thenExit (if statement)
57
	public final static int Bit32 = 0x80000000;			// reachable (statement)
57
	public final static int Bit32 = 0x80000000;	// reachable (statement)
58
58
59
	public final static long Bit32L = 0x80000000L;
59
	public final static long Bit32L = 0x80000000L;
60
	public final static long Bit33L = 0x100000000L;
60
	public final static long Bit33L = 0x100000000L;
(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (-1 / +8 lines)
Lines 1944-1950 Link Here
1944
	// SwitchLabel ::= 'case' ConstantExpression ':'
1944
	// SwitchLabel ::= 'case' ConstantExpression ':'
1945
	this.expressionLengthPtr--;
1945
	this.expressionLengthPtr--;
1946
	Expression expression = this.expressionStack[this.expressionPtr--];
1946
	Expression expression = this.expressionStack[this.expressionPtr--];
1947
	pushOnAstStack(new CaseStatement(expression, expression.sourceEnd, this.intStack[this.intPtr--]));
1947
	CaseStatement caseStatement = new CaseStatement(expression, expression.sourceEnd, this.intStack[this.intPtr--]);
1948
	if (this.astLengthPtr >= 0 && this.astLengthStack[this.astLengthPtr] > 1) {
1949
		ASTNode lastNode = this.astStack[this.astPtr];
1950
		if (containsComment(lastNode.sourceEnd, caseStatement.sourceStart)) {
1951
			caseStatement.bits |= ASTNode.DocumentedFallthrough;
1952
		}
1953
	}
1954
	pushOnAstStack(caseStatement);
1948
}
1955
}
1949
protected void consumeCastExpressionLL1() {
1956
protected void consumeCastExpressionLL1() {
1950
	//CastExpression ::= '(' Expression ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
1957
	//CastExpression ::= '(' Expression ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus

Return to bug 245257