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 19646 Details for
Bug 89281
[performance] Editors keeping huge amount of resolved DOM ASTs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply on HEAD
patch_scopes.txt (text/plain), 5.12 KB, created by
Olivier Thomann
on 2005-04-07 09:29:26 EDT
(
hide
)
Description:
Apply on HEAD
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-04-07 09:29:26 EDT
Size:
5.12 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/Compiler.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java,v >retrieving revision 1.63 >diff -u -r1.63 Compiler.java >--- compiler/org/eclipse/jdt/internal/compiler/Compiler.java 23 Feb 2005 02:47:30 -0000 1.63 >+++ compiler/org/eclipse/jdt/internal/compiler/Compiler.java 6 Apr 2005 15:15:01 -0000 >@@ -221,7 +221,7 @@ > } > // initial type binding creation > lookupEnvironment.buildTypeBindings(parsedUnit, accessRestriction); >- this.addCompilationUnit(sourceUnit, parsedUnit); >+ this.addCompilationUnit(parsedUnit); > > // binding resolution > lookupEnvironment.completeTypeBindings(parsedUnit); >@@ -248,10 +248,12 @@ > } > > protected void addCompilationUnit( >- ICompilationUnit sourceUnit, > CompilationUnitDeclaration parsedUnit) { > > // append the unit to the list of ones to process later on >+ if (this.unitsToProcess == null) { >+ this.unitsToProcess = new CompilationUnitDeclaration[1]; >+ } > int size = unitsToProcess.length; > if (totalUnits == size) > // when growing reposition units starting at position 0 >@@ -296,7 +298,7 @@ > } > // initial type binding creation > lookupEnvironment.buildTypeBindings(parsedUnit, null /*no access restriction*/); >- this.addCompilationUnit(sourceUnits[i], parsedUnit); >+ this.addCompilationUnit(parsedUnit); > //} catch (AbortCompilationUnit e) { > // requestor.acceptResult(unitResult.tagAsAccepted()); > } finally { >Index: dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java,v >retrieving revision 1.96 >diff -u -r1.96 CompilationUnitResolver.java >--- dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java 1 Apr 2005 14:33:49 -0000 1.96 >+++ dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java 6 Apr 2005 15:15:01 -0000 >@@ -179,7 +179,7 @@ > } > // initial type binding creation > this.lookupEnvironment.buildTypeBindings(parsedUnit, null /*no access restriction*/); >- addCompilationUnit(sourceUnit, parsedUnit); >+ addCompilationUnit(parsedUnit); > this.requestedSources.put(unitResult.getFileName(), sourceUnit); > } finally { > sourceUnits[i] = null; // no longer hold onto the unit >@@ -507,14 +507,16 @@ > problemFactory.monitor = null; // don't hold a reference to this external object > } > // first unit cleanup is done by caller, but cleanup all enqueued requested units (not processed) >-// if (resolver != null) { >-// for (int i = 1; i < resolver.totalUnits; i++) { // could be more requested units >-// CompilationUnitDeclaration parsedUnit = resolver.unitsToProcess[i]; >-// if (parsedUnit.scope != null) >-// parsedUnit.scope.faultInTypes(); // force resolution of signatures, so clients can query DOM AST >-// parsedUnit.cleanUp(); >-// } >-// } >+ if (resolver != null) { >+ for (int i = 1, max = resolver.totalUnits; i < max; i++) { // could be more requested units >+ CompilationUnitDeclaration parsedUnit = resolver.unitsToProcess[i]; >+ if (parsedUnit.scope != null) { >+ parsedUnit.scope.faultInTypes(); // force resolution of signatures, so clients can query DOM AST >+ } >+ parsedUnit.cleanUp(); >+ resolver.unitsToProcess[i] = null; >+ } >+ } > } > } > public static IBinding[] resolve( >Index: model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java,v >retrieving revision 1.44 >diff -u -r1.44 CompilationUnitProblemFinder.java >--- model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java 23 Feb 2005 02:47:29 -0000 1.44 >+++ model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java 6 Apr 2005 15:15:02 -0000 >@@ -107,6 +107,7 @@ > > if (unit != null) { > this.lookupEnvironment.buildTypeBindings(unit, accessRestriction); >+ this.addCompilationUnit(unit); > this.lookupEnvironment.completeTypeBindings(unit); > } > } >@@ -195,8 +196,19 @@ > if (problemFactory != null) > problemFactory.monitor = null; // don't hold a reference to this external object > // NB: unit.cleanUp() is done by caller >- if (problemFinder != null && resetEnvironment) >- problemFinder.lookupEnvironment.reset(); >+ if (problemFinder != null) { >+ if (resetEnvironment) { >+ problemFinder.lookupEnvironment.reset(); >+ } >+ for (int i = 1, max = problemFinder.totalUnits; i < max; i++) { // could be more requested units >+ CompilationUnitDeclaration parsedUnit = problemFinder.unitsToProcess[i]; >+ if (parsedUnit.scope != null) { >+ parsedUnit.scope.faultInTypes(); // force resolution of signatures, so clients can query DOM AST >+ } >+ parsedUnit.cleanUp(); >+ problemFinder.unitsToProcess[i] = null; >+ } >+ } > } > } >
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 89281
: 19646