Mikhael Bogdanov
342ff50e31
Minor. Update test
2020-01-29 16:59:59 +01:00
Mikhael Bogdanov
504d79577d
JVM_IR. Align outer parameter name generation between backends
2020-01-29 16:59:57 +01:00
Mikhael Bogdanov
17e89fbbdb
JVM_IR. Align synthetic parameter name generation across backends
2020-01-29 16:59:57 +01:00
Mikhael Bogdanov
c42984ca33
Generate proper flags for <clinit>
2020-01-29 16:59:56 +01:00
Mikhael Bogdanov
6c07dbf351
JVM_IR. Support type annotations
2020-01-29 16:59:55 +01:00
Mikhail Zarechenskiy
ce690d8a1d
Add test for obsolete issue
...
#KT-36121 Obsolete
2020-01-29 11:43:11 +03:00
Ilya Gorbunov
c28710419a
Drop noStdLib coroutines tests
...
They were disabled anyway because coroutines can't be compiled without
the support API in stdlib
#KT-36083
2020-01-29 09:12:42 +03:00
Ilya Gorbunov
9f8e3dad33
Add coroutines-compat jar dependency to those tests that require it
...
#KT-36083
2020-01-29 09:12:40 +03:00
Ilya Gorbunov
cef81e11b7
Do not generate JS tests for experimental coroutines support
...
#KT-36083
2020-01-29 09:12:40 +03:00
max-kammerer
f256547cc8
Revert "JVM_IR: Use direct field access instead of calling certain accessors."
...
This reverts commit 62f9e7a810 .
2020-01-28 14:55:56 +01:00
Mads Ager
62f9e7a810
JVM_IR: Use direct field access instead of calling certain accessors.
...
Final default properties accessors that access a backing field
on the same class can be replaced by direct field use.
Perform the optimization late in the pipeline to allow lowerings
to expose more opportunities for optimizations.
2020-01-28 10:42:15 +01:00
Georgy Bronnikov
8f4b4007fe
JVM_IR: Add test for compiling against cross-platform Klib
2020-01-28 12:19:43 +03:00
Mads Ager
e327b174a2
IR: Use name \$\$delegate_n for the field for interface delegation.
...
Without this change, these fields could have names such as
`<no name provided>$SuperClass$delegate` for something like
`object SuperClass by I { }`.
2020-01-27 15:28:27 +03:00
Mikhail Glukhikh
f949b48b4a
[FIR] Swap priority of kotlin libraries / built-ins #KT-35948 Fixed
2020-01-27 13:21:54 +03:00
Mikhail Glukhikh
ef8485a232
FIR2IR: change receiver handling in case it's an outer object
...
Before this commit, FIR2IR expected that FIR will have no receiver
in this case. However, now FIR *has* receiver, so we have to convert
it to object correctly
2020-01-27 00:34:16 +03:00
Dmitriy Novozhilov
20ac606df4
Add js runtime to failing blackbox test
2020-01-24 14:17:44 +03:00
Alexander Udalov
2fca7f1a54
Add codegen tests for old behavior of null checks
...
#KT-22275
2020-01-24 11:56:28 +01:00
Mark Punzalan
7329a1641a
[JVM IR] Fix lambdaInLocalFunction.kt by adding helper methods that
...
return the target backend under test.
2020-01-23 19:16:27 +01:00
Dmitriy Novozhilov
be74e92c27
[NI] Add missing type variables to common system in builder inference
...
#KT-35967 Fixed
2020-01-23 14:30:28 +03:00
Mikhail Glukhikh
69ecbd93a9
[FIR] Fix type alias handling in qualifier position
2020-01-23 12:32:39 +03:00
Steven Schäfer
aea5e3ffbc
JVM IR: Remove type substitutions from ExpressionCodegen
...
Instead, determine whether the return type of a call is Nothing, by
looking at the type of the call expression.
2020-01-22 15:51:11 +01:00
pyos
2f0f4e570f
JVM_IR: do not remap locals in contexts nested inside lambdas
...
The only case where this code is reachable at all is objects in lambdas
that use reified type parameters of the outer inline function. Since the
type parameters are declared outside the inlining root, regenerating the
object is actually pointless, and remapping its captures even more so
(not to mention that the code under the condition uses the captures of
the lambda, not of the method it's currently transforming).
2020-01-22 15:36:09 +01:00
Alexander Udalov
3ca0f8a569
Fix incorrect message for new nullability assertion exception in 1.4
...
#KT-36026 Fixed
2020-01-22 14:41:20 +01:00
Zalim Bashorov
f92376fbbd
[BE test] Extract and mute cases which don't work on JS from eqNullableDoubles.kt and eqNullableDoubles.kt
2020-01-22 15:20:41 +03:00
Dmitriy Novozhilov
72cb0de705
[FIR-TEST] Update testdata
2020-01-22 14:49:23 +03:00
Dmitry Petrov
64a405e7a0
IR: 'fun interface' support
2020-01-22 00:12:03 +03:00
Ilmir Usmanov
a55989a2a5
JVM_IR: Support interface delegation of suspend functions
...
The issue was, that built IR function does not have a PSI element,
which is required to report error on suspend functions inside monitors.
In this case, use PSI element of the class, containing the function,
which is consistent with old BE.
2020-01-21 19:59:02 +01:00
Steven Schäfer
8e07482862
JVM IR: Fix generation of parameterless default constructor
...
The JVM backend does not generate parameterless default constructors for
private constructors and constructors of local, inner, or inline
classes.
2020-01-21 16:34:33 +01:00
Alexander Udalov
5321a6af33
Forbid spread operator in signature-polymorphic calls
...
#KT-35226 Fixed
2020-01-21 15:57:35 +01:00
Alexander Udalov
99294cfdae
Minor, fix test data
...
TypeCastException was unresolved after an accidental change in
f48bdc1fcb .
2020-01-21 11:26:21 +01:00
Mads Ager
79840a05b2
Fix test expectations.
...
Do not check for occurrences of "this" on the current backend.
I accidentally unified the checking for the two backends
without checking that it worked (used the wrong test suite to
test).
2020-01-21 11:26:02 +01:00
Georgy Bronnikov
1c527fc159
IR: avoid name clashes between raised local functions.
2020-01-21 12:50:55 +03:00
Alexander Udalov
c0600e6873
JVM IR: minor, mute and adapt noCallAssertions.kt to 1.4
2020-01-20 19:12:59 +01:00
Alexander Udalov
078b934580
Mute/unmute JVM backend tests for language version 1.4
2020-01-20 19:12:59 +01:00
Alexander Udalov
f48bdc1fcb
Fix codegen box tests for language version 1.4
...
Since API version 1.4, NullPointerException is thrown for casts of null
to any type instead of TypeCastException.
2020-01-20 19:12:59 +01:00
Alexander Udalov
6a90dc2efe
Fix bytecode text tests for language version 1.4
...
New null check assertions are generated a bit more efficiently, with a
call to `checkNotNull` instead of IFNONNULL+jump.
2020-01-20 19:12:59 +01:00
Ilmir Usmanov
1ef5e25c60
JVM_IR: Minor. Update test data
2020-01-20 18:59:00 +01:00
Ilmir Usmanov
6ede10c1ca
JVM_IR: Minor. Add test for SMAP of inner object/lambda of inline suspend function
2020-01-20 16:00:36 +01:00
Ilmir Usmanov
877509306d
JVM_IR: Minor. Unmute tests.
2020-01-20 16:00:36 +01:00
Ilmir Usmanov
891a55d79a
JVM_IR: Fix visibility of inner suspend lambda inside inline function
...
It should be public, otherwise, after inlining, we will get IllegalAccessError.
2020-01-20 16:00:36 +01:00
Ilmir Usmanov
56c8fdc6c4
JVM_IR: Perform tail-call optimization on IR
...
It is easier to introduce a new lowering so the codegen will emit code for the old
tail-call optimizer to understand. Also, this is more flexible and would allow to
optimize cases, which are now feasible with the old optimizer.
Note, that because of bytecode inlining, we cannot replace the old one, but we cannot
emit code, that is simpler for it to optimize.
2020-01-20 16:00:35 +01:00
Ilmir Usmanov
9f5b51ed43
JVM_IR: Do not generate fake continuation markers inside inline suspend lambdas
...
Since the markers replace ALOAD 0 as continuations, passed to suspend calls, in
JVM_IR we do not need this, since in JVM_IR all inline lambdas are static
functions.
2020-01-20 16:00:35 +01:00
Ilmir Usmanov
4d9d62ad12
JVM_IR: Also check attributes for suspendImpls when generating continuation
...
Otherwise, it would not generate continuations for overloads.
2020-01-20 16:00:34 +01:00
Ilmir Usmanov
d17afddaa9
JVM_IR: Fix bridges generation for suspend functions
...
Use view's signature as jvm signature.
2020-01-20 16:00:34 +01:00
Ilmir Usmanov
2507e2b526
JVM_IR: Fix parents of $$forInline companions
2020-01-20 16:00:33 +01:00
Ilmir Usmanov
7167d5f75c
JVM_IR: Generate $$forInline companion for transformed crossroutines
2020-01-20 16:00:33 +01:00
Ilmir Usmanov
64c1446fbe
JVM_IR: Generate $$forInline companion for suspend inline functions
...
Set isInline flag for $$forInline functions. Otherwise, SMAP will not be generated
for inner objects/lambdas, leading to error in inliner.
2020-01-20 16:00:32 +01:00
Ilmir Usmanov
4ef2ecf9a9
JVM_IR: Add returns unit marker if suspend call returns unit
2020-01-20 16:00:32 +01:00
Mikhail Zarechenskiy
5c5635ce20
Fix codegen & bytecode tests after unifying exceptions in JVM backend
...
See KT-22275 for details
2020-01-20 16:36:03 +03:00
Mads Ager
1ed7e33f42
JVM_IR: Fix default argument bit mask for methods made static.
...
When called by reflection the bit mask will be generated
discounting dispatch/extension receivers. Make sure that the
interpretation of the bit mask is consistent for direct and
reflective calls.
In addition, this also fixes the modifiers on java 8 parameter
metadata for the dispatch and extension receivers for these
inline class methods.
2020-01-20 12:59:25 +01:00