Commit Graph

21 Commits

Author SHA1 Message Date
Dmitriy Novozhilov cef859fced Fix exponential pseudocode size on incorrect prefix increments and decrements
#KT-44153 Fixed
2021-03-16 12:25:23 +03:00
Dmitriy Novozhilov 31776d9a3b [CFA] Mark arguments of all annotation calls as USED_AS_EXPRESSION
Also revert hacky fix of KT-37294 introduced in 80caa063b
#KT-37447 Fixed
2020-03-13 14:32:28 +03:00
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Mikhail Glukhikh 8e23ca597d Add extra tests for KT-20429, simplify code a bit 2017-12-28 20:31:44 +03:00
Denis Zharkov 02b40326cc Fix incorrect coroutines codegen behavior
If all the suspension calls in a suspend function were "hidden"
under the for-convention (iterator/next/hasNext) calls,
control-flow didn't find them, thus supposing that there is no
suspension points and there is no need to generate a coroutine state machine

The solution is to add relevant calls to CFG

 #KT-15824 Fixed
2017-01-25 13:54:01 +03:00
Alexey Sedunov a414843f54 Control-Flow Analysis: Use PSI to generate pseudocode if nested resolved call is confused with outer one (e.g. a {} when invoke() is missing)
#KT-14500 Fixed
2016-11-07 20:03:36 +03:00
Alexey Sedunov 0159ddbc49 Control-Flow Analysis: Do not skip pseudocode for value arguments if they are matched with errors 2016-11-07 20:03:34 +03:00
Mikhail Glukhikh b7e8f71367 Fix of getCorrespondingLoop for complex loop / try-finally trees #KT-8246 Fixed 2016-03-30 18:49:23 +03:00
Alexey Sedunov b75665a96a Misc: Do not use resolved call of outer expression if current call expression has no callee
#KT-10105 Fixed
2015-11-24 14:03:42 +03:00
Alexey Sedunov b1f1360081 PSI: Make JetPostfixExpression.getBaseExpression() nullable
#KT-7761 Fixed
2015-05-21 19:29:49 +03:00
Svetlana Isakova 976d5ab030 Pseudocode: don't write full label name when jump on it 2014-09-07 01:04:00 +04:00
Svetlana Isakova 61dc110cc7 Report 'break or continue outside a loop'
for break/continue outside a loop body (e.g. in loop condition)

 #KT-5724 Fixed
2014-09-07 01:03:57 +04:00
Svetlana Isakova 3d7c22f242 Added exact label names for labels 2014-09-05 18:31:53 +04:00
Alexey Sedunov 77bbf8f73b Pseudocode: Generate fake values for Unit/Nothing-typed expressions 2014-07-28 13:07:29 +04:00
Alexey Sedunov 4707f4a5e9 Pseudocode: Add debug information to magic instructions 2014-07-11 19:13:49 +04:00
Alexey Sedunov f226d99d36 Pseudocode: Add valued instructions and unbound values to AbstractPseudoValueTest 2014-06-26 13:06:23 +04:00
Alexey Sedunov 5e2c2b4eca Pseudocode: Implement computation of expected type predicates 2014-06-23 19:32:25 +04:00
Svetlana Isakova 9480907514 Mark some expressions after processing their components
when it's semantically correct

Expressions: calls, 'for' loops, elvis operators
It's significant for reporting 'unreachable code' correctly
2014-06-21 12:26:32 +04:00
Alexey Sedunov 4a5d2e6728 Add tests for element -> pseudo-value mapping 2014-06-03 18:17:07 +04:00
Alexey Sedunov d2c055e9da Pseudocode: Introduce pseudo-value analysis 2014-06-03 18:17:05 +04:00
Svetlana Isakova b7f7063bf4 improved postProcess
collect (and cache) reachable instructions for local declarations
after processing all parent instructions
2014-03-07 21:08:18 +04:00