Commit Graph

56802 Commits

Author SHA1 Message Date
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
Vyacheslav Gerasimov 89b152809f Build: Make dependencies on builtins compileOnly
for kotlin-annotations-android & kotlin-annotations-jvm, to prevent
builtins from occurring in maven pom compile scope.

 #KT-33140
2019-08-06 18:09:20 +03:00
Mikhail Zarechenskiy 80acc56c10 Don't lost type parameters for members of inline classes in the bytecode
#KT-33157 Fixed
2019-08-06 17:53:08 +03:00
Sergey Igushkin a874f4f5c3 Don't use addIfNotNull core util in the JS Gradle plugin
The function was placed in a package whose another top-level function
used coroutines. This led to a NCDFE kotlin.coroutines.Continuation
with Gradle versions that bundle Kotlin pre-1.3 stdlib.

Instead, use the existing util function `lowerCamelCaseName` which also
filters nulls.
2019-08-06 16:55:46 +03:00
Mikhael Bogdanov 47bee6a6c5 JVM_IR. Support reified parameters in anonymous object super constructor call 2019-08-06 14:48:16 +02:00
Mikhael Bogdanov 645736f167 JVM_IR. Support anonymous object/lambda reification 2019-08-06 14:48:16 +02:00
Vyacheslav Gerasimov 0571f90762 Build: Add kotlin.build.jar.compression property
Is `true` on teamcity and `false` locally by default

 #KT-32573
2019-08-06 15:40:40 +03:00
Vyacheslav Gerasimov 659c399d30 Build: Add kotlin.build.dependencies.dir property
To specify directory downloaded dependencies stored in

 #KT-30310
2019-08-06 15:40:40 +03:00
Dmitry Petrov 1d0ba4edd4 IR: IrTypeAlias: update testData after rebase on master 2019-08-06 12:42:44 +03:00
Dmitry Petrov f590d4da9e IR: IrTypeAlias: serialize/deserialize new IR objects
Add uniqId for typealias declarations.
Implement WrappedTypeAliasDescriptor.
2019-08-06 12:42:43 +03:00
Dmitry Petrov b3525b077c IR: IrTypeAlias: isActual 2019-08-06 12:42:02 +03:00
Dmitry Petrov 2b43b09444 IR: IrTypeAlias: Strip 'typealias' declarations in back-ends 2019-08-06 12:42:02 +03:00
Dmitry Petrov 6abb0ffe28 IR: IrTypeAlias: Update FIR2IR testData
NB a lot of FIR2IR tests actually don't pass, and we don't care much at
the moment.
2019-08-06 12:42:02 +03:00
Dmitry Petrov 48ae76ac28 IR: Introduce IrTypeAlias element 2019-08-06 12:42:02 +03:00