Commit Graph

63933 Commits

Author SHA1 Message Date
Victor Turansky dbffe6d2be README Actualize IDEA instructions 2020-04-08 14:48:53 +03:00
Anton Bannykh 998218716d IR: make lateinit lowering traverse local classes 2020-04-08 14:44:25 +03:00
Dmitry Gridin 81bd8f8c31 TrailingCommaInspection: cleanup code 2020-04-08 18:39:59 +07:00
Leonid Startsev 60efab24ea Add @SerializableWith on objects too
to be able to retrieve them via getAssociatedObject and serializer<T>()
function. Now object itself is a SerializerFactory.
2020-04-08 14:12:01 +03:00
Leonid Startsev d4fc6774f3 Support new 'typeParametersSerializers' function
from GeneratedSerializer
2020-04-08 14:12:01 +03:00
Leonid Startsev ceb3cfbfd5 Remove update* calls 2020-04-08 14:12:01 +03:00
Leonid Startsev add0b461ee Refactor calls to beginStructure
typeParams argument has been removed
2020-04-08 14:12:00 +03:00
pyos 0037d5a7c8 JVM: erase conditional suspension markers from inline-only functions
Otherwise, the generated bytecode is unnecessarily suboptimal in some
(arguably weird) cases.

In the JVM backend, this was an accidental regression in #3260, as I had
not noticed that effectively inline-only functions were handled by a
separate branch in FunctionCodegen. In JVM_IR, I'm pretty sure the
redundant markers have always been there as `isSuspensionPoint` in
ExpressionCodegen never checked for effectively-inline-only-ness.
2020-04-08 12:31:23 +02:00
Dmitriy Novozhilov f6d9867fa4 Add benchmark for plusAssign desugaring
#KT-38101
2020-04-08 12:35:54 +03:00
Dmitry Petrov 0c21d63290 Box inline class return value in covariant override of suspend fun 2020-04-08 10:50:58 +03:00
Dmitriy Novozhilov 8a2b39d647 [FIR] Add checking receivers of callable references 2020-04-08 10:38:45 +03:00
Igor Chevdar b54148a6f1 Added a test on lateinit var inside a local class 2020-04-08 10:33:14 +03:00
Mikhail Bogdanov 1772f20d48 Minor. Add smap test for multifile facade 2020-04-08 07:26:55 +02:00
pyos 9334327bbf JVM_IR: unmute two more tests fixed by #3106 2020-04-08 07:04:16 +02:00
pyos b3e124ad66 Add a test where classes call inline functions from each other 2020-04-08 07:04:16 +02:00
pyos 9ed73439f8 JVM_IR: delay writes to the source map until generateMethod
`generateMethodNode` should not have any side effects for the output to
be stable under incremental compilation.
2020-04-08 07:04:16 +02:00
pyos 495cefe65d Dump bytecode in a test that shows the effect of recompiling inline funs 2020-04-08 07:04:16 +02:00
pyos f765963056 Split JVM backend diagnostics test into IR and non-IR versions
The IR backend no longer generates redundant INLINE_CALL_CYCLEs.
2020-04-08 07:04:16 +02:00
pyos 82899e6243 JVM_IR: reuse MethodNodes for inline functions in same module
This fixes the weird cases when a class gets overwritten by an imperfect
copy, reduces the number of classes in the output if an inline function
contains an inline call that causes it to have regenerated anonymous
objects, and makes inlining of same module functions a bit faster in
general. On the other hand, this may increase memory footprint a bit
because classes cannot be flushed to the output jar, as the inliner
would not be able to locate classes for anonymous objects if they have
already been unloaded from memory.
2020-04-08 07:04:16 +02:00
Alexander Gorshenev 97be5617ca Renamed -Xklib-mpp to -Xexpect-actual-linker to reduce user confusion 2020-04-08 05:23:12 +03:00
Mikhail Zarechenskiy 86fd4da567 [UAST] Fix mapping types containing type aliases
#KT-27935 Fixed
2020-04-08 01:25:14 +03:00
Mikhail Zarechenskiy 73e1ddc505 Allow Result as a return type if one enabled inline classes explicitly
#KT-38042 Fixed
2020-04-08 01:25:13 +03:00
Valentin Kipyatkov 1ffdc11d31 Suggest signature refactoring also for members of expect class 2020-04-07 22:17:05 +03:00
Valentin Kipyatkov a5dc2b5b2a Suggested change signature: do not ask to enter values for optional parameters
#KT-37797 Fixed
2020-04-07 22:17:05 +03:00
Valentin Kipyatkov f4a245e12a Dropped hack in initialization of KotlinParameterInfo which is not needed anymore 2020-04-07 22:17:05 +03:00
Valentin Kipyatkov 4f19dd5fe1 Code refactoring 2020-04-07 22:17:05 +03:00
Valentin Kipyatkov e49ca20d17 Code improvements 2020-04-07 22:17:05 +03:00
Valentin Kipyatkov 88cd129549 Fixed other parameter references broken in new parameter values in conventional Change Signature 2020-04-07 22:17:04 +03:00
Valentin Kipyatkov 0adfa0357a Converted all test method bodies into blocks - otherwise IDE is too slow 2020-04-07 22:17:04 +03:00
Valentin Kipyatkov c76571413b Added test for new parameter value referencing another parameter 2020-04-07 22:17:04 +03:00
Svyatoslav Kuzmich 3ec13d5bd6 [JS IR BE] Support companion objects in external interfaces
These objects are referenced but value is not actually used.
Replace access to these references with null literals.
2020-04-07 21:19:14 +03:00
Svyatoslav Kuzmich f4b94ccbc8 Update klib metadata version to 1.4.0 2020-04-07 21:19:14 +03:00
Vladimir Dolzhenko aed4f9909d KotlinCopyPasteReferenceProcessor clean up
Relates to #KT-37971
2020-04-07 19:55:25 +02:00
Vladimir Dolzhenko 7327028052 KotlinCopyPasteReferenceProcessor clean up
Relates to #KT-37971
2020-04-07 19:52:00 +02:00
Kirill Shmakov 5460327c8d Fix tests for KT-38079 2020-04-07 20:49:54 +03:00
Kirill Shmakov 2b8b5af18b Adapt exception line numbering for file link (KT-38079)
#KT-38079 Fixed
2020-04-07 19:48:03 +03:00
Kevin Bierhoff 7448761dfd only stub default constructor when compiling against .java source files 2020-04-07 17:48:39 +02:00
Denis Zharkov c83860187c FIR: Add abstract equals/hashCode to ConeKotlinType
Otherwise they are incosistent when being added to sets of constraints
during type inference
2020-04-07 17:54:55 +03:00
Denis Zharkov 65e90743df FIR: Fix hanging inference case with intersection types 2020-04-07 17:54:55 +03:00
Denis Zharkov 81d9cf76f2 FIR: Add java.io.Serializable as supertypes to built-in classes 2020-04-07 17:54:55 +03:00
Denis Zharkov 168c7f306f FIR: Fix ambiguity for invoke candidates on qualifier receiver 2020-04-07 17:54:55 +03:00
Denis Zharkov 4cd93a9fec FIR: Add test for discrepancy in call resolution for qualifiers with old FE
^KT-38031 Open
2020-04-07 17:54:55 +03:00
Mads Ager 03fb49bb38 [JVM_IR] Improve debugging behavior of inline functions
Specifically, this commit improves the stepping behavior of the IR
backend around functions with defaults.

  - Improved line numbers in the default handler itself for better
    stepping when inlined.

  - Improved source information on default arguments

  - Improved test coverage of stepping behavior in old and IR backends.

Improves the stepping behaviour around inline methods with default
arguments. In particular, we now accurately step through the
evaluation of default arguments, but do _not_ spuriously show the exit
from the $default handler.
2020-04-07 16:52:45 +02:00
pyos 516692008f JVM: add tests fixed by the last two commits
One was broken on JVM, the other on JVM_IR.
2020-04-07 15:42:41 +02:00
pyos 829343cf6f JVM: surround captured lambdas with conditional suspension markers 2020-04-07 15:42:41 +02:00
pyos c650c9570f JVM: use conditional suspension point markers 2020-04-07 15:42:41 +02:00
simon.ogorodnik 42a48ef312 [FIR] Improve constraint errors rendering in html dump 2020-04-07 16:24:59 +03:00
simon.ogorodnik 2c8a9bf437 [FIR] Fix nullability rendering for class like types in html dump 2020-04-07 16:24:59 +03:00
simon.ogorodnik bd826f38bc [FIR] Fix specificity comparision for unsigned integers 2020-04-07 16:24:58 +03:00
simon.ogorodnik 851e2dbb68 [FIR] Implement equals & hashCode for candidates 2020-04-07 16:24:58 +03:00