Commit Graph

56815 Commits

Author SHA1 Message Date
Steven Schäfer 43a27ab58c (Un)mute tests 2019-08-07 10:34:43 +02:00
Steven Schäfer 70aee4f9e2 JVM IR: Handle -Xassertion modes 2019-08-07 10:34:43 +02:00
Steven Schäfer 7b2edc6de8 Extract simple inlining utility from ArrayConstructorLowering 2019-08-07 10:34:43 +02:00
Steven Schäfer d11344ce2e Add more tests for -Xassertions=jvm corner cases 2019-08-07 10:34:43 +02:00
Sergey Rostov 3e25166832 Gradle, js, karma: require webpack npm dependencies 2019-08-07 09:29:22 +03:00
Sergey Rostov 99762193f9 Gradle, js, npm: proper disambiguation classifier for npm and tools configurations
#KT-32293 Fixed
2019-08-07 09:29:22 +03:00
Sergey Rostov 1dc860f206 Gradle, js, npm: fix targets and compilation listener
#KT-32293 Fixed
2019-08-07 09:29:21 +03:00
Sergey Rostov 87e80317a0 Gradle, js, external declarations: read flags from properties 2019-08-07 09:29:21 +03:00
Jim S 88db93853f Make context available to suppressors
We've found that the BindingContext is necessary for any meaningful suppressor.
This change adds the ability for suppressors to use the BindingContext when available.

Change-Id: I14d8148ef659eca273445bf0638bcdb8c3b21f02
2019-08-07 03:16:24 +03:00
Ilya Kirillov 5151659006 Do not use dummy resolving for light data classes which extend other classes
When using dummy resolving for creating stubs of data classes we do not have overriding information
which is needed to determine whether we need to generate synthetic members or not.
As a result of that, we may have two different versions of member scope: the first one is
resolved by dummy resolving and the second one resolved via an ordinary one.

As light methods depend on the index of them in the class body,
we can have two different methods with the same index
which breaks mapping from dummy resolved methods to normal ones.

This behaviour can be reproduced when having data class which
extends other class with some synthetic members overridden and marked as final
like described in #KT-32969

#KT-32969 fixed
2019-08-06 20:08:43 +03:00
Yan Zhulanow 39e15782b2 Debugger: Fix compatibility with AS 3.3 2019-08-07 01:15:34 +09:00
Yan Zhulanow 01805e8878 Debugger: Fix read action in 'createLineSourcePosition' (KT-33064) 2019-08-07 01:15:34 +09:00
Yan Zhulanow 8211e73f7e Revert "Evaluator: Do not report parsing error on empty block/expression (KT-11938)"
KT-11938 reopened because of KT-32699.

This reverts commit 6686ed2e
2019-08-07 01:15:33 +09:00
Yan Zhulanow d86bede293 Fix compatibility issue with the 'kotlinttest' plugin 2019-08-07 01:15:33 +09:00
Yan Zhulanow 0a092d6613 Debugger: Fix breakpoint firing in '$suspendImpl' (KT-27645) 2019-08-07 01:15:33 +09:00
Yan Zhulanow 9096d211d3 Debugger, minor: Fix line breakpoint popup (add containing declaration name) 2019-08-07 01:15:33 +09:00
Yan Zhulanow 1f13c4b87b Parcelize: Remove remaining experimental status checks (KT-32096) 2019-08-07 01:15:33 +09:00
Yan Zhulanow b3941c4ed0 Pill: Fix platform source attachment in compiler modules 2019-08-07 01:15:33 +09:00
Yan Zhulanow 086b151e1f Pill: Fix project build, add kotlin-scripting-jvm-host module 2019-08-07 01:15:32 +09:00
Yan Zhulanow 89c45e9e3f Fix stub loading for crossinline lambdas compiled by older Kotlinc (EA-105730)
Older kotlinc versions (1.1.5?) didn't generate the 'INNERCLASS' attribute for some anonymous classes, e.g. for 'crossinline' lambdas.
An example: 'Timer().schedule(1000) { foo () }'

Normally, stub loader checks if the class is 'ClassFileViewProvider.isInnerClass()', and ignores the class file.
Without the 'INNERCLASS' attribute this check fails. As the stub loaded isn't created to deal with anonymous classes nicely, it fails miserably.
This commit explicitly ignores classes with local visibility.
2019-08-07 01:15:32 +09:00
Yan Zhulanow cc3f1b3501 Debugger: Fix exception in "Smart step into" for Java method calls (KT-32813) 2019-08-07 01:15:32 +09:00
Yan Zhulanow 79a5375ad1 Debugger: Fix NPE in CFA during evaluation (KT-32830) 2019-08-07 01:15:32 +09:00
Yan Zhulanow ecce34e02b Debugger: Fix infinite recursion in inline callable searcher (EA-108938) 2019-08-07 01:15:32 +09:00
Yan Zhulanow ea97926c66 Debugger: Add verbose logging for EA-125569, fix possible issue 2019-08-07 01:15:32 +09:00
Yan Zhulanow 527df35bf3 Debugger: Handle case when we can't calculate the anonymous class name gracefully (EA-141202) 2019-08-07 01:15:31 +09:00
Yan Zhulanow 0f568a395f Debugger: Recognize exceptions from target VM in FUS 2019-08-07 01:15:31 +09:00
Yan Zhulanow 71e8cddaa6 Minor: Fix NI error in KotlinPositionManager 2019-08-07 01:15:31 +09:00
Yan Zhulanow 17c3406097 Debugger: Gracefully handle debugger exceptions we can't do anything reasonable with (EA-128154, EA-139473) 2019-08-07 01:15:31 +09:00
Yan Zhulanow 70745f233f Debugger: Fix reference value evaluation in Java contexts
Before this commit, Kotlin evaluator used the precise value type for variable finding.
As a result, VariableFinder often failed to find such a variable (cause the real one has a super type).
2019-08-07 01:15:31 +09:00
Yan Zhulanow ed03d6e48e Debugger, minor: Move FrameInfo out of KotlinCodeFragmentFactory 2019-08-07 01:15:30 +09:00
Yan Zhulanow 98b4844f51 Debugger, minor: Reformat KotlinCodeFragmentFactory 2019-08-07 01:15:30 +09:00
Yan Zhulanow bb3091429f Debugger: Keep a reference to stack trace element (EA-208000) 2019-08-07 01:15:30 +09:00
Yan Zhulanow a664df8143 Debugger: Unwrap EvaluateExceptions on checking (EA-105847) 2019-08-07 01:15:30 +09:00
Yan Zhulanow e301ddde9e Pill: Ignore KotlinPlugin artifact in Git 2019-08-07 01:15:30 +09:00
Yan Zhulanow 52a958256d Debugger: Disable exception on 'variable not found' event (EA-138365)
The error message is still visible to the user, so it doesn't make much sense to duplicate it as an exception.
2019-08-07 01:15:30 +09:00
Yan Zhulanow e0c4a1c6f1 Debugger: Improve error diagnostics in FUS 2019-08-07 01:15:29 +09:00
Yan Zhulanow a20014a7e6 Reformat eval4j 2019-08-07 01:15:29 +09:00
Yan Zhulanow eb173893b0 Debugger: Minor, check evaluator preconditions as in Java evaluator 2019-08-07 01:15:29 +09:00
Yan Zhulanow d6487e89ad Debugger: Prohibit 'suspend fun' calls in evaluated expressions
Currently, it's impossible to call suspend functions in evaluated code fragments (see KT-31701).
This commit officially prohibits such calls, so users will see a semi-friendly error message.
2019-08-07 01:15:29 +09:00
Yan Zhulanow 910133dbfb Debugger: Fix line numbers on String literal 'when' condition checks
Before this commit, line numbers were only available on 'when' clause bodies.
So, if a clause condition check didn't succeed, the entirely clause could be ignored.
2019-08-07 01:15:28 +09:00
Yan Zhulanow 3d3bde5483 Debugger: Do not ignore duplicated locations for line breakpoints 2019-08-07 01:15:28 +09:00
Yan Zhulanow de361f0b6c Minor: Add 'kotlinc' to the project dictionary 2019-08-07 01:15:28 +09:00
Yan Zhulanow 780c0518e5 Debugger: Disallow breakpoints for @InlineOnly function bodies (KT-32687, KT-24408)
Kotlin compiler strips all debug information for @InlineOnly functions, making them non-debuggable.
This commit disables breakpoints inside @InlineOnly functions to prevent false expectations.
2019-08-07 01:15:28 +09:00
Yan Zhulanow 25fb77e7ad Debugger: Add breakpoint applicability tests
This commit adds a number of tests that check breakpoint placing behavior, and an inline action that work the same way as tests.
2019-08-07 01:15:28 +09:00
Yan Zhulanow a8d08815a6 Simplify call: Fix false positive in "filter {}" detection (KT-32468)
"Simplify filter {}" conversion changes semantics when the casted type is not a subtype if an initial collection element type.
This commit limits a replacement suggestion to subtype cases.
2019-08-07 01:15:28 +09:00
Yan Zhulanow b1f132d750 Debugger: Add stepping tests for function breakpoints 2019-08-07 01:15:27 +09:00
Yan Zhulanow 023baf6233 Debugger: Ask for light class generation in background 2019-08-07 01:15:27 +09:00
Yan Zhulanow 129ca7f2d8 Debugger: Fix breakpoint applicability (KT-10984)
Ensure that breakpoints of each type can be placed only on lines where it makes sense to place a breakpoint.

Here is a quick summary of the rules:
1. Method breakpoints are available for functions, property accessors, constructors;
2. Line breakpoints are available on any line with an expression, excluding some cases like 'const' property initializers or annotations;
3. Line breakpoints should be available on a '}' in functions and lambdas;
4. Line breakpoints are not suggested for one-liners;
5. Lambda breakpoints should be shown for single-line lambdas.
2019-08-07 01:15:27 +09:00
Yan Zhulanow 22c18ffaa9 Debugger: Add Kotlin Function breakpoints (KT-22116)
Now it's possible to put a function breakpoint.
In JVM, function breakpoints behave as JVM method breakpoints. Normally, they're triggered twice – once on enter, and once on exit.
2019-08-07 01:15:27 +09:00
Yan Zhulanow 55ea0840b1 Debugger: Keep continuation and spilled variables until the whole trace is processed (EA-208000) 2019-08-07 01:15:27 +09:00