structures into a heirarchy, and for the char[] maps/sets, if the capacity is
<= 2, then don't use the hash and just do a linear search.
also clean up a couple of uses of ObjectSet that had size 0 in the symbol table,
use EMPTY_SET insteard.
The major performance defects this addresses are 59468, 54040, and 61675.
The following other correctness and related defects are also addressed or fixed.
68940, 69872, 71094, 68528, 71669, 61800, 68931, 68623, 69428, 69296, 69798,
69744, 69745, 68739, 69662, 69833
Cherrypick from master 2004-08-06 01:57:11 UTC John Camelon <jcamelon@ca.ibm.com> 'Restructured the Parser tests so that the GCC Extension specific ones are separate.':
core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/GCCCompleteExtensionsParseTest.java
core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/GCCParserExtensionTestSuite.java
core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/GCCQuickParseExtensionsTest.java
core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner2/GCCScannerExtensionsTest.java
core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner2/ObjectMapTest.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/BasicTypeInfo.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ITypeInfo.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/CharArraySet.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/HashTable.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/ObjectMap.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/ObjectSet.java
core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/parser/ParserTimeOut.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinerProvider.java
This was heavy and lots of files were change. The problem: to create the CElementInfo we use
to synchronize of the CModelManager singleton instance, this was handy and allowed us to serialize
the creation of the proxy info and save in the LRU cache. Then came Eclipse-3.0 with job spawning
everywhere, lots of deadlock since the CModelManager was lock and the singleton is the center
to get all the info. We use the same scheme as the JDT by using a ThreadLocal class cache
to collect the information. We fixed a couple of bug allong the way and probably introduce some.
The tests were doing something stupid, by creating directly the TranslationUnit:
new TranslationUnit(project, file);
This does not work since only the sourceRoot can be the parent
of a TranslationUnit, the tests are now fix bug we should restrict access of the class in the core model
after 2.0.