Commit Graph

8617 Commits

Author SHA1 Message Date
Alexander Udalov f5ed3ff6bd Refactor DataFlowInfo.establishSubtyping()
Don't create useless copies of data flow infos.

Also get rid of vararg subject variable in type-checking 'when' expression
2012-11-16 17:56:28 +04:00
Alexander Udalov d52387a7eb Delegating data flow info
A delegating data flow info can have a parent data flow info, which it queries
when is queried itself. This helps to avoid lots of copying of the same data
2012-11-16 17:56:27 +04:00
Alexander Udalov 83d56213cd Separate DataFlowInfo into interface & implementation 2012-11-16 17:56:27 +04:00
Alexander Udalov ed02c6c39e Remove DataFlowInfo.CompositionOperator
It was used only in one place, which wouldn't suffer without it
2012-11-16 17:56:26 +04:00
Alexander Udalov 4ec95ff4d6 Minor, replace Name creation with constants usage 2012-11-16 17:56:25 +04:00
Alexander Udalov 57f18fca2e Retain data flow info after array accesses 2012-11-16 17:56:24 +04:00
Alexander Udalov 7c0ea67356 Fix erroneous check when saving EXPRESSION_DATA_FLOW_INFO
Before saving a data flow info, we checked if it's the same as that of context,
which was passed to us. This proves wrong when eventually somebody asks for a
data flow info of the same expression, but with a different context (i.e. with
a different data flow info in it) and we return this (different) context's
info, whereas we should have returned that of the original context.
This could've happened in CandidateResolver, for example.

Save data flow info after every expression now, only if it's not empty.

No new tests added, see next commit.
2012-11-16 17:56:23 +04:00
Alexander Udalov ac7ee9d3f5 Retain data flow info after when-expressions
This means the subject expression and the common data flow info of all entries'
conditions
2012-11-16 17:56:23 +04:00
Alexander Udalov d0a2ba5737 Retain data flow info after is-expression 2012-11-16 17:56:22 +04:00
Alexander Udalov ef3e38071c Retain data flow info after try-finally 2012-11-16 17:56:21 +04:00
Alexander Udalov d629fe2d91 Retain data flow info after 'for' loop range expressions 2012-11-16 17:56:20 +04:00
Alexander Udalov 0b1c87a812 Retain data flow info after conditions in do-while statements 2012-11-16 17:56:20 +04:00
Alexander Udalov b0e9c7aab7 Retain data flow info after conditions in while-statements 2012-11-16 17:56:19 +04:00
Alexander Udalov ae77bf0a4e Retain data flow info after conditions in if-statements 2012-11-16 17:56:18 +04:00
Alexander Udalov 2872a0799a Retain data flow info after string template expressions 2012-11-16 17:56:17 +04:00
Alexander Udalov 950f912154 Retain data flow info after multi-declaration
#KT-2825 In Progress
2012-11-16 17:56:17 +04:00
Alexander Udalov a54e34282a Retain data flow info after assignment operations (+= etc)
#KT-2825 In Progress
2012-11-16 17:56:16 +04:00
Alexander Udalov f949d9e804 Retain data flow info after assignment statements
#KT-2825 In Progress
2012-11-16 17:56:15 +04:00
Alexander Udalov 3cbdb57d5c Retain data flow info after assignments in initializer
#KT-2825 In Progress
2012-11-16 17:56:14 +04:00
Alexander Udalov d19a824b14 Retain data flow info after elvis operator
#KT-2825 In Progress
2012-11-16 17:56:14 +04:00
Alexander Udalov e4cd0e004f Retain data flow info after boolean operations
#KT-2825 In Progress
2012-11-16 17:56:13 +04:00
Alexander Udalov 2e6500d848 Retain data flow info after in (contains)
#KT-2825 In Progress
2012-11-16 17:56:12 +04:00
Alexander Udalov 3358108c3f Retain data flow info after == (equals)
#KT-2825 In Progress
2012-11-16 17:56:11 +04:00
Alexander Udalov 1fbe9b9a31 Retain data flow info after binary calls
Make autocasts in CandidateResolver when checking value argument types

 #KT-2825 In Progress
2012-11-16 17:56:11 +04:00
Andrey Breslav a71ea5c6db EA-39003 - ISE: ResolveSession.resolveToDescriptor
Lokking up classes and objects by PSI element, rather than by name
2012-11-16 17:48:49 +04:00
Svetlana Isakova 96c1564c54 added ExpressionTypingServices.deparenthesize()
(with type resolution)
2012-11-16 15:32:59 +04:00
Svetlana Isakova 1c059671ba added test for deparenthesize 2012-11-16 15:32:59 +04:00
Svetlana Isakova cd3892e251 rename deparenthesize -> deparenthesizeWithNoTypeResolution 2012-11-16 15:32:59 +04:00
Svetlana Isakova 41864c29b2 analyze left expression in assignment operation
when it's incomplete
2012-11-16 15:32:59 +04:00
Svetlana Isakova c4428496bd check super type qualifier
even if super resolve is unsuccessful
2012-11-16 15:32:59 +04:00
Svetlana Isakova 126f5e1668 check debug info errors in diagnostic tests 2012-11-16 15:32:59 +04:00
Svetlana Isakova df057010f3 record ambiguous label references 2012-11-16 15:32:58 +04:00
Svetlana Isakova 6d3981503b refactoring (removed duplicated code) 2012-11-16 15:32:58 +04:00
Svetlana Isakova dc1b053d8e added JetTreeVisitorVoid 2012-11-16 15:32:58 +04:00
Svetlana Isakova de64ba4a88 'copy' of resolved call fix: copy status as well 2012-11-16 15:32:58 +04:00
Svetlana Isakova 45985dd0db refactoring (extracted method usage) 2012-11-16 15:32:58 +04:00
Andrey Breslav e9a06e51f3 Guava 12 sources added 2012-11-15 19:10:00 +04:00
Nikolay Krasko 5117bf8118 Don't postpone assigning created body 2012-11-14 18:19:53 +04:00
Nikolay Krasko f7b491042e Extended logging for EA-38122 2012-11-14 18:19:48 +04:00
Nikolay Krasko 23ae29b83a Remove obsolete JetNamespaceBody 2012-11-14 18:19:43 +04:00
Nikolay Krasko c4dd556b92 Fix for EA-39487 2012-11-14 18:19:38 +04:00
Nikolay Krasko 2bc57ee8a2 More logging for EA-40352 2012-11-14 18:19:33 +04:00
Nikolay Krasko 36d8500656 Revert explicit check for building with Java 1.6
#KT-2988 Fixed
2012-11-14 18:19:28 +04:00
Alexander Udalov c261fa2c35 Fix line separators in TestGenerator
Do not convert line separators when loading copyright text. This fixes problems
when generating tests on Windows systems
2012-11-13 21:27:47 +04:00
Andrey Breslav 0c1ef8a9a6 Explicitly add rt.jar to the script class path 2012-11-13 19:38:20 +04:00
Andrey Breslav 7e7e779e80 No printing of verbose compiler output in Ant task and REPL 2012-11-13 19:38:20 +04:00
Natalia.Ukhorskaya 31b28cec92 Default setter for property: skip receiver argument 2012-11-13 19:03:20 +04:00
Natalia.Ukhorskaya ba2eab526a Extension properties in class: don't put receiver on stack for GETFIELD/PUTFIELD instruction
#KT-3031 Fixed
2012-11-13 19:03:20 +04:00
Andrey Breslav f868d965e1 Report system-independent source file paths 2012-11-13 16:06:13 +04:00
Andrey Breslav 388cfc5e1a Fixing test data to account for new logging 2012-11-13 15:18:12 +04:00