Commit Graph

61911 Commits

Author SHA1 Message Date
Yan Zhulanow eb3685d6ac EA-218902: Check PsiElement for validity 2020-02-14 17:35:17 +09:00
Yan Zhulanow 615d24bbd2 Minor: Rename KotlinStepOverInlineFilter to KotlinStepOverFilter 2020-02-14 17:35:17 +09:00
Yan Zhulanow f4337eede1 Debugger, BE: Support lambda breakpoints for lambdas passed to '@InlineOnly' functions 2020-02-14 17:35:17 +09:00
Yan Zhulanow f129ab55c5 Debugger: Rewrite step out action
This commit fixes the following tests:
 - KotlinSteppingTestGenerated.Custom.testStepOutInlineFunctionStdlib
 - KotlinSteppingTestGenerated.StepOut.testStepOutSeveralInlineArgumentDeepest
2020-02-14 17:35:17 +09:00
Yan Zhulanow cc2fe6b0c6 Debugger, BE: Generate original line number after inlining if call is used in an if condition
If a part of an 'if' condition is an inline function call, we need to insert the original condition line after it. Otherwise, the debugger will think it is inside the inline function implementation. Obviously, this breaks stepping – instead of the 'if' body, we go on stepping through the inline function.

This commit fixes 'KotlinSteppingTestGenerated.StepOver#testSoInlineLibFun' test.
2020-02-14 17:35:17 +09:00
Yan Zhulanow f115bde682 Debugger, BE: Provide Java-like stepping for 'for' loops
- Visit '}' instead of 'for' keyword on post-condition
- Visit 'for' keyword on pre-condition
2020-02-14 17:35:17 +09:00
Yan Zhulanow 8b17718086 Debugger, BE: Make the NOP instruction optimizer save the first NOP, not the last
This commit fixes the following tests:
 - KotlinSteppingTestGenerated.StepOver#testSoInlineLibFun
 - KotlinSteppingTestGenerated.StepOver#testSoInlineIterableFun
 - KotlinSteppingTestGenerated.StepOver#testSoInlineFunOnOneLineFor
2020-02-14 17:35:17 +09:00
Yan Zhulanow 9cba72d5dd Debugger: Remove flaky sleep-based stepping tests 2020-02-14 17:35:17 +09:00
Yan Zhulanow 01a6e7abf3 Debugger, eval4j: Remove eager class loading in findField() (KT-35354) 2020-02-14 17:35:17 +09:00
Yan Zhulanow 8f29f8bc9d Debugger: Rewrite step over action (KT-14296)
The main goal is to make behavior similar to what happens in Java. For instance, now we always skip lambdas.
Also, we can reliably use '$i$f' and '$i$a' synthetic local variables. There is no need in complicated hacks any more.
2020-02-14 17:35:17 +09:00
Yan Zhulanow b7449c2d6e Debugger, minor: Move Action to its own file, rename to KotlinStepAction 2020-02-14 17:35:17 +09:00
Yan Zhulanow dd4a8d01c9 Debugger: Remove obsolete hacks needed for old Android dex 2020-02-14 17:35:16 +09:00
Yan Zhulanow dd743f05c1 Debugger: Remove/change tests for the deprecated Android dex 2020-02-14 17:35:16 +09:00
Yan Zhulanow f912602ddc Debugger, minor: Move KotlinSourcePosition to top level 2020-02-14 17:35:16 +09:00
Yan Zhulanow 2df646e273 Debugger, minor: Remove unneeded nullability dance 2020-02-14 17:35:16 +09:00
Yan Zhulanow 1a3553cdb7 Debugger: Simplify method filters, use smart pointer in KotlinLambdaMethodFilter 2020-02-14 17:35:16 +09:00
Yan Zhulanow c6262b5ff2 Debugger, minor: Fix element equivalence check in basic step filter 2020-02-14 17:35:16 +09:00
Yan Zhulanow fc09534464 Debugger, minor: move step filters to the 'filter' package 2020-02-14 17:35:16 +09:00
Yan Zhulanow d53c554c8c Debugger, minor: Add missing 'const' modifier 2020-02-14 17:35:16 +09:00
Yan Zhulanow 6d606e5291 Debugger, minor: Move createStepOverCommandWithCustomFilter() to DebuggerSteppingFilter 2020-02-14 17:35:16 +09:00
Yan Zhulanow 26371ea023 Debugger, minor: Update getActiveFilters() implementation, use prepend() 2020-02-14 17:35:16 +09:00
Yan Zhulanow c196ce5f09 Pill: Pack embedded dependencies to artifacts 2020-02-14 17:35:16 +09:00
Yan Zhulanow a2be789d37 Pill: Move out Pill tasks from buildSrc 2020-02-14 17:35:16 +09:00
Yan Zhulanow 6f1b3e0f17 Pill: Fix pre-built run configurations 2020-02-14 17:35:15 +09:00
Yan Zhulanow 73813aef23 Pill: Support all Gradle source sets, not just main/test 2020-02-14 17:35:15 +09:00
nataliya.valtman 3acf7a4679 TCServiceMessageOutputStreamHandlerTest: fix tests
Fix test to support updates in ServiceMessageParser and attributes
remove TCServiceMessageOutputStreamHandlerTest from ignored tests
2020-02-14 11:14:17 +03:00
Dmitriy Novozhilov 389dcff125 [FIR] Discard argument with spread in place of non-vararg parameter 2020-02-14 09:18:54 +03:00
Dmitriy Novozhilov 50ac8eb95b [FIR] Add smartcast info to argument of invoke of function with receiver 2020-02-14 09:18:54 +03:00
Dmitriy Novozhilov 4fbed9b363 [FIR] Add builder for FirExpressionWithSmartcast 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov 1da036ac98 [FIR-TEST] Split outdated dfa test to separate tests 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov 1dd7417746 [FIR] Fix configuring label name for lambdas in light tree builder 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov 6b378cab29 [FIR] Don't render lambda bodies in arguments of calls in cfg dump 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov 28c95b1108 [FIR] Don't use psi for rendering control flow graph 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov a4b53b4a20 [FIR] Fix passing flow from contracts with form returns(false) ... 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov 643a4b9c3b [FIR] Support makeDefinitelyNotNull for intersection types 2020-02-14 09:18:53 +03:00
Dmitriy Novozhilov b71e4ebb3f [FIR-TEST] Add !DUMP_CFG directive. Get rid of cfg diagnostic tests 2020-02-14 09:18:52 +03:00
Dmitriy Novozhilov f495c4e215 [FIR-TEST] Move stdlib resolve tests out from resolve directory 2020-02-14 09:18:52 +03:00
Dmitriy Novozhilov 90021f3ece [FIR-TEST] Reorganize tests for data flow analysis 2020-02-14 09:18:52 +03:00
Dmitriy Novozhilov 89fa3572ec [FIR-TEST] Move tests for solved issues from problems directory 2020-02-14 09:18:52 +03:00
Toshiaki Kameyama 0c9720f20c ReplaceGetOrSetInspection: do not report for 'get' with spread operator
#KT-36171 Fixed
2020-02-14 08:47:10 +03:00
Mark Punzalan b782e8f0f0 Add IR equivalent of AbstractBytecodeListingTest and muted failures. 2020-02-13 23:44:53 +03:00
Mark Punzalan 06b6477d04 [JVM IR] Do not add nullability annotation for functions that return
platform types.

This behavior matches the non-IR backend, which was added in
f16dcdd8a9.
2020-02-13 23:44:53 +03:00
Dmitry Petrov 0c984c5e62 PSI2IR tests for b29993739e85dbceb02d04a964741b1410a568f8 2020-02-13 23:43:04 +03:00
Jinseong Jeon 5a49ccac76 JVM_IR: Relax bailout condition for SAM conversion generation.
Previously, resolved call is expected to have SAM converted argument map
if SamConversionPerArgument is enabled. However, if SAM argument is
followed by vararg parameter and an array _without_ a spread operator is
passed, New Inference left a type mismatch error on a resolved call, which
made that resolved candidate filtered out. Instead, another resolution
result wihtout SAM converted arugment map will be provided.

All other logics, such as adding SAM conversion type op and lowering SAM
conversion and/or call references, are already there for resolved calls
without SAM converted argument map. This change just relaxes the bailout
condition so that array passed to vararg after SAM argument can be
handled in JVM IR.
2020-02-13 23:43:03 +03:00
Kristoffer Andersen f782ea075b [JVM IR] ProperVisibilityForCompanionObjectInstanceField
- Uncomment tests
- Add proper visibility to companion field
  + Make exception for interfaces -> they need to respect language versions 1.8
    before they can put private members there.
- Adjust synthetic accessor lowering to look for enclosing classes with access
  via companion object.
2020-02-13 21:50:48 +03:00
Igor Yakovlev a67d97bdf8 Remove redundant fake facade classes
Fixed #KT-35122 #EA-218642 #EA-217640
2020-02-13 19:08:54 +03:00
Pavel Kirpichenkov 5d6d287faa [NI] Refactor UnstableSmartCast diagnostic
Split diagnostic classes for unstable smartcast with different resolution applicability.

^KT-36264 Fixed
2020-02-13 18:02:38 +03:00
Pavel Kirpichenkov 15d744c3da [NI] Continue resolution after unstable smart cast on receiver
The old inference cosideres candidates with unstable smartcast on
receiver unsuccessful, therefore another one may be selected.
KT-36264
2020-02-13 18:02:38 +03:00
Pavel Kirpichenkov 4997c9535c Mute test, affected by changes in unstable smart casts
Revealed by changes in e02b7b58, but they are not the source of a bug
See KT-36459
2020-02-13 18:02:37 +03:00
Pavel Kirpichenkov e40ba73950 [NI] Add resolution applicability for resolved candidates with error
New resolution applicability is needed in cases when error is found,
but candidate still should be selected. Currently there are two cases,
when this behaviour is required:
- unstable smartcast (choose candidate with non-nullable parameter)
- unknown lambda parameter type (against non-functional expected type)

KT-36264
2020-02-13 18:02:37 +03:00