Commit Graph

52261 Commits

Author SHA1 Message Date
Yan Zhulanow 11dfbd5d3d Allow '$this$label$<somethingElse>' for extension receivers
Our mangling works poorly with nested inline function calls (saying, `apply()` inside an another `apply()`). In that case, the generated local variable name for both cases will be `$this$apply`. As the debugger sees only the last (the closest) variable with the same name, we loose the ability to get the first one.
This means we might want to add some additional information to the mangling (e.g. add the trailing indices `$this$apply$1`). This commit supports this case.
2019-02-25 14:43:58 +03:00
Yan Zhulanow 34b03c45d7 Add a test for escaped names supported in the new evaluator (KT-29661) 2019-02-25 14:43:58 +03:00
Yan Zhulanow 51b26325c6 Coroutine stack trace provider: check thread state before invokeMethod() 2019-02-25 14:43:58 +03:00
Yan Zhulanow 24cdd3f857 Remove 'debugTypeInfo' key
The key became obsolete as the new evaluator doesn't use it anymore.
2019-02-25 14:43:57 +03:00
Yan Zhulanow 6a81c2e1e4 Minor: Extract 'this' local variable name in DefaultImpls 2019-02-25 14:43:57 +03:00
Yan Zhulanow 65b6098242 Further refinements in variable displaying (Kotlin mode)
- Remove synthetic outer this for lambdas
- Recognize captured this for interface default methods
2019-02-25 14:43:57 +03:00
Yan Zhulanow 300c102c3f Remove BeforeExtractFunctionInsertionTest, the new evaluator doesn't depend on the 'extract function' refactoring 2019-02-25 14:43:57 +03:00
Yan Zhulanow 0657a3d399 New evaluator that doesn't depend on the 'extract function' refactoring (KT-28192, KT-25220, KT-25222, KT-21650) 2019-02-25 14:43:57 +03:00
Yan Zhulanow 3e849294f0 Extract the common part from bunched KtCodeFragment 2019-02-25 14:43:57 +03:00
Yan Zhulanow b4002accfb Extract label name calculation from 'recordCallLabelForLambdaArgument()' 2019-02-25 14:43:56 +03:00
Yan Zhulanow 34c5954d75 Minor: Reformat evaluator code 2019-02-25 14:43:56 +03:00
Yan Zhulanow eaed6855ac Minor: Add proper nullability check in generateExtensionReceiver() 2019-02-25 14:43:56 +03:00
Yan Zhulanow d039e3b1c0 Hide synthetic variables for local functions and destructured lambda parameters (Kotlin variables) 2019-02-25 14:43:56 +03:00
Yan Zhulanow ed88020a84 Minor: Reformat extraction engine files 2019-02-25 14:43:56 +03:00
Yan Zhulanow 488418d960 Change mangling for local functions 2019-02-25 14:43:56 +03:00
Yan Zhulanow aca3be12e9 Change illegal local variable mangling rules 2019-02-25 14:43:56 +03:00
Yan Zhulanow 47f0b68a8c Change mangling for destructured lambda parameters 2019-02-25 14:43:56 +03:00
Yan Zhulanow d2c2a6c99f Debugger: Support inline functions in Variables view 2019-02-25 14:43:55 +03:00
Yan Zhulanow 7fb8357b28 Allow '// PRINT_FRAME' option for multi-breakpoint stepping tests 2019-02-25 14:43:55 +03:00
Yan Zhulanow 16b94feea6 Minor: Remove an obsolete TODO comment 2019-02-25 14:43:55 +03:00
Yan Zhulanow 6cd980765c Do not issue exceptions for non-captured local variables
This partly fixes KT-28192.
2019-02-25 14:43:55 +03:00
Yan Zhulanow 4ae01badff Extract function: avoid same parameter names 2019-02-25 14:43:55 +03:00
Yan Zhulanow 7de5ddaac9 Fix receiver evaluation for primitive receiver types 2019-02-25 14:43:55 +03:00
Yan Zhulanow f6cc686095 Minor: Extract a const for continuation variable name 2019-02-25 14:43:55 +03:00
Yan Zhulanow cf9461847b Hide unrelated this entries in Kotlin Watches mode 2019-02-25 14:43:54 +03:00
Yan Zhulanow e5b0d2e34f Refactoring: Extract list field search 2019-02-25 14:43:54 +03:00
Yan Zhulanow c5061e7997 Replace 'visibleVariablesByName()' calls with a safe implementation 2019-02-25 14:43:54 +03:00
Yan Zhulanow 757fc421f7 Refactoring: Extract wrapping 'try' expressions 2019-02-25 14:43:54 +03:00
Yan Zhulanow f5a3a46e76 Watches: Hide 'this' if it's a continuation 2019-02-25 14:43:54 +03:00
Yan Zhulanow 227a7e5609 Provide access to 'coroutineContext' inside suspend functions/lambdas (KT-24829) 2019-02-25 14:43:54 +03:00
Yan Zhulanow cf925fc2ad Activate Kotlin stack frame even if there is no Kotlin strata 2019-02-25 14:43:54 +03:00
Yan Zhulanow f6b2e673f7 Debugger: Display async stack trace elements for suspend callers (KT-28728) 2019-02-25 14:43:53 +03:00
Yan Zhulanow e8c066605b Do not drop analysis results for the code fragment context, allow to re-use it
Otherwise labels declared in the expression context become unresolved.
This is needed for the `this@label` expression evaluation support (KT-28134).
2019-02-25 14:43:53 +03:00
Yan Zhulanow 4c681c787d Watches: Add Kotlin/JVM views to watches window (KT-28134, KT-28087, KT-22250)
Kotlin mode: show only Kotlin variables and captured values. The variable names are Kotlin-friendly.
JVM mode: show all variables available in the current stack position, including synthetic ones.
2019-02-25 14:43:53 +03:00
Yan Zhulanow 5c419fc629 Evaluator: New implementation for variable finder
Support both old and new receiver variable conventions in variable finder.
2019-02-25 14:43:53 +03:00
Yan Zhulanow df7bbf707b Refactoring: Rename a function to 'getArgumentsForEvaluation()' 2019-02-25 14:43:53 +03:00
Yan Zhulanow ea462091c4 Support new convention for local variables name mangling: '$receiver' -> '$this$<label>' (KT-26913) 2019-02-25 14:43:53 +03:00
Yan Zhulanow b5f9149702 Minor: Get rid of some magic constants 2019-02-25 14:43:53 +03:00
Kirill Shmakov 2a3473f275 Better string builder. 2019-02-25 14:43:32 +03:00
Kirill Shmakov c43024a9c7 Version is backed. 2019-02-25 14:34:47 +03:00
Kirill Shmakov 02c9afcb6f Last test 2019-02-25 14:15:30 +03:00
Ilya Chernikov b1ab2ead61 Restore find script definition behaviour (mostly) and relevant comments broken with refactoring 2019-02-25 11:57:13 +01:00
Kirill Shmakov fb14128cbd All but one 2019-02-25 13:46:34 +03:00
Nicolay Mitropolsky 6b792c36f0 KotlinUastApiTest: using kfail alias 2019-02-25 12:26:22 +03:00
Nicolay Mitropolsky 712c897472 Uast: fix for UVariables missing typeReferences 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky 98740138f3 Uast: yet another check for invalid context before resolve (EA-137191, EA-137193) 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky bd0c6736ce Uast: implementing specific javaPsi for UVariables 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky 7dc818d42b 191: KotlinUastApiTest.kt missed bunch aligning fix 2019-02-25 12:26:21 +03:00
Andrey Uskov 63a1bba6d9 Fix importing compiler arguments if worker api is used #KT-29564 Fixed 2019-02-25 12:20:27 +03:00
Natalia Selezneva 8453c1ff4d Scratch: hide 'make module' checkbox when no module is selected
^KT-23985
2019-02-25 11:20:49 +03:00