1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00
Commit graph

13984 commits

Author SHA1 Message Date
Sergey Prigogin
581182ce98 Minor performance optimization.
Change-Id: I19b1b8f55c8b62fa95eede5318d4b73291dfbd70
2017-03-13 19:13:20 -07:00
Sergey Prigogin
87ce31e19e Code streamlining.
Change-Id: I813c84d316a15727e45293849c21577565fa4afa
2017-03-13 19:40:07 -04:00
Sergey Prigogin
f60d78b32d Cosmetics.
Change-Id: I3484969221546dc8d71995c71651bcad95df128a
2017-03-10 14:23:21 -08:00
Sergey Prigogin
1735a17c5e Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Minor code cleanup.

Change-Id: I92ea01711034df5fa88cd41a81a54450fdb0ba6c
2017-03-10 11:52:02 -08:00
Sergey Prigogin
5b22093f47 Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Added precalculation of initial values of non-field variables.

Change-Id: Ie6c0690d90d5725e812d10afa15c4a11ba92f647
2017-03-09 20:48:50 -08:00
Sergey Prigogin
7501266165 Added protection against NPE and invalid values.
Change-Id: I8b2b96acc9f7852a4857eabb81e4ff35f9e3a0a9
2017-03-09 18:34:27 -08:00
Sergey Prigogin
8bdda7bd02 Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Added caching of initial values in CPPVariable and CPPVariableTemplate.

Change-Id: Id56dc273d1b27a972a30021bb8f26ce57443d208
2017-03-09 18:14:00 -08:00
Sergey Prigogin
f144cd407f Added a missing point argument.
Change-Id: Ie07e20efd16f29de67f7510782d3269417b8df93
2017-03-08 16:05:59 -08:00
Sergey Prigogin
a23515435e Minor performance optimization.
Change-Id: I8a07484cd5159081df2fa743612d4a2b08bdacad
2017-03-07 16:42:33 -08:00
Sergey Prigogin
35e7ae3e05 Bug 513280 - Major performance inefficiency in CPPVariable.getType
In my test project this change reduced total indexing time by half.

Change-Id: I6c7d3adfa1e4d2d05f7f5108f25110f6a9ec9a1a
2017-03-07 19:18:00 -05:00
Sergey Prigogin
1e60830c7d Allow LookupData.setFunctionArguments to be called more than once
Change-Id: Id716b83a3c7eed980c9b8fff68907ce729a86402
2017-03-06 17:41:21 -08:00
Sergey Prigogin
8765065b70 Bug 513105 - NPE in BuiltinOperators.<init> due to
CPPTemplateNonTypeArgument.getNonTypeValue() passing null to
ICPPEvaluation.getValue()

Stopgap measure to protect against NPE.

Change-Id: I1f34a219f982eec3703dc82ef54996a4c454568f
2017-03-03 16:12:40 -08:00
Sergey Prigogin
8e6d9134fe Bug 513106 - EvalUtil.getVariableValue method does not propagate point
of instantiation

Change-Id: I2d60e3e8fb635345115705f3f87631bf7a2f940a
2017-03-03 15:54:50 -08:00
Ghaith Hachem
1d4cf78a0f Bug 447643 Modified the CommandLauncher to consider Win32 Env variables
Added a check on the parseEnvironment() method to store keys in upper
case if the platform is windows
Added a method to fetch a property directly from the fEnvironment or
using the EnvironmentReader class instead of fetching the map and
redirecting the call to that map. This would ensure normalization as the
getEnvVar(key) is implemented to use the normalized map.

Bug: 447643
Change-Id: Ic664d81781f80663ce18854209077a2f38ec7c3a
Signed-off-by: Ghaith Hachem <ghaith.hachem@bachmann.info>
2017-03-03 07:21:29 -04:00
Sergey Prigogin
f311c6f050 More robust infinite recursion protection in CompositeValue.create
Change-Id: Ic0303db73c19651d341f84748b87efc9868defc4
2017-03-01 17:41:12 -08:00
Sergey Prigogin
b868b50c37 Added tracing to CompositeValue.create.
Change-Id: I46b076c2d2fd1b4b0cb490fd3de2ff55e5ec66d7
2017-02-27 20:29:30 -08:00
Sergey Prigogin
68a8cf3205 Minor adjustment to tracing.
Change-Id: I16910a0d8e3fb78ae9fc74fa3b0a87b0c72fc37a
2017-02-27 20:29:29 -08:00
Sergey Prigogin
a98b07b8d3 Moved implementations of deprecated methods from to the IValue interface
Change-Id: I2002d5d3c60d66f15c47a8014f39333291a49a2f
2017-02-27 20:22:51 -04:00
Sergey Prigogin
b97bdab9f9 Fixed a typo.
Change-Id: I64f30d3e8f2565c3fa918b9c4a4508ea043b83d8
2017-02-27 20:22:22 -04:00
Sergey Prigogin
3f8d51e65b Added point parameter to the CompositeValue.create(ICPPClassType) method
Change-Id: Ia3bb0dc48c90496242a696ec7126be2fd71e47fd
2017-02-27 19:21:50 -05:00
Nathan Ridge
2cd2500957 Bug 512262 - Remove the unnecessary ICPPEvaluationOwner interface
This also fixes some ClassCastExceptions caused by types which
implemented ICPPASTInitializerClause but not ICPPEvaluationOwner.

Change-Id: Ie624865ebe476fe760dc28e02b6aef8a43b4c621
2017-02-17 01:14:35 -05:00
Sergey Prigogin
40416c3da4 Cosmetics
Change-Id: I30f57d777d2761343449940087f825a37208c930
2017-02-15 20:02:43 -08:00
Sergey Prigogin
151a4c05e5 Bug 512260 - Organize Includes should prefer .h and .hpp files to files
with other extensions

Change-Id: I115a3441d98d220f0d2b985b7d595971a146e8b6
2017-02-15 20:02:20 -08:00
Sergey Prigogin
bb9fe47b10 Added @noreference to the CCorePlugin.getDOM method and the CDOM class
Change-Id: I73119bb3463dc932d0951522645f351dec62fd86
2017-02-15 16:21:04 -08:00
Sergey Prigogin
8a079c6639 Cosmetics
Change-Id: I2335d8d96c7e9bec13b98c5ac553fa10dce6d9f4
2017-02-14 20:38:13 -08:00
Sergey Prigogin
2dee53e9c5 Cosmetics
Change-Id: Ifbd153a926898ad3820b6e03cca14555495712fa
2017-02-14 17:02:55 -08:00
Sergey Prigogin
5fe63e30ba Cosmetics
Change-Id: Ie4060b90f9ad492d0aece30d2bc13702fa2a9244
2017-02-14 15:56:02 -08:00
Sergey Prigogin
56e6da621e Bug 512201 - NPE in Organize Includes
Change-Id: I09d7b250697ae3ff00a5f615000512524c74ff01
2017-02-14 15:55:48 -08:00
Marc-Andre Laperle
0046099052 releng: Make use of Tycho POM-less functionality
This removes a lot of pom.xml from the source tree. This is using the
"POM-less" Tycho functionality.
See
https://wiki.eclipse.org/Tycho/Release_Notes/0.24#POM-less_Tycho_builds

One advantage of this is that you do not need to update the version in
the pom.xml when you change it in the MANIFEST.MF because the pom.xml is
automatically generated. This also reduces a lot of the duplicated
information and pom.xml repetition.

- Maven 3.3 and up is required.
- Only eclipse-plugins and eclipse-features can be pom-less.
Repositories, target and others still have pom.xml.
- New parent poms are added because a parent is necessary directly one
level above the plug-in/feature that will have its pom generated
- Some test plug-ins had to be renamed .test -> .tests because it's
required so that it detects that it's a test plug-in
- Some suites were renamed so that they all use the same consistent name
"AutomatedIntegrationSuite"
- Profiles were added for the more common test configurations. They are
activated by the presence of simple .properties files that only serve to
activate the correct profile. The profiles:
  - One for UI tests (UI present and start in UI thread)
  - One for SWTBot tests (UI present and do not start in UI thread)
Other test plug-ins that are too different are kept intact and still
have
a pom.xml
- Fragments are kept intact since they all have different target
platform configurations

Change-Id: I9d73380eb766f547830c552daf08053a30b1845c
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 23:19:56 -04:00
Sergey Prigogin
f78a7306b3 Bug 512150 - Don't allow indirect inclusion by partner header for test
files

Change-Id: I6d0eb9078b92b4cf6e9345cc58824994dd679324
2017-02-13 20:48:45 -04:00
Sergey Prigogin
e431143a97 Removed an unused method.
Change-Id: Ica6fc7ba71ec039f4a33ca01c5fc1867dfdb54b1
2017-02-13 20:48:21 -04:00
Marc-Andre Laperle
3f0e34177c Bug 511677: Mitigate deadlock closing project during indexer job
A deadlock can occur if a project is closing and an indexing job is
running.
There is a patch on Gerrit that reproduces the lock all the time:
https://git.eclipse.org/r/#/c/90603

Thread #1, closes the project (*workspace lock*), removes the binary
parser for this project. Around the same time...

Thread #2, is just about to start indexing the project
(PDOMRebuildTask).
  It visits the C model to collect source files. Because the binary
parser was removed, it reloads the project description, which triggers a
listener (CExternalSettingsManager) to get a *workspace lock*.

Thread #1 then blocks on cancelling the indexer, which will never happen
because it is blocked on getting the workspace lock.

This deadlock could happen for any code being called by the indexer
thread that gets a workspace lock before the indexer cancels itself.
Because so much code can be hooked up to the C model (extensions,
listeners, etc), it is difficult to guarantee that this will not happen.

- Possible option 1. Changing CExternalSettingsManager to execute
asynchronously (Job) breaks other code that expect the operation to be
synchronous. Doing this also does not guarantee that other code will not
get a workspace lock.

- Possible option 2. Cancelling the indexer before the binary parser is
removed from the map: does not break any tests but only cover this
particular case of the binary parser triggering the project description
reload. Any other code that triggers a project description reload (and
workspace lock) will still be an issue.

Option 2, although incomplete, seems the safest and more reasonable at
this point. Judging by the comments in bug 327126, to fix this properly
would require quite a big effort that I'm not sure anyone would do.

Change-Id: Ida7b45558e4430bc5cc9a1eb5ef25e8d19487c31
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 15:11:49 -05:00
Nathan Ridge
11ccc87055 Bug 511726 - Handle unresolved field owner type in CPPASTFieldReference.getFieldPosition()
Change-Id: I0ded6f44f8aad69d54c361432afcb423ed6601b2
2017-02-12 12:20:00 -04:00
Nathan Ridge
2e1f2d475a Bug 511653 - Completion of inheriting constructor in using-declaration
Change-Id: If20d85bd6199e8f08152f3a5801bfb30b61d1d09
2017-02-12 00:04:11 -04:00
Nathan Ridge
c0ba7f6bfb Bug 511658 - Destructor call via alias template name
Change-Id: I64a7ec62a05345983e9e298a6ba735f63385486b
2017-02-11 21:25:10 -05:00
Sergey Prigogin
2899b9098e Bug 509898 - IndexFileSet.containsDeclaration is slow and is causing UI
freezes

Fixed logging of cycles in IndexFileSet.containsDeclaration.

Change-Id: Ic27b161aacb7706f8f06beb1f876f86100421328
2017-02-09 18:12:17 -08:00
Sergey Prigogin
64f00b9457 Removed obsolete code.
Change-Id: I97aef668d2248103b88c77f03c4481807c0e4286
2017-02-09 13:28:51 -08:00
Nathan Ridge
e20812dc8b Bug 511522 - Navigation to type named by 'auto' in variable declaration
Change-Id: I3f6a35cb2498d7a9de31db7c283027fbc33fe688
2017-02-09 02:20:35 -05:00
Nathan Ridge
ec3ab3016d Bug 511331 - Do not color entire qualified name with problem highlighting
Change-Id: Ic712ec2e03bdf03f5ae97019fb9ae8994c5dec23
2017-02-09 02:20:35 -05:00
Sergey Prigogin
a88b16d124 Bug 399147 - 'Find references' does not find using-declarations
Trigger index rebuild to rebuild corrupted binding reference lists.

Change-Id: I94a68fc260c8543840aa712efc97650152597a0a
2017-02-08 18:56:39 -08:00
Sergey Prigogin
5462bac381 Bug 509898 - IndexFileSet.containsDeclaration is slow and is causing UI
freezes

Added cycle detection to IndexFileSet.containsDeclaration.

Change-Id: I48a596bd680bd4f764739b9170a98c907c41ae8c
2017-02-08 18:24:29 -08:00
Sergey Prigogin
5e793c9b43 Revert "Bug 399147 - Make 'Find Reference' find using-declarations"
The change is invalid since a PDOMName can participate in only one
binding at a time through its BINDING_PREV_OFFSET/ BINDING_PREV_OFFSET
pointers.

This reverts commit 2706699543.

Change-Id: I1a4dd7b189b85a0d9c1cca2660d33ab7351a025c
2017-02-08 12:46:40 -08:00
Marc-Andre Laperle
95e05f485d Remove profiles that helped skip ppc64le
Those profiles were useful when keeping compatibility with Eclipse 4.5
but this is not required anymore.

Change-Id: Ic9ef7beecee1b5bd072ec192048ab409b19844c9
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-08 09:51:43 -05:00
Nathan Ridge
0d35254d82 Bug 511427 - ClassCastException in CompositeCPPClassType.wrapBindings()
Change-Id: Id02d59a67b98131aaa4afc8936f89d0985ef93cf
2017-02-07 21:32:03 -04:00
Nathan Ridge
27775e3393 Bug 475581 - Make AbstractCLikeLanguage.createScanner() not final
This allows extenders to replace the preprocessor.

Change-Id: I8c6a53225608e4a21560b31bed3b5f37291ba612
2017-02-07 21:30:08 -04:00
Sergey Prigogin
c6955df2e2 Bug 511871 - CContentAssistProcessor.createContext may leak index lock
Change-Id: I828c94484c7b1594ba72551b80cd5ed6e6a8576c
2017-02-07 14:48:32 -08:00
Sergey Prigogin
ff23fc9dbe Cosmetics.
Change-Id: I8c38ac32c7cb4e335e16b92a54eeaf6faa0abfe2
2017-02-06 19:37:44 -08:00
Sergey Prigogin
d6ab03abb9 Bug 511808 - Expand namespaces by default regardless of depth level in
Outline view

Change-Id: I9061ad64e442e8859fd79dbb4bf437443ef545a7
2017-02-06 19:30:01 -08:00
Sergey Prigogin
0be1934cec Removed use of a deprecated class.
Change-Id: I2f0bb36c79974e62fcf06a77ca78954f8103a150
2017-02-06 18:44:50 -08:00
Sergey Prigogin
be08c70459 Removed redundant casts.
Change-Id: I7ba50740e4b63897d77ef0204afa5343314d4916
2017-02-06 18:37:47 -08:00