Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 64883 Details for
Bug 146556
Should refactor boolean fields into bits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for remaining issues
patch_146556.txt (text/plain), 81.14 KB, created by
Olivier Thomann
on 2007-04-25 11:52:30 EDT
(
hide
)
Description:
Patch for remaining issues
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-04-25 11:52:30 EDT
Size:
81.14 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/search/indexing/IndexingParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexingParser.java,v >retrieving revision 1.1 >diff -u -r1.1 IndexingParser.java >--- search/org/eclipse/jdt/internal/core/search/indexing/IndexingParser.java 8 Mar 2006 22:48:23 -0000 1.1 >+++ search/org/eclipse/jdt/internal/core/search/indexing/IndexingParser.java 25 Apr 2007 15:33:41 -0000 >@@ -14,6 +14,7 @@ > import org.eclipse.jdt.internal.compiler.IProblemFactory; > import org.eclipse.jdt.internal.compiler.ISourceElementRequestor; > import org.eclipse.jdt.internal.compiler.SourceElementParser; >+import org.eclipse.jdt.internal.compiler.ast.ASTNode; > import org.eclipse.jdt.internal.compiler.ast.ImportReference; > import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference; > import org.eclipse.jdt.internal.compiler.ast.SingleNameReference; >@@ -36,7 +37,9 @@ > ImportReference ref = this.importReference; > ref.tokens = tokens; > ref.sourcePositions = sourcePositions; >- ref.onDemand = onDemand; >+ if (onDemand) { >+ ref.bits |= ASTNode.OnDemand; >+ } > ref.sourceEnd = (int) (sourcePositions[sourcePositions.length-1] & 0x00000000FFFFFFFF); > ref.sourceStart = (int) (sourcePositions[0] >>> 32); > ref.modifiers = modifiers; >Index: compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/RangeUtil.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/RangeUtil.java,v >retrieving revision 1.9 >diff -u -r1.9 RangeUtil.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/RangeUtil.java 23 Oct 2006 16:44:20 -0000 1.9 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/RangeUtil.java 25 Apr 2007 15:33:37 -0000 >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.parser.diagnose; > >+import org.eclipse.jdt.internal.compiler.ast.ASTNode; > import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; > import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; > import org.eclipse.jdt.internal.compiler.ast.Initializer; >@@ -141,7 +142,7 @@ > AbstractMethodDeclaration method = methods[i]; > if(containsIgnoredBody(method)) { > if(containsErrorInSignature(method)) { >- method.errorInSignature = true; >+ method.bits |= ASTNode.ErrorInSignature; > result.addInterval(method.declarationSourceStart, method.declarationSourceEnd, IGNORE); > } else { > int flags = method.sourceEnd + 1 == method.bodyStart ? LBRACE_MISSING : NO_FLAG; >@@ -159,7 +160,7 @@ > if (fields[i] instanceof Initializer) { > Initializer initializer = (Initializer)fields[i]; > if(initializer.declarationSourceEnd == initializer.bodyEnd && initializer.declarationSourceStart != initializer.declarationSourceEnd){ >- initializer.errorInSignature = true; >+ initializer.bits |= ASTNode.ErrorInSignature; > result.addInterval(initializer.declarationSourceStart, initializer.declarationSourceEnd, IGNORE); > } else { > result.addInterval(initializer.bodyStart, initializer.bodyEnd); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java,v >retrieving revision 1.47 >diff -u -r1.47 Clinit.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 8 Nov 2006 04:09:42 -0000 1.47 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 25 Apr 2007 15:33:35 -0000 >@@ -57,8 +57,9 @@ > FlowInfo.DEAD_END); > > // check for missing returning path >- this.needFreeReturn = (flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0; >- >+ if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) { >+ this.bits |= ASTNode.NeedFreeReturn; >+ } > > // check missing blank final field initializations > flowInfo = flowInfo.mergedWith(staticInitializerFlowContext.initsOnReturn); >@@ -265,7 +266,7 @@ > // reset the constant pool to its state before the clinit > constantPool.resetForClinit(constantPoolIndex, constantPoolOffset); > } else { >- if (this.needFreeReturn) { >+ if ((this.bits & ASTNode.NeedFreeReturn) != 0) { > int before = codeStream.position; > codeStream.return_(); > if (lastInitializerScope != null) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java,v >retrieving revision 1.56 >diff -u -r1.56 ReturnStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java 6 Mar 2007 02:38:48 -0000 1.56 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java 25 Apr 2007 15:33:35 -0000 >@@ -20,9 +20,7 @@ > public class ReturnStatement extends Statement { > > public Expression expression; >- public boolean isSynchronized; > public SubRoutineStatement[] subroutines; >- public boolean isAnySubRoutineEscaping = false; > public LocalVariableBinding saveValueVariable; > public int initStateIndex = -1; > >@@ -61,7 +59,7 @@ > this.subroutines[subCount++] = sub; > if (sub.isSubRoutineEscaping()) { > saveValueNeeded = false; >- this.isAnySubRoutineEscaping = true; >+ this.bits |= ASTNode.IsAnySubRoutineEscaping; > break; > } > } >@@ -70,7 +68,7 @@ > if (traversedContext instanceof InsideSubRoutineFlowContext) { > ASTNode node = traversedContext.associatedNode; > if (node instanceof SynchronizedStatement) { >- this.isSynchronized = true; >+ this.bits |= ASTNode.IsSynchronized; > } else if (node instanceof TryStatement) { > TryStatement tryStatement = (TryStatement) node; > flowInfo.addInitializationsFrom(tryStatement.subRoutineInits); // collect inits >@@ -99,7 +97,7 @@ > } > } else { > this.saveValueVariable = null; >- if (!this.isSynchronized && this.expression != null && this.expression.resolvedType == TypeBinding.BOOLEAN) { >+ if (((this.bits & ASTNode.IsSynchronized) == 0) && this.expression != null && this.expression.resolvedType == TypeBinding.BOOLEAN) { > this.expression.bits |= ASTNode.IsReturnedValue; > } > } >@@ -177,8 +175,8 @@ > > public boolean needValue() { > return this.saveValueVariable != null >- || this.isSynchronized >- || !this.isAnySubRoutineEscaping; >+ || (this.bits & ASTNode.IsSynchronized) != 0 >+ || ((this.bits & ASTNode.IsAnySubRoutineEscaping) == 0); > } > > public void prepareSaveValueLocation(TryStatement targetTryStatement){ >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v >retrieving revision 1.55 >diff -u -r1.55 Javadoc.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 15 Apr 2007 14:26:20 -0000 1.55 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 25 Apr 2007 15:33:35 -0000 >@@ -373,7 +373,9 @@ > scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd, scopeModifiers); > } > else if (fieldRef.receiverType != null) { >- fieldRef.superAccess = scope.enclosingSourceType().isCompatibleWith(fieldRef.receiverType); >+ if (scope.enclosingSourceType().isCompatibleWith(fieldRef.receiverType)) { >+ fieldRef.bits |= ASTNode.SuperAccess; >+ } > fieldRef.methodBinding = scope.findMethod((ReferenceBinding)fieldRef.receiverType, fieldRef.token, new TypeBinding[0], fieldRef); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java,v >retrieving revision 1.57 >diff -u -r1.57 IfStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 20 Jun 2006 13:24:44 -0000 1.57 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 25 Apr 2007 15:33:35 -0000 >@@ -25,8 +25,6 @@ > public Statement thenStatement; > public Statement elseStatement; > >- boolean thenExit; >- > // for local variables table attributes > int thenInitStateIndex = -1; > int elseInitStateIndex = -1; >@@ -87,7 +85,9 @@ > } > } > // code gen: optimizing the jump around the ELSE part >- this.thenExit = (thenFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0; >+ if ((thenFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) { >+ this.bits |= ASTNode.ThenExit; >+ } > > // process the ELSE part > if (this.elseStatement != null) { >@@ -160,7 +160,7 @@ > this.thenStatement.generateCode(currentScope, codeStream); > // jump around the else statement > if (hasElsePart) { >- if (!thenExit) { >+ if ((this.bits & ASTNode.ThenExit) == 0) { > this.thenStatement.branchChainTo(endifLabel); > int position = codeStream.position; > codeStream.goto_(endifLabel); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java,v >retrieving revision 1.58 >diff -u -r1.58 MethodDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 19 Oct 2006 08:19:59 -0000 1.58 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 25 Apr 2007 15:33:35 -0000 >@@ -96,8 +96,9 @@ > // check for missing returning path > TypeBinding returnTypeBinding = binding.returnType; > if ((returnTypeBinding == TypeBinding.VOID) || isAbstract()) { >- this.needFreeReturn = >- (flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0; >+ if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) { >+ this.bits |= ASTNode.NeedFreeReturn; >+ } > } else { > if (flowInfo != FlowInfo.DEAD_END) { > scope.problemReporter().shouldReturn(returnTypeBinding, this); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java,v >retrieving revision 1.82 >diff -u -r1.82 ASTNode.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java 12 Apr 2007 10:37:18 -0000 1.82 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java 25 Apr 2007 15:33:34 -0000 >@@ -22,39 +22,39 @@ > > public int sourceStart, sourceEnd; > >- // storage for internal flags (32 bits) BIT USAGE >- public final static int Bit1 = 0x1; // return type (operator) | name reference kind (name ref) | add assertion (type decl) | useful empty statement (empty statement) >- public final static int Bit2 = 0x2; // return type (operator) | name reference kind (name ref) | has local type (type, method, field decl) >- public final static int Bit3 = 0x4; // return type (operator) | name reference kind (name ref) | implicit this (this ref) >- 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) >- public final static int Bit5 = 0x10; // value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl) >- public final static int Bit6 = 0x20; // depth (name ref, msg) | ignore need cast check (cast expression) >- public final static int Bit7 = 0x40; // depth (name ref, msg) | operator (operator) | need runtime checkcast (cast expression) | label used (labelStatement) >- public final static int Bit8 = 0x80; // depth (name ref, msg) | operator (operator) | unsafe cast (cast expression) >- public final static int Bit9 = 0x100; // depth (name ref, msg) | operator (operator) | is local type (type decl) >- public final static int Bit10= 0x200; // depth (name ref, msg) | operator (operator) | is anonymous type (type decl) >- public final static int Bit11 = 0x400; // depth (name ref, msg) | operator (operator) | is member type (type decl) >- public final static int Bit12 = 0x800; // depth (name ref, msg) | operator (operator) | has abstract methods (type decl) >- public final static int Bit13 = 0x1000; // depth (name ref, msg) | is secondary type (type decl) >- public final static int Bit14 = 0x2000; // strictly assigned (reference lhs) | discard enclosing instance (explicit constr call) >- public final static int Bit15 = 0x4000; // is unnecessary cast (expression) | is varargs (type ref) | isSubRoutineEscaping (try statement) >- public final static int Bit16 = 0x8000; // in javadoc comment (name ref, type ref, msg) >- public final static int Bit17 = 0x10000; // compound assigned (reference lhs) >- public final static int Bit18 = 0x20000; // non null (expression) >- public final static int Bit19 = 0x40000; >+ // storage for internal flags (32 bits) BIT USAGE >+ public final static int Bit1 = 0x1; // return type (operator) | name reference kind (name ref) | add assertion (type decl) | useful empty statement (empty statement) >+ public final static int Bit2 = 0x2; // return type (operator) | name reference kind (name ref) | has local type (type, method, field decl) >+ public final static int Bit3 = 0x4; // return type (operator) | name reference kind (name ref) | implicit this (this ref) >+ 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) >+ public final static int Bit5 = 0x10; // value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl) >+ public final static int Bit6 = 0x20; // depth (name ref, msg) | ignore need cast check (cast expression) | error in signature (method declaration/ initializer) >+ public final static int Bit7 = 0x40; // depth (name ref, msg) | operator (operator) | need runtime checkcast (cast expression) | label used (labelStatement) | needFreeReturn (AbstractMethodDeclaration) >+ public final static int Bit8 = 0x80; // depth (name ref, msg) | operator (operator) | unsafe cast (cast expression) | is default constructor (constructor declaration) >+ public final static int Bit9 = 0x100; // depth (name ref, msg) | operator (operator) | is local type (type decl) >+ public final static int Bit10= 0x200; // depth (name ref, msg) | operator (operator) | is anonymous type (type decl) >+ public final static int Bit11 = 0x400; // depth (name ref, msg) | operator (operator) | is member type (type decl) >+ public final static int Bit12 = 0x800; // depth (name ref, msg) | operator (operator) | has abstract methods (type decl) >+ public final static int Bit13 = 0x1000; // depth (name ref, msg) | is secondary type (type decl) >+ public final static int Bit14 = 0x2000; // strictly assigned (reference lhs) | discard enclosing instance (explicit constr call) | hasBeenGenerated (type decl) >+ 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) >+ public final static int Bit16 = 0x8000; // in javadoc comment (name ref, type ref, msg) >+ public final static int Bit17 = 0x10000; // compound assigned (reference lhs) >+ public final static int Bit18 = 0x20000; // non null (expression) | onDemand (import reference) >+ public final static int Bit19 = 0x40000; // didResolve (parameterized qualified type ref/parameterized single type ref) | empty (javadoc return statement) > public final static int Bit20 = 0x80000; > public final static int Bit21 = 0x100000; >- public final static int Bit22 = 0x200000; // parenthesis count (expression) >- public final static int Bit23 = 0x400000; // parenthesis count (expression) >- public final static int Bit24 = 0x800000; // parenthesis count (expression) >- public final static int Bit25 = 0x1000000; // parenthesis count (expression) >- public final static int Bit26 = 0x2000000; // parenthesis count (expression) >- public final static int Bit27 = 0x4000000; // parenthesis count (expression) >- public final static int Bit28 = 0x8000000; // parenthesis count (expression) >- public final static int Bit29 = 0x10000000; // parenthesis count (expression) >- public final static int Bit30 = 0x20000000; // elseif (if statement) | try block exit (try statement) | fall-through (case statement) | ignore no effect assign (expression ref) >- public final static int Bit31 = 0x40000000; // local declaration reachable (local decl) | ignore raw type check (type ref) | discard entire assignment (assignment) >- public final static int Bit32 = 0x80000000; // reachable (statement) >+ public final static int Bit22 = 0x200000; // parenthesis count (expression) | used (import reference) >+ public final static int Bit23 = 0x400000; // parenthesis count (expression) >+ public final static int Bit24 = 0x800000; // parenthesis count (expression) >+ public final static int Bit25 = 0x1000000; // parenthesis count (expression) >+ public final static int Bit26 = 0x2000000; // parenthesis count (expression) >+ public final static int Bit27 = 0x4000000; // parenthesis count (expression) >+ public final static int Bit28 = 0x8000000; // parenthesis count (expression) >+ public final static int Bit29 = 0x10000000; // parenthesis count (expression) >+ 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) >+ 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) >+ public final static int Bit32 = 0x80000000; // reachable (statement) > > public final static long Bit32L = 0x80000000L; > public final static long Bit33L = 0x100000000L; >@@ -138,6 +138,7 @@ > public static final int IsMemberType = Bit11; // local member do not know it is local at parse time (need to look at binding) > public static final int HasAbstractMethods = Bit12; // used to promote abstract enums > public static final int IsSecondaryType = Bit13; // used to test for secondary >+ public static final int HasBeenGenerated = Bit14; > > // for type, method and field declarations > public static final int HasLocalType = Bit2; // cannot conflict with AddAssertionMASK >@@ -162,6 +163,15 @@ > public static final int UndocumentedEmptyBlock = Bit4; > public static final int OverridingMethodWithSupercall = Bit5; > >+ // for initializer and method declaration >+ public static final int ErrorInSignature = Bit6; >+ >+ // for abstract method declaration >+ public static final int NeedFreeReturn = Bit7; // abstract method declaration >+ >+ // for constructor declaration >+ public static final int IsDefaultConstructor = Bit8; >+ > // for compilation unit > public static final int HasAllMethodBodies = Bit5; > public static final int IsImplicitUnit = Bit1; >@@ -169,8 +179,15 @@ > // for references in Javadoc comments > public static final int InsideJavadoc = Bit16; > >+ // for javadoc allocation expression/javadoc message send/javadoc return statement >+ public static final int SuperAccess = Bit15; >+ >+ // for javadoc return statement >+ public static final int Empty = Bit19; >+ > // for if statement > public static final int IsElseIfStatement = Bit30; >+ public static final int ThenExit = Bit31; > > // for type reference > public static final int IsSuperType = Bit5; >@@ -183,6 +200,23 @@ > // for null reference analysis > public static final int IsNonNull = Bit18; > >+ // for for statement >+ public static final int NeededScope = Bit30; >+ >+ // for import reference >+ public static final int OnDemand = Bit18; >+ public static final int Used = Bit2; >+ >+ // for parameterized qualified/single type ref >+ public static final int DidResolve = Bit19; >+ >+ // for return statement >+ public static final int IsAnySubRoutineEscaping = Bit30; >+ public static final int IsSynchronized = Bit31; >+ >+ // for synchronized statement >+ public static final int BlockExit = Bit30; >+ > // constants used when checking invocation arguments > public static final int INVOCATION_ARGUMENT_OK = 0; > public static final int INVOCATION_ARGUMENT_UNCHECKED = 1; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java,v >retrieving revision 1.31 >diff -u -r1.31 ImportReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java 13 Oct 2006 19:20:46 -0000 1.31 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java 25 Apr 2007 15:33:35 -0000 >@@ -18,11 +18,9 @@ > > public char[][] tokens; > public long[] sourcePositions; //each entry is using the code : (start<<32) + end >- public boolean onDemand = true; //most of the time > public int declarationEnd; // doesn't include an potential trailing comment > public int declarationSourceStart; > public int declarationSourceEnd; >- public boolean used; > public int modifiers; // 1.5 addition for static imports > public Annotation[] annotations; > >@@ -34,7 +32,9 @@ > > this.tokens = tokens; > this.sourcePositions = sourcePositions; >- this.onDemand = onDemand; >+ if (onDemand) { >+ this.bits |= ASTNode.OnDemand; >+ } > this.sourceEnd = (int) (sourcePositions[sourcePositions.length-1] & 0x00000000FFFFFFFF); > this.sourceStart = (int) (sourcePositions[0] >>> 32); > this.modifiers = modifiers; >@@ -64,7 +64,7 @@ > if (i > 0) output.append('.'); > output.append(tokens[i]); > } >- if (withOnDemand && onDemand) { >+ if (withOnDemand && ((this.bits & ASTNode.OnDemand) != 0)) { > output.append(".*"); //$NON-NLS-1$ > } > return output; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java,v >retrieving revision 1.31 >diff -u -r1.31 JavadocMessageSend.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java 7 Dec 2006 14:50:04 -0000 1.31 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java 25 Apr 2007 15:33:35 -0000 >@@ -20,7 +20,6 @@ > > public int tagSourceStart, tagSourceEnd; > public int tagValue; >- public boolean superAccess = false; > > public JavadocMessageSend(char[] name, long pos) { > this.selector = name; >@@ -81,7 +80,9 @@ > } > this.actualReceiverType = scope.environment().convertToRawType(this.receiver.resolvedType); > SourceTypeBinding enclosingType = scope.enclosingSourceType(); >- this.superAccess = enclosingType==null ? false : enclosingType.isCompatibleWith(this.actualReceiverType); >+ if (enclosingType==null ? false : enclosingType.isCompatibleWith(this.actualReceiverType)) { >+ this.bits |= ASTNode.SuperAccess; >+ } > > // base type cannot receive any message > if (this.actualReceiverType.isBaseType()) { >@@ -173,7 +174,7 @@ > * @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#isSuperAccess() > */ > public boolean isSuperAccess() { >- return this.superAccess; >+ return (this.bits & ASTNode.SuperAccess) != 0; > } > > public StringBuffer printExpression(int indent, StringBuffer output){ >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java,v >retrieving revision 1.22 >diff -u -r1.22 JavadocFieldReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 13 Oct 2006 19:20:45 -0000 1.22 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 25 Apr 2007 15:33:35 -0000 >@@ -19,7 +19,6 @@ > public int tagSourceStart, tagSourceEnd; > public int tagValue; > public MethodBinding methodBinding; >- public boolean superAccess = false; > > public JavadocFieldReference(char[] source, long pos) { > super(source, pos); >@@ -103,7 +102,7 @@ > } > > public boolean isSuperAccess() { >- return this.superAccess; >+ return (this.bits & ASTNode.SuperAccess) != 0; > } > > public StringBuffer printExpression(int indent, StringBuffer output) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java,v >retrieving revision 1.31 >diff -u -r1.31 JavadocAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java 13 Oct 2006 19:20:45 -0000 1.31 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java 25 Apr 2007 15:33:35 -0000 >@@ -19,7 +19,6 @@ > > public int tagSourceStart, tagSourceEnd; > public int tagValue, memberStart; >- public boolean superAccess = false; > public char[][] qualification; > > public JavadocAllocationExpression(int start, int end) { >@@ -74,7 +73,9 @@ > } > this.resolvedType = scope.environment().convertToRawType(this.type.resolvedType); > SourceTypeBinding enclosingType = scope.enclosingSourceType(); >- this.superAccess = enclosingType==null ? false : enclosingType.isCompatibleWith(this.resolvedType); >+ if (enclosingType == null ? false : enclosingType.isCompatibleWith(this.resolvedType)) { >+ this.bits |= ASTNode.SuperAccess; >+ } > > ReferenceBinding allocationType = (ReferenceBinding) this.resolvedType; > this.binding = scope.getConstructor(allocationType, argumentTypes, this); >@@ -147,7 +148,7 @@ > } > > public boolean isSuperAccess() { >- return this.superAccess; >+ return (this.bits & ASTNode.SuperAccess) != 0; > } > > public TypeBinding resolveType(BlockScope scope) { >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java,v >retrieving revision 1.43 >diff -u -r1.43 ParameterizedQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 24 Apr 2007 14:45:10 -0000 1.43 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 25 Apr 2007 15:33:35 -0000 >@@ -22,7 +22,6 @@ > public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeReference { > > public TypeReference[][] typeArguments; >- public boolean didResolve = false; > > /** > * @param tokens >@@ -112,39 +111,39 @@ > > // handle the error here > this.constant = Constant.NotAConstant; >- if (this.didResolve) { // is a shared type reference which was already resolved >+ if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved > if (this.resolvedType != null && !this.resolvedType.isValidBinding()) > return null; // already reported error > return this.resolvedType; > } >- this.didResolve = true; >- boolean isClassScope = scope.kind == Scope.CLASS_SCOPE; >- Binding binding = scope.getPackage(this.tokens); >- if (binding != null && !binding.isValidBinding()) { >- this.resolvedType = (ReferenceBinding) binding; >+ this.bits |= ASTNode.DidResolve; >+ boolean isClassScope = scope.kind == Scope.CLASS_SCOPE; >+ Binding binding = scope.getPackage(this.tokens); >+ if (binding != null && !binding.isValidBinding()) { >+ this.resolvedType = (ReferenceBinding) binding; > reportInvalidType(scope); > // be resilient, still attempt resolving arguments > for (int i = 0, max = this.tokens.length; i < max; i++) { >- TypeReference[] args = this.typeArguments[i]; >- if (args != null) { >+ TypeReference[] args = this.typeArguments[i]; >+ if (args != null) { > int argLength = args.length; > for (int j = 0; j < argLength; j++) { >- TypeReference typeArgument = args[j]; >- if (isClassScope) { >- typeArgument.resolveType((ClassScope) scope); >- } else { >- typeArgument.resolveType((BlockScope) scope, checkBounds); >- } >+ TypeReference typeArgument = args[j]; >+ if (isClassScope) { >+ typeArgument.resolveType((ClassScope) scope); >+ } else { >+ typeArgument.resolveType((BlockScope) scope, checkBounds); >+ } > } >- } >+ } > } > return null; > } > >- PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding; >+ PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding; > boolean typeIsConsistent = true; > ReferenceBinding qualifiedType = null; >- for (int i = packageBinding == null ? 0 : packageBinding.compoundName.length, max = this.tokens.length; i < max; i++) { >+ for (int i = packageBinding == null ? 0 : packageBinding.compoundName.length, max = this.tokens.length; i < max; i++) { > findNextTypeBinding(i, scope, packageBinding); > if (!(this.resolvedType.isValidBinding())) { > reportInvalidType(scope); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java,v >retrieving revision 1.136 >diff -u -r1.136 TypeDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 18 Apr 2007 19:23:28 -0000 1.136 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 25 Apr 2007 15:33:35 -0000 >@@ -46,7 +46,6 @@ > public int declarationSourceEnd; > public int bodyStart; > public int bodyEnd; // doesn't include the trailing comment if any. >- protected boolean hasBeenGenerated = false; > public CompilationResult compilationResult; > public MethodDeclaration[] missingAbstractMethods; > public Javadoc javadoc; >@@ -308,7 +307,7 @@ > > //the constructor > ConstructorDeclaration constructor = new ConstructorDeclaration(this.compilationResult); >- constructor.isDefaultConstructor = true; >+ constructor.bits |= ASTNode.IsDefaultConstructor; > constructor.selector = this.name; > constructor.modifiers = this.modifiers & ExtraCompilerModifiers.AccVisibilityMASK; > >@@ -361,7 +360,7 @@ > newModifiers |= ClassFileConstants.AccVarargs; > } > constructor.modifiers = newModifiers; >- constructor.isDefaultConstructor = true; >+ constructor.bits |= ASTNode.IsDefaultConstructor; > > if (argumentsLength > 0) { > Argument[] arguments = (constructor.arguments = new Argument[argumentsLength]); >@@ -491,9 +490,9 @@ > * Generic bytecode generation for type > */ > public void generateCode(ClassFile enclosingClassFile) { >- if (this.hasBeenGenerated) >+ if ((this.bits & ASTNode.HasBeenGenerated) != 0) > return; >- this.hasBeenGenerated = true; >+ this.bits |= ASTNode.HasBeenGenerated; > if (this.ignoreFurtherInvestigation) { > if (this.binding == null) > return; >@@ -558,7 +557,7 @@ > if ((this.bits & ASTNode.IsReachable) == 0) { > return; > } >- if (this.hasBeenGenerated) return; >+ if ((this.bits & ASTNode.HasBeenGenerated) != 0) return; > int pc = codeStream.position; > if (this.binding != null) ((NestedTypeBinding) this.binding).computeSyntheticArgumentSlotSizes(); > generateCode(codeStream.classFile); >@@ -569,7 +568,7 @@ > * Bytecode generation for a member inner type > */ > public void generateCode(ClassScope classScope, ClassFile enclosingClassFile) { >- if (this.hasBeenGenerated) return; >+ if ((this.bits & ASTNode.HasBeenGenerated) != 0) return; > if (this.binding != null) ((NestedTypeBinding) this.binding).computeSyntheticArgumentSlotSizes(); > generateCode(enclosingClassFile); > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java,v >retrieving revision 1.40 >diff -u -r1.40 QualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java 6 Mar 2007 02:38:48 -0000 1.40 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java 25 Apr 2007 15:33:35 -0000 >@@ -37,10 +37,10 @@ > LookupEnvironment env = scope.environment(); > try { > env.missingClassFileLocation = this; >- if (this.resolvedType == null) { >+ if (this.resolvedType == null) { > this.resolvedType = scope.getType(this.tokens[tokenIndex], packageBinding); >- } else { >- this.resolvedType = scope.getMemberType(this.tokens[tokenIndex], (ReferenceBinding) this.resolvedType); >+ } else { >+ this.resolvedType = scope.getMemberType(this.tokens[tokenIndex], (ReferenceBinding) this.resolvedType); > if (this.resolvedType instanceof ProblemReferenceBinding) { > ProblemReferenceBinding problemBinding = (ProblemReferenceBinding) this.resolvedType; > this.resolvedType = new ProblemReferenceBinding( >@@ -49,7 +49,7 @@ > this.resolvedType.problemId()); > } > } >- return this.resolvedType; >+ return this.resolvedType; > } catch (AbortCompilation e) { > e.updateContext(this, scope.referenceCompilationUnit().compilationResult); > throw e; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java,v >retrieving revision 1.86 >diff -u -r1.86 ConstructorDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 6 Mar 2007 02:38:48 -0000 1.86 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 25 Apr 2007 15:33:35 -0000 >@@ -24,8 +24,7 @@ > public class ConstructorDeclaration extends AbstractMethodDeclaration { > > public ExplicitConstructorCall constructorCall; >- >- public boolean isDefaultConstructor = false; >+ > public TypeParameter[] typeParameters; > > public ConstructorDeclaration(CompilationResult compilationResult){ >@@ -54,7 +53,7 @@ > checkUnused: { > MethodBinding constructorBinding; > if ((constructorBinding = this.binding) == null) break checkUnused; >- if (this.isDefaultConstructor) break checkUnused; >+ if ((this.bits & ASTNode.IsDefaultConstructor) != 0) break checkUnused; > if (constructorBinding.isUsed()) break checkUnused; > if (constructorBinding.isPrivate()) { > if ((this.binding.declaringClass.tagBits & TagBits.HasNonPrivateConstructor) == 0) >@@ -136,7 +135,9 @@ > } > } > // check for missing returning path >- this.needFreeReturn = (flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0; >+ if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) { >+ this.bits |= ASTNode.NeedFreeReturn; >+ } > > // reuse the initial reach mode for diagnosing missing blank finals > flowInfo.setReachMode(initialReachMode); >@@ -153,7 +154,7 @@ > && (!flowInfo.isDefinitelyAssigned(fields[i]))) { > this.scope.problemReporter().uninitializedBlankFinalField( > field, >- this.isDefaultConstructor ? (ASTNode) this.scope.referenceType() : this); >+ ((this.bits & ASTNode.IsDefaultConstructor) != 0) ? (ASTNode) this.scope.referenceType() : this); > } > } > } >@@ -319,7 +320,7 @@ > this.statements[i].generateCode(this.scope, codeStream); > } > } >- if (this.needFreeReturn) { >+ if ((this.bits & ASTNode.NeedFreeReturn) != 0) { > codeStream.return_(); > } > // local variable attributes >@@ -341,7 +342,7 @@ > } > > public boolean isDefaultConstructor() { >- return this.isDefaultConstructor; >+ return (this.bits & ASTNode.IsDefaultConstructor) != 0; > } > > public boolean isInitializationMethod() { >@@ -381,7 +382,7 @@ > //fill up the constructor body with its statements > if (this.ignoreFurtherInvestigation) > return; >- if (this.isDefaultConstructor && this.constructorCall == null){ >+ if (((this.bits & ASTNode.IsDefaultConstructor) != 0) && this.constructorCall == null){ > this.constructorCall = SuperReference.implicitSuperConstructorCall(); > this.constructorCall.sourceStart = this.sourceStart; > this.constructorCall.sourceEnd = this.sourceEnd; >@@ -411,7 +412,7 @@ > public void resolveJavadoc() { > if (this.binding == null || this.javadoc != null) { > super.resolveJavadoc(); >- } else if (!this.isDefaultConstructor) { >+ } else if ((this.bits & ASTNode.IsDefaultConstructor) == 0) { > this.scope.problemReporter().javadocMissing(this.sourceStart, this.sourceEnd, this.binding.modifiers); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java,v >retrieving revision 1.38 >diff -u -r1.38 Initializer.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java 10 May 2006 18:03:43 -0000 1.38 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java 25 Apr 2007 15:33:35 -0000 >@@ -18,14 +18,12 @@ > import org.eclipse.jdt.internal.compiler.parser.*; > > public class Initializer extends FieldDeclaration { >- >+ > public Block block; > public int lastVisibleFieldID; > public int bodyStart; > public int bodyEnd; >- >- public boolean errorInSignature = false; >- >+ > public Initializer(Block block, int modifiers) { > this.block = block; > this.modifiers = modifiers; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java,v >retrieving revision 1.38 >diff -u -r1.38 ParameterizedSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 24 Apr 2007 14:45:10 -0000 1.38 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 25 Apr 2007 15:33:35 -0000 >@@ -22,7 +22,6 @@ > public class ParameterizedSingleTypeReference extends ArrayTypeReference { > > public TypeReference[] typeArguments; >- public boolean didResolve = false; > > public ParameterizedSingleTypeReference(char[] name, TypeReference[] typeArguments, int dim, long pos){ > super(name, dim, pos); >@@ -89,27 +88,27 @@ > > // handle the error here > this.constant = Constant.NotAConstant; >- if (this.didResolve) { // is a shared type reference which was already resolved >+ if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved > if (this.resolvedType != null && !this.resolvedType.isValidBinding()) > return null; // already reported error > return this.resolvedType; > } >- this.didResolve = true; >+ this.bits |= ASTNode.DidResolve; > if (enclosingType == null) { > this.resolvedType = scope.getType(token); > if (!(this.resolvedType.isValidBinding())) { > reportInvalidType(scope); > // be resilient, still attempt resolving arguments >- boolean isClassScope = scope.kind == Scope.CLASS_SCOPE; >+ boolean isClassScope = scope.kind == Scope.CLASS_SCOPE; > int argLength = this.typeArguments.length; > for (int i = 0; i < argLength; i++) { >- TypeReference typeArgument = this.typeArguments[i]; >- if (isClassScope) { >- typeArgument.resolveType((ClassScope) scope); >- } else { >- typeArgument.resolveType((BlockScope) scope, checkBounds); >- } >- } >+ TypeReference typeArgument = this.typeArguments[i]; >+ if (isClassScope) { >+ typeArgument.resolveType((ClassScope) scope); >+ } else { >+ typeArgument.resolveType((BlockScope) scope, checkBounds); >+ } >+ } > return null; > } > enclosingType = this.resolvedType.enclosingType(); // if member type >@@ -120,7 +119,7 @@ > : scope.environment().convertToParameterizedType(enclosingType); > } > } else { // resolving member type (relatively to enclosingType) >- this.resolvedType = scope.getMemberType(token, enclosingType); >+ this.resolvedType = scope.getMemberType(token, enclosingType); > if (!this.resolvedType.isValidBinding()) { > scope.problemReporter().invalidEnclosingType(this, this.resolvedType, enclosingType); > return null; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java,v >retrieving revision 1.13 >diff -u -r1.13 JavadocReturnStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java 1 Dec 2006 21:44:44 -0000 1.13 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java 25 Apr 2007 15:33:35 -0000 >@@ -15,11 +15,10 @@ > > > public class JavadocReturnStatement extends ReturnStatement { >- public boolean empty = true; > > public JavadocReturnStatement(int s, int e) { > super(null, s, e); >- this.bits |= InsideJavadoc; >+ this.bits |= (ASTNode.InsideJavadoc | ASTNode.Empty); > } > > /* (non-Javadoc) >@@ -36,7 +35,7 @@ > : TypeBinding.VOID; > if (methodType == null || methodType == TypeBinding.VOID) { > scope.problemReporter().javadocUnexpectedTag(this.sourceStart, this.sourceEnd); >- } else if (this.empty) { >+ } else if ((this.bits & ASTNode.Empty) != 0) { > scope.problemReporter().javadocEmptyReturnTag(this.sourceStart, this.sourceEnd, scope.getDeclarationModifiers()); > } > } >@@ -46,7 +45,7 @@ > */ > public StringBuffer printStatement(int tab, StringBuffer output) { > printIndent(tab, output).append("return"); //$NON-NLS-1$ >- if (!this.empty) >+ if ((this.bits & ASTNode.Empty) == 0) > output.append(' ').append(" <not empty>"); //$NON-NLS-1$ > return output; > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java,v >retrieving revision 1.91 >diff -u -r1.91 AbstractMethodDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 12 Apr 2007 22:34:46 -0000 1.91 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 25 Apr 2007 15:33:34 -0000 >@@ -40,7 +40,6 @@ > public int explicitDeclarations; > public MethodBinding binding; > public boolean ignoreFurtherInvestigation = false; >- public boolean needFreeReturn = false; > > public Javadoc javadoc; > >@@ -48,8 +47,6 @@ > public int bodyEnd = -1; > public CompilationResult compilationResult; > >- public boolean errorInSignature = false; >- > AbstractMethodDeclaration(CompilationResult compilationResult){ > this.compilationResult = compilationResult; > } >@@ -228,7 +225,7 @@ > for (int i = 0, max = this.statements.length; i < max; i++) > this.statements[i].generateCode(this.scope, codeStream); > } >- if (this.needFreeReturn) { >+ if ((this.bits & ASTNode.NeedFreeReturn) != 0) { > codeStream.return_(); > } > // local variable attributes >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java,v >retrieving revision 1.61 >diff -u -r1.61 ForStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java 2 Apr 2007 20:00:15 -0000 1.61 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java 25 Apr 2007 15:33:35 -0000 >@@ -25,8 +25,7 @@ > public Statement action; > > //when there is no local declaration, there is no need of a new scope >- //scope is positionned either to a new scope, or to the "upper"scope (see resolveType) >- public boolean neededScope; >+ //scope is positioned either to a new scope, or to the "upper"scope (see resolveType) > public BlockScope scope; > > private BranchLabel breakLabel, continueLabel; >@@ -53,8 +52,10 @@ > this.increments = increments; > this.action = action; > // remember useful empty statement >- if (action instanceof EmptyStatement) action.bits |= IsUsefulEmptyStatement; >- this.neededScope = neededScope; >+ if (action instanceof EmptyStatement) action.bits |= ASTNode.IsUsefulEmptyStatement; >+ if (neededScope) { >+ this.bits |= ASTNode.NeededScope; >+ } > } > > public FlowInfo analyseCode( >@@ -232,7 +233,7 @@ > if (isConditionOptimizedFalse) { > condition.generateCode(scope, codeStream, false); > // May loose some local variable initializations : affecting the local variable attributes >- if (neededScope) { >+ if ((this.bits & ASTNode.NeededScope) != 0) { > codeStream.exitUserScope(scope); > } > if (mergedInitStateIndex != -1) { >@@ -314,7 +315,7 @@ > > > // May loose some local variable initializations : affecting the local variable attributes >- if (neededScope) { >+ if ((this.bits & ASTNode.NeededScope) != 0) { > codeStream.exitUserScope(scope); > } > if (mergedInitStateIndex != -1) { >@@ -361,7 +362,7 @@ > public void resolve(BlockScope upperScope) { > > // use the scope that will hold the init declarations >- scope = neededScope ? new BlockScope(upperScope) : upperScope; >+ scope = (this.bits & ASTNode.NeededScope) != 0 ? new BlockScope(upperScope) : upperScope; > if (initializations != null) > for (int i = 0, length = initializations.length; i < length; i++) > initializations[i].resolve(scope); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java,v >retrieving revision 1.47 >diff -u -r1.47 SynchronizedStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java 6 Mar 2007 02:38:48 -0000 1.47 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java 25 Apr 2007 15:33:35 -0000 >@@ -22,7 +22,6 @@ > public Expression expression; > public Block block; > public BlockScope scope; >- boolean blockExit; > public LocalVariableBinding synchroVariable; > static final char[] SecretLocalDeclarationName = " syncValue".toCharArray(); //$NON-NLS-1$ > >@@ -65,7 +64,9 @@ > currentScope.methodScope().recordInitializationStates(flowInfo); > > // optimizing code gen >- this.blockExit = (flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0; >+ if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) { >+ this.bits |= ASTNode.BlockExit; >+ } > > return flowInfo; > } >@@ -119,7 +120,7 @@ > } > > BranchLabel endLabel = new BranchLabel(codeStream); >- if (!blockExit) { >+ if ((this.bits & ASTNode.BlockExit) == 0) { > codeStream.load(synchroVariable); > codeStream.monitorexit(); > this.exitAnyExceptionHandler(); >@@ -144,7 +145,7 @@ > if (scope != currentScope) { > codeStream.removeVariable(this.synchroVariable); > } >- if (!blockExit) { >+ if ((this.bits & ASTNode.BlockExit) == 0) { > endLabel.place(); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java,v >retrieving revision 1.68 >diff -u -r1.68 CompilationUnitDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java 18 Apr 2007 19:23:28 -0000 1.68 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java 25 Apr 2007 15:33:35 -0000 >@@ -163,7 +163,7 @@ > for (int i = 0, max = this.scope.imports.length; i < max; i++){ > ImportBinding importBinding = this.scope.imports[i]; > ImportReference importReference = importBinding.reference; >- if (importReference != null && !importReference.used){ >+ if (importReference != null && ((importReference.bits & ASTNode.Used) == 0)){ > scope.problemReporter().unusedImport(importReference); > } > } >Index: search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java,v >retrieving revision 1.74 >diff -u -r1.74 MethodLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 10 Apr 2007 19:03:10 -0000 1.74 >+++ search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 25 Apr 2007 15:33:42 -0000 >@@ -95,7 +95,7 @@ > // With static import, we can have static method reference in import reference > ImportReference importRef = (ImportReference) node; > int length = importRef.tokens.length-1; >- if (importRef.isStatic() && !importRef.onDemand && matchesName(this.pattern.selector, importRef.tokens[length])) { >+ if (importRef.isStatic() && ((importRef.bits & ASTNode.OnDemand) == 0) && matchesName(this.pattern.selector, importRef.tokens[length])) { > char[][] compoundName = new char[length][]; > System.arraycopy(importRef.tokens, 0, compoundName, 0, length); > char[] declaringType = CharOperation.concat(pattern.declaringQualification, pattern.declaringSimpleName, '.'); >Index: search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java,v >retrieving revision 1.54 >diff -u -r1.54 TypeReferenceLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java 10 Apr 2007 19:03:10 -0000 1.54 >+++ search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java 25 Apr 2007 15:33:42 -0000 >@@ -207,10 +207,10 @@ > typeBinding = (ReferenceBinding) binding; > } else if (binding instanceof FieldBinding) { // may happen for static import > typeBinding = ((FieldBinding)binding).declaringClass; >- lastButOne = importRef.isStatic() && !importRef.onDemand; >+ lastButOne = importRef.isStatic() && ((importRef.bits & ASTNode.OnDemand) == 0); > } else if (binding instanceof MethodBinding) { // may happen for static import > typeBinding = ((MethodBinding)binding).declaringClass; >- lastButOne = importRef.isStatic() && !importRef.onDemand; >+ lastButOne = importRef.isStatic() && ((importRef.bits & ASTNode.OnDemand) == 0); > } > if (typeBinding != null) { > int lastIndex = importRef.tokens.length - 1; >Index: search/org/eclipse/jdt/internal/core/search/matching/FieldLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/FieldLocator.java,v >retrieving revision 1.46 >diff -u -r1.46 FieldLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/FieldLocator.java 10 Apr 2007 19:03:10 -0000 1.46 >+++ search/org/eclipse/jdt/internal/core/search/matching/FieldLocator.java 25 Apr 2007 15:33:41 -0000 >@@ -37,7 +37,7 @@ > // With static import, we can have static field reference in import reference > ImportReference importRef = (ImportReference) node; > int length = importRef.tokens.length-1; >- if (importRef.isStatic() && !importRef.onDemand && matchesName(this.pattern.name, importRef.tokens[length])) { >+ if (importRef.isStatic() && ((importRef.bits & ASTNode.OnDemand) == 0) && matchesName(this.pattern.name, importRef.tokens[length])) { > char[][] compoundName = new char[length][]; > System.arraycopy(importRef.tokens, 0, compoundName, 0, length); > FieldPattern fieldPattern = (FieldPattern) this.pattern; >Index: search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java,v >retrieving revision 1.290 >diff -u -r1.290 MatchLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 24 Apr 2007 09:00:24 -0000 1.290 >+++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 25 Apr 2007 15:33:41 -0000 >@@ -673,7 +673,7 @@ > */ > protected IJavaElement createImportHandle(ImportReference importRef) { > char[] importName = CharOperation.concatWith(importRef.getImportName(), '.'); >- if (importRef.onDemand) >+ if ((importRef.bits & ASTNode.OnDemand) != 0) > importName = CharOperation.concat(importName, ".*" .toCharArray()); //$NON-NLS-1$ > Openable openable = this.currentPossibleMatch.openable; > if (openable instanceof CompilationUnit) >@@ -2131,7 +2131,7 @@ > if (this.hierarchyResolver != null) continue; > > ImportReference importRef = (ImportReference) node; >- Binding binding = importRef.onDemand >+ Binding binding = (importRef.bits & ASTNode.OnDemand) != 0 > ? unitScope.getImport(CharOperation.subarray(importRef.tokens, 0, importRef.tokens.length), true, importRef.isStatic()) > : unitScope.getImport(importRef.tokens, false, importRef.isStatic()); > this.patternLocator.matchLevelAndReportImportRef(importRef, binding, this); >Index: search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java,v >retrieving revision 1.36 >diff -u -r1.36 PackageReferenceLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java 20 Oct 2006 11:02:03 -0000 1.36 >+++ search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java 25 Apr 2007 15:33:42 -0000 >@@ -177,7 +177,7 @@ > if (reference instanceof ImportReference) { > ImportReference importRef = (ImportReference) reference; > positions = importRef.sourcePositions; >- last = importRef.onDemand ? positions.length : positions.length - 1; >+ last = (importRef.bits & ASTNode.OnDemand) != 0 ? positions.length : positions.length - 1; > } else { > TypeBinding typeBinding = null; > if (reference instanceof QualifiedNameReference) { >Index: compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java,v >retrieving revision 1.370 >diff -u -r1.370 Parser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 18 Apr 2007 19:23:28 -0000 1.370 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 25 Apr 2007 15:33:37 -0000 >@@ -9929,7 +9929,7 @@ > protected void reportSyntaxErrors(boolean isDietParse, int oldFirstToken) { > if(this.referenceContext instanceof MethodDeclaration) { > MethodDeclaration methodDeclaration = (MethodDeclaration) this.referenceContext; >- if(methodDeclaration.errorInSignature){ >+ if((methodDeclaration.bits & ASTNode.ErrorInSignature) != 0){ > return; > } > } >@@ -9963,7 +9963,7 @@ > if(methods != null) { > for (int j = 0; j < methods.length; j++) { > AbstractMethodDeclaration method = methods[j]; >- if(method.errorInSignature) { >+ if((method.bits & ASTNode.ErrorInSignature) != 0) { > if(method.isAnnotationMethod()) { > DiagnoseParser diagnoseParser = new DiagnoseParser(this, TokenNameQUESTION, method.declarationSourceStart, method.declarationSourceEnd, this.options); > diagnoseParser.diagnoseParse(this.options.performStatementsRecovery); >@@ -9982,7 +9982,7 @@ > for (int j = 0; j < length; j++) { > if (fields[j] instanceof Initializer) { > Initializer initializer = (Initializer)fields[j]; >- if(initializer.errorInSignature){ >+ if((initializer.bits & ASTNode.ErrorInSignature) != 0){ > DiagnoseParser diagnoseParser = new DiagnoseParser(this, TokenNameRIGHT_SHIFT, initializer.declarationSourceStart, initializer.declarationSourceEnd, this.options); > diagnoseParser.diagnoseParse(this.options.performStatementsRecovery); > } >Index: compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java,v >retrieving revision 1.61 >diff -u -r1.61 JavadocParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 7 Apr 2007 16:29:21 -0000 1.61 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 25 Apr 2007 15:33:36 -0000 >@@ -726,7 +726,7 @@ > * Refresh return statement > */ > protected void refreshReturnStatement() { >- ((JavadocReturnStatement) this.returnStatement).empty = false; >+ ((JavadocReturnStatement) this.returnStatement).bits &= ~ASTNode.Empty; > } > > public String toString() { >Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetTypeDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetTypeDeclaration.java,v >retrieving revision 1.15 >diff -u -r1.15 CodeSnippetTypeDeclaration.java >--- eval/org/eclipse/jdt/internal/eval/CodeSnippetTypeDeclaration.java 6 Mar 2007 02:38:49 -0000 1.15 >+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetTypeDeclaration.java 25 Apr 2007 15:33:39 -0000 >@@ -12,6 +12,7 @@ > > import org.eclipse.jdt.internal.compiler.ClassFile; > import org.eclipse.jdt.internal.compiler.CompilationResult; >+import org.eclipse.jdt.internal.compiler.ast.ASTNode; > import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; > import org.eclipse.jdt.internal.compiler.problem.AbortType; > >@@ -25,8 +26,8 @@ > * Generic bytecode generation for type > */ > public void generateCode(ClassFile enclosingClassFile) { >- if (this.hasBeenGenerated) return; >- this.hasBeenGenerated = true; >+ if ((this.bits & ASTNode.HasBeenGenerated) != 0) return; >+ this.bits |= ASTNode.HasBeenGenerated; > > if (this.ignoreFurtherInvestigation) { > if (this.binding == null) >Index: dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java,v >retrieving revision 1.155 >diff -u -r1.155 DefaultBindingResolver.java >--- dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java 24 Apr 2007 15:25:17 -0000 1.155 >+++ dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java 25 Apr 2007 15:33:39 -0000 >@@ -728,7 +728,7 @@ > if (node instanceof ImportReference) { > ImportReference importReference = (ImportReference) node; > final boolean isStatic = importReference.isStatic(); >- if (importReference.onDemand) { >+ if ((importReference.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.OnDemand) != 0) { > Binding binding = this.scope.getImport(CharOperation.subarray(importReference.tokens, 0, importReference.tokens.length), true, isStatic); > if (binding != null) { > if (isStatic) { >@@ -969,7 +969,7 @@ > if (this.scope == null) return null; > if (importReferenceLength == index) { > try { >- binding = this.scope.getImport(CharOperation.subarray(importReference.tokens, 0, index), importReference.onDemand, importReference.isStatic()); >+ binding = this.scope.getImport(CharOperation.subarray(importReference.tokens, 0, index), (importReference.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.OnDemand) != 0, importReference.isStatic()); > } catch (AbortCompilation e) { > // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357 > } >@@ -1177,7 +1177,7 @@ > if (this.scope == null) return null; > if (importReferenceLength == index) { > try { >- binding = this.scope.getImport(CharOperation.subarray(importReference.tokens, 0, index), importReference.onDemand, importReference.isStatic()); >+ binding = this.scope.getImport(CharOperation.subarray(importReference.tokens, 0, index), (importReference.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.OnDemand) != 0, importReference.isStatic()); > } catch (AbortCompilation e) { > // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357 > } >Index: dom/org/eclipse/jdt/core/dom/ASTConverter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java,v >retrieving revision 1.247 >diff -u -r1.247 ASTConverter.java >--- dom/org/eclipse/jdt/core/dom/ASTConverter.java 6 Mar 2007 02:38:49 -0000 1.247 >+++ dom/org/eclipse/jdt/core/dom/ASTConverter.java 25 Apr 2007 15:33:38 -0000 >@@ -2757,7 +2757,7 @@ > > public ImportDeclaration convertImport(org.eclipse.jdt.internal.compiler.ast.ImportReference importReference) { > final ImportDeclaration importDeclaration = new ImportDeclaration(this.ast); >- final boolean onDemand = importReference.onDemand; >+ final boolean onDemand = (importReference.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.OnDemand) != 0; > final char[][] tokens = importReference.tokens; > int length = importReference.tokens.length; > final long[] positions = importReference.sourcePositions; >Index: codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java,v >retrieving revision 1.2 >diff -u -r1.2 MissingTypesGuesser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java 19 Oct 2006 13:47:37 -0000 1.2 >+++ codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java 25 Apr 2007 15:33:34 -0000 >@@ -59,12 +59,12 @@ > > private void cleanUp(ParameterizedSingleTypeReference typeReference) { > this.cleanUp((TypeReference)typeReference); >- typeReference.didResolve = false; >+ typeReference.bits &= ~ASTNode.DidResolve; > } > > private void cleanUp(ParameterizedQualifiedTypeReference typeReference) { > this.cleanUp((TypeReference)typeReference); >- typeReference.didResolve = false; >+ typeReference.bits &= ~ASTNode.DidResolve; > } > > public void cleanUp(TypeReference convertedType, BlockScope scope) { >Index: codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java,v >retrieving revision 1.10 >diff -u -r1.10 UnresolvedReferenceNameFinder.java >--- codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java 12 Apr 2007 09:23:29 -0000 1.10 >+++ codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java 25 Apr 2007 15:33:34 -0000 >@@ -296,7 +296,7 @@ > } > > public boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope classScope) { >- if (!constructorDeclaration.isDefaultConstructor && !constructorDeclaration.isClinit()) { >+ if (((constructorDeclaration.bits & ASTNode.IsDefaultConstructor) == 0) && !constructorDeclaration.isClinit()) { > removeLocals( > constructorDeclaration.arguments, > constructorDeclaration.declarationSourceStart, >@@ -358,7 +358,7 @@ > } > > public void endVisit(ConstructorDeclaration constructorDeclaration, ClassScope classScope) { >- if (!constructorDeclaration.isDefaultConstructor && !constructorDeclaration.isClinit()) { >+ if (((constructorDeclaration.bits & ASTNode.IsDefaultConstructor) == 0) && !constructorDeclaration.isClinit()) { > endVisitPreserved(constructorDeclaration.bodyStart, constructorDeclaration.bodyEnd); > } > popParent(); >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.325 >diff -u -r1.325 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 12 Apr 2007 10:37:18 -0000 1.325 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 25 Apr 2007 15:33:34 -0000 >@@ -7537,7 +7537,7 @@ > > if (CharOperation.equals(f.tokens, compoundName)) continue next; > >- if (!onDemand && !f.onDemand) { >+ if (!onDemand && ((f.bits & ASTNode.OnDemand) == 0)) { > if (CharOperation.equals(f.tokens[f.tokens.length - 1], compoundName[compoundName.length - 1])) > continue next; > } >Index: codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java,v >retrieving revision 1.78 >diff -u -r1.78 AssistParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java 6 Mar 2007 02:38:51 -0000 1.78 >+++ codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java 25 Apr 2007 15:33:34 -0000 >@@ -679,7 +679,7 @@ > > /* build specific assist node on import statement */ > ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccStatic); >- reference.onDemand = true; >+ reference.bits |= ASTNode.OnDemand; > assistNode = reference; > this.lastCheckPoint = reference.sourceEnd + 1; > >@@ -785,7 +785,7 @@ > > /* build specific assist node on import statement */ > ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccDefault); >- reference.onDemand = true; >+ reference.bits |= ASTNode.OnDemand; > assistNode = reference; > this.lastCheckPoint = reference.sourceEnd + 1; > >Index: model/org/eclipse/jdt/internal/compiler/SourceElementParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java,v >retrieving revision 1.71 >diff -u -r1.71 SourceElementParser.java >--- model/org/eclipse/jdt/internal/compiler/SourceElementParser.java 23 Oct 2006 16:42:42 -0000 1.71 >+++ model/org/eclipse/jdt/internal/compiler/SourceElementParser.java 25 Apr 2007 15:33:41 -0000 >@@ -1323,7 +1323,7 @@ > importReference.declarationSourceStart, > importReference.declarationSourceEnd, > importReference.tokens, >- importReference.onDemand, >+ (importReference.bits & ASTNode.OnDemand) != 0, > importReference.modifiers); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java,v >retrieving revision 1.106 >diff -u -r1.106 CompilationUnitScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 18 Apr 2007 19:23:28 -0000 1.106 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 25 Apr 2007 15:33:35 -0000 >@@ -154,7 +154,7 @@ > int numberOfImports = numberOfStatements + 1; > for (int i = 0; i < numberOfStatements; i++) { > ImportReference importReference = referenceContext.imports[i]; >- if (importReference.onDemand && CharOperation.equals(JAVA_LANG, importReference.tokens) && !importReference.isStatic()) { >+ if (((importReference.bits & ASTNode.OnDemand) != 0) && CharOperation.equals(JAVA_LANG, importReference.tokens) && !importReference.isStatic()) { > numberOfImports--; > break; > } >@@ -170,12 +170,12 @@ > // skip duplicates or imports of the current package > for (int j = 0; j < index; j++) { > ImportBinding resolved = resolvedImports[j]; >- if (resolved.onDemand == importReference.onDemand && resolved.isStatic() == importReference.isStatic()) >+ if (resolved.onDemand == ((importReference.bits & ASTNode.OnDemand) != 0) && resolved.isStatic() == importReference.isStatic()) > if (CharOperation.equals(compoundName, resolvedImports[j].compoundName)) > continue nextImport; > } > >- if (importReference.onDemand) { >+ if ((importReference.bits & ASTNode.OnDemand) != 0) { > if (CharOperation.equals(compoundName, currentPackageName)) > continue nextImport; > >@@ -299,7 +299,7 @@ > int numberOfStatements = referenceContext.imports.length; > HashtableOfType typesBySimpleNames = null; > for (int i = 0; i < numberOfStatements; i++) { >- if (!referenceContext.imports[i].onDemand) { >+ if ((referenceContext.imports[i].bits & ASTNode.OnDemand) == 0) { > typesBySimpleNames = new HashtableOfType(topLevelTypes.length + numberOfStatements); > for (int j = 0, length = topLevelTypes.length; j < length; j++) > typesBySimpleNames.put(topLevelTypes[j].sourceName, topLevelTypes[j]); >@@ -311,7 +311,7 @@ > int numberOfImports = numberOfStatements + 1; > for (int i = 0; i < numberOfStatements; i++) { > ImportReference importReference = referenceContext.imports[i]; >- if (importReference.onDemand && CharOperation.equals(JAVA_LANG, importReference.tokens) && !importReference.isStatic()) { >+ if (((importReference.bits & ASTNode.OnDemand) != 0) && CharOperation.equals(JAVA_LANG, importReference.tokens) && !importReference.isStatic()) { > numberOfImports--; > break; > } >@@ -330,14 +330,14 @@ > // skip duplicates or imports of the current package > for (int j = 0; j < index; j++) { > ImportBinding resolved = resolvedImports[j]; >- if (resolved.onDemand == importReference.onDemand && resolved.isStatic() == importReference.isStatic()) { >+ if (resolved.onDemand == ((importReference.bits & ASTNode.OnDemand) != 0) && resolved.isStatic() == importReference.isStatic()) { > if (CharOperation.equals(compoundName, resolved.compoundName)) { > problemReporter().unusedImport(importReference); // since skipped, must be reported now > continue nextImport; > } > } > } >- if (importReference.onDemand) { >+ if ((importReference.bits & ASTNode.OnDemand) != 0) { > if (CharOperation.equals(compoundName, currentPackageName)) { > problemReporter().unusedImport(importReference); // since skipped, must be reported now > continue nextImport; >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java,v >retrieving revision 1.62 >diff -u -r1.62 MethodScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java 2 Mar 2006 19:51:01 -0000 1.62 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java 25 Apr 2007 15:33:35 -0000 >@@ -67,7 +67,7 @@ > if ((modifiers & ExtraCompilerModifiers.AccAlternateModifierProblem) != 0) > problemReporter().duplicateModifierForMethod(declaringClass, (AbstractMethodDeclaration) referenceContext); > >- if (((ConstructorDeclaration) referenceContext).isDefaultConstructor) { >+ if ((((ConstructorDeclaration) referenceContext).bits & ASTNode.IsDefaultConstructor) != 0) { > // certain flags are propagated from declaring class onto constructor > final int DECLARING_FLAGS = ClassFileConstants.AccEnum|ClassFileConstants.AccPublic|ClassFileConstants.AccProtected; > final int VISIBILITY_FLAGS = ClassFileConstants.AccPrivate|ClassFileConstants.AccPublic|ClassFileConstants.AccProtected; >@@ -88,7 +88,7 @@ > > // check for abnormal modifiers > final int UNEXPECTED_MODIFIERS = ~(ClassFileConstants.AccPublic | ClassFileConstants.AccPrivate | ClassFileConstants.AccProtected | ClassFileConstants.AccStrictfp); >- if (declaringClass.isEnum() && !((ConstructorDeclaration) referenceContext).isDefaultConstructor) { >+ if (declaringClass.isEnum() && (((ConstructorDeclaration) referenceContext).bits & ASTNode.IsDefaultConstructor) == 0) { > final int UNEXPECTED_ENUM_CONSTR_MODIFIERS = ~(ClassFileConstants.AccPrivate | ClassFileConstants.AccStrictfp); > if ((realModifiers & UNEXPECTED_ENUM_CONSTR_MODIFIERS) != 0) { > problemReporter().illegalModifierForEnumConstructor((AbstractMethodDeclaration) referenceContext); >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.304 >diff -u -r1.304 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 10 Apr 2007 19:03:10 -0000 1.304 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 25 Apr 2007 15:33:36 -0000 >@@ -1540,7 +1540,9 @@ > if (unitScope.resolveSingleImport(importBinding) != null && importBinding.resolvedImport instanceof FieldBinding) { > foundField = (FieldBinding) importBinding.resolvedImport; > ImportReference importReference = importBinding.reference; >- if (importReference != null && needResolve) importReference.used = true; >+ if (importReference != null && needResolve) { >+ importReference.bits |= ASTNode.Used; >+ } > invocationSite.setActualReceiverType(foundField.declaringClass); > if (foundField.isValidBinding()) { > return foundField; >@@ -1566,7 +1568,9 @@ > } else if (temp.isStatic()) { > if (foundField == temp) continue; > ImportReference importReference = importBinding.reference; >- if (importReference != null && needResolve) importReference.used = true; >+ if (importReference != null && needResolve) { >+ importReference.bits |= ASTNode.Used; >+ } > if (foundInImport) > // Answer error binding -- import on demand conflict; name found in two import on demand packages. > return new ProblemReferenceBinding(name, null, ProblemReasons.Ambiguous); >@@ -1916,7 +1920,9 @@ > if (compatibleMethod.canBeSeenBy(unitScope.fPackage)) { > if (visible == null || !visible.contains(compatibleMethod)) { > ImportReference importReference = importBinding.reference; >- if (importReference != null) importReference.used = true; >+ if (importReference != null) { >+ importReference.bits |= ASTNode.Used; >+ } > if (!skipOnDemand && !importBinding.onDemand) { > visible = null; // forget previous matches from on demand imports > skipOnDemand = true; >@@ -2333,7 +2339,9 @@ > if (binding != null) { // can also include NotFound ProblemReferenceBindings if we already know this name is not found > if (binding instanceof ImportBinding) { // single type import cached in faultInImports(), replace it in the cache with the type > ImportReference importReference = ((ImportBinding) binding).reference; >- if (importReference != null) importReference.used = true; >+ if (importReference != null) { >+ importReference.bits |= ASTNode.Used; >+ } > if (binding instanceof ImportConflictBinding) > typeOrPackageCache.put(name, binding = ((ImportConflictBinding) binding).conflictingTypeBinding); // already know its visible > else >@@ -2367,7 +2375,7 @@ > if (resolvedImport instanceof TypeBinding) { > ImportReference importReference = importBinding.reference; > if (importReference != null) >- importReference.used = true; >+ importReference.bits |= ASTNode.Used; > return resolvedImport; // already know its visible > } > } >@@ -2406,7 +2414,9 @@ > if (temp != type && temp != null) { > if (temp.isValidBinding()) { > ImportReference importReference = someImport.reference; >- if (importReference != null) importReference.used = true; >+ if (importReference != null) { >+ importReference.bits |= ASTNode.Used; >+ } > if (foundInImport) { > // Answer error binding -- import on demand conflict; name found in two import on demand packages. > temp = new ProblemReferenceBinding(name, type, ProblemReasons.Ambiguous); >Index: formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java,v >retrieving revision 1.197 >diff -u -r1.197 CodeFormatterVisitor.java >--- formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 23 Apr 2007 23:55:16 -0000 1.197 >+++ formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 25 Apr 2007 15:33:41 -0000 >@@ -624,7 +624,7 @@ > this.scribe.printNextToken(TerminalTokens.TokenNamestatic); > this.scribe.space(); > } >- if (importRef.onDemand) { >+ if ((importRef.bits & ASTNode.OnDemand) != 0) { > this.scribe.printQualifiedReference(importRef.sourceEnd); > this.scribe.printNextToken(TerminalTokens.TokenNameDOT); > this.scribe.printNextToken(TerminalTokens.TokenNameMULTIPLY); >Index: model/org/eclipse/jdt/internal/core/BinaryTypeConverter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryTypeConverter.java,v >retrieving revision 1.11 >diff -u -r1.11 BinaryTypeConverter.java >--- model/org/eclipse/jdt/internal/core/BinaryTypeConverter.java 10 May 2006 18:03:47 -0000 1.11 >+++ model/org/eclipse/jdt/internal/core/BinaryTypeConverter.java 25 Apr 2007 15:33:41 -0000 >@@ -89,7 +89,7 @@ > > if (method.isConstructor()) { > ConstructorDeclaration decl = new ConstructorDeclaration(compilationResult); >- decl.isDefaultConstructor = false; >+ decl.bits &= ~ASTNode.IsDefaultConstructor; > methodDeclaration = decl; > } else { > MethodDeclaration decl = type.isAnnotation() ? new AnnotationMethodDeclaration(compilationResult) : new MethodDeclaration(compilationResult); >Index: model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java,v >retrieving revision 1.54 >diff -u -r1.54 SourceTypeConverter.java >--- model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 7 Apr 2007 16:29:22 -0000 1.54 >+++ model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 25 Apr 2007 15:33:41 -0000 >@@ -323,7 +323,7 @@ > int modifiers = methodInfo.getModifiers(); > if (methodInfo.isConstructor()) { > ConstructorDeclaration decl = new ConstructorDeclaration(compilationResult); >- decl.isDefaultConstructor = false; >+ decl.bits &= ~ASTNode.IsDefaultConstructor; > method = decl; > decl.typeParameters = typeParams; > } else { >Index: codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java,v >retrieving revision 1.82 >diff -u -r1.82 SelectionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java 12 Apr 2007 09:23:29 -0000 1.82 >+++ codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java 25 Apr 2007 15:33:34 -0000 >@@ -868,7 +868,7 @@ > > /* build specific assist node on import statement */ > ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccStatic); >- reference.onDemand = true; >+ reference.bits |= ASTNode.OnDemand; > assistNode = reference; > this.lastCheckPoint = reference.sourceEnd + 1; > >@@ -937,7 +937,7 @@ > > /* build specific assist node on import statement */ > ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccDefault); >- reference.onDemand = true; >+ reference.bits |= ASTNode.OnDemand; > assistNode = reference; > this.lastCheckPoint = reference.sourceEnd + 1; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 146556
:
63595
| 64883