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 27644 Details for
Bug 110987
[compiler] the operator is not used to InstanceOfExpression
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_110987.txt (text/plain), 6.68 KB, created by
Olivier Thomann
on 2005-09-28 15:35:49 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-09-28 15:35:49 EDT
Size:
6.68 KB
patch
obsolete
>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.74 >diff -u -r1.74 SelectionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java 28 Jul 2005 16:33:24 -0000 1.74 >+++ codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java 28 Sep 2005 19:35:13 -0000 >@@ -532,9 +532,9 @@ > listLength++; > } > } >-protected void consumeInstanceOfExpression(int op) { >+protected void consumeInstanceOfExpression() { > if (indexOfAssistIdentifier() < 0) { >- super.consumeInstanceOfExpression(op); >+ super.consumeInstanceOfExpression(); > } else { > getTypeReference(intStack[intPtr--]); > this.isOrphanCompletionNode = true; >@@ -542,9 +542,9 @@ > this.lastIgnoredToken = -1; > } > } >-protected void consumeInstanceOfExpressionWithName(int op) { >+protected void consumeInstanceOfExpressionWithName() { > if (indexOfAssistIdentifier() < 0) { >- super.consumeInstanceOfExpressionWithName(op); >+ super.consumeInstanceOfExpressionWithName(); > } else { > getTypeReference(intStack[intPtr--]); > this.isOrphanCompletionNode = true; >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.143 >diff -u -r1.143 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 27 Sep 2005 11:08:22 -0000 1.143 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 28 Sep 2005 19:35:13 -0000 >@@ -665,9 +665,6 @@ > case NOT_EQUAL : > operatorExpression = new EqualExpression(left, expression, info); > break; >- case INSTANCEOF : >- // should never occur >- break; > default : > operatorExpression = new BinaryExpression(left, expression, info); > break; >@@ -1946,8 +1943,8 @@ > > pushOnElementStack(K_CAST_STATEMENT); > } >-protected void consumeInstanceOfExpression(int op) { >- super.consumeInstanceOfExpression(op); >+protected void consumeInstanceOfExpression() { >+ super.consumeInstanceOfExpression(); > popElement(K_BINARY_OPERATOR); > > InstanceOfExpression exp = (InstanceOfExpression) expressionStack[expressionPtr]; >@@ -1955,8 +1952,8 @@ > assistNodeParent = exp; > } > } >-protected void consumeInstanceOfExpressionWithName(int op) { >- super.consumeInstanceOfExpressionWithName(op); >+protected void consumeInstanceOfExpressionWithName() { >+ super.consumeInstanceOfExpressionWithName(); > popElement(K_BINARY_OPERATOR); > > InstanceOfExpression exp = (InstanceOfExpression) expressionStack[expressionPtr]; >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.317 >diff -u -r1.317 Parser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 28 Sep 2005 13:45:34 -0000 1.317 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 28 Sep 2005 19:35:16 -0000 >@@ -3316,7 +3316,7 @@ > protected void consumeInsideCastExpressionWithQualifiedGenerics() { > // InsideCastExpressionWithQualifiedGenerics ::= $empty > } >-protected void consumeInstanceOfExpression(int op) { >+protected void consumeInstanceOfExpression() { > // RelationalExpression ::= RelationalExpression 'instanceof' ReferenceType > //optimize the push/pop > >@@ -3325,18 +3325,14 @@ > this.expressionStack[this.expressionPtr] = exp = > new InstanceOfExpression( > this.expressionStack[this.expressionPtr], >- getTypeReference(this.intStack[this.intPtr--]), >- op); >+ getTypeReference(this.intStack[this.intPtr--])); > if (exp.sourceEnd == 0) { > //array on base type.... > exp.sourceEnd = this.scanner.startPosition - 1; > } > //the scanner is on the next token already.... > } >-/** >- * @param op >- */ >-protected void consumeInstanceOfExpressionWithName(int op) { >+protected void consumeInstanceOfExpressionWithName() { > // RelationalExpression_NotName ::= Name instanceof ReferenceType > //optimize the push/pop > >@@ -3347,8 +3343,7 @@ > this.expressionStack[this.expressionPtr] = exp = > new InstanceOfExpression( > this.expressionStack[this.expressionPtr], >- reference, >- op); >+ reference); > if (exp.sourceEnd == 0) { > //array on base type.... > exp.sourceEnd = this.scanner.startPosition - 1; >@@ -5458,7 +5453,7 @@ > break; > > case 424 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$ >- consumeInstanceOfExpression(OperatorIds.INSTANCEOF); >+ consumeInstanceOfExpression(); > break; > > case 426 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$ >@@ -5982,11 +5977,11 @@ > break; > > case 617 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$ >- consumeInstanceOfExpressionWithName(OperatorIds.INSTANCEOF); >+ consumeInstanceOfExpressionWithName(); > break; > > case 618 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ >- consumeInstanceOfExpression(OperatorIds.INSTANCEOF); >+ consumeInstanceOfExpression(); > break; > > case 620 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ >Index: compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java,v >retrieving revision 1.41 >diff -u -r1.41 InstanceOfExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 5 Sep 2005 16:37:40 -0000 1.41 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 28 Sep 2005 19:35:13 -0000 >@@ -22,12 +22,10 @@ > > public InstanceOfExpression( > Expression expression, >- TypeReference type, >- int operator) { >+ TypeReference type) { > > this.expression = expression; > this.type = type; >- this.bits |= operator << OperatorSHIFT; > this.sourceStart = expression.sourceStart; > this.sourceEnd = type.sourceEnd; > }
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 110987
: 27644 |
27687