Commit Graph

3528 Commits

Author SHA1 Message Date
Mikhail Glukhikh ce1f9882df FIR2IR: Fix mapping for intersection overrides of deserialized functions 2021-01-27 15:42:04 +03:00
Mikhail Glukhikh 76c2288e21 IrInterpreter: interpret IrGetField properly 2021-01-26 16:19:14 +03:00
Mikhail Glukhikh b311e95487 FIR2IR: don't generate IR getter for const library properties 2021-01-26 16:10:09 +03:00
Dmitry Petrov 708e6914bd JVM JVM_IR hide sealed class constructors 2021-01-25 17:29:38 +03:00
Dmitriy Novozhilov 98c22f9e59 [TD] Add forgotten bytecode dump 2021-01-25 17:08:32 +03:00
Dmitriy Novozhilov 5c0cfa87ba [Test] Support some jvm codegen specific configuration directives 2021-01-25 17:08:31 +03:00
Denis.Zharkov 3a3d2ee3e9 FIR2IR: Fix mapping for intersection overrides of deserialized properties 2021-01-25 12:29:31 +03:00
Mikhail Glukhikh 94e613dd01 FIR: support custom annotation-based type attributes 2021-01-23 10:56:42 +03:00
Mikhail Glukhikh 4cd6266bce FIR: fix suspend type serialization 2021-01-23 10:56:40 +03:00
Mikhail Glukhikh afe335e504 FIR: serialize ExtensionFunctionType attribute 2021-01-23 10:56:37 +03:00
Dmitriy Novozhilov c423750962 [TD] Fix incorrect module structure directives in test data file 2021-01-22 13:51:34 +03:00
Dmitriy Novozhilov 6a7cd0c811 [Test] Add ability to specify applicability of diagnostic to module or file 2021-01-22 13:51:19 +03:00
Denis.Zharkov 5f0d00a83f FIR: Use proper tower data contexts for postponed callable references
E.g., it should contain local scopes of containing lambdas
2021-01-21 18:53:03 +03:00
Ilmir Usmanov 704366e531 JVM: Mark suspend lambda receiver as used if callable reference
accesses it.
 #KT-44131 Fixed
2021-01-21 12:47:59 +01:00
Ilmir Usmanov 952576e98f JVM_IR: Do not unbox Result parameter if it not only one inline class
parameter, since in this case, the compiler generates a bridge, where
the result is unboxed.
2021-01-20 18:30:00 +01:00
Ilmir Usmanov d48f92775b JVM_IR: Do not unbox Result parameter in invoke if there is a bridge
since the bridge unboxes it.

 #KT-44141 Fixed
2021-01-20 18:29:58 +01:00
Ilya Goncharov 0ddb603eaa [JS IR] Fix of test with method in abstract class calling extension on super type 2021-01-20 20:01:42 +03:00
Ilya Goncharov 50ab9ed054 [JS IR] Add test on interface with default method calling extension method on super-interface
^KT-42176 fixed
2021-01-20 14:26:38 +03:00
Ilmir Usmanov cce9469e6a JVM_IR: Do not unbox Result parameter in Result methods
#KT-44140 Fixed
2021-01-20 06:27:15 +01:00
Ilmir Usmanov b476f1cc3e Minor. Change test to use the feature instead of suppressing error 2021-01-19 16:03:33 +01:00
pyos 29f95c7df2 FIR: improve inference of implicit type arguments in casts
Type parameters do not necessarily match one-to-one, or preserve order.
2021-01-18 18:01:03 +03:00
Mikhail Glukhikh 9a5791ad6d FIR: use correct context for enum entry resolve
Now the same resolve context is used for enum entries and
for constructors.
2021-01-18 08:34:46 +03:00
Mikhail Glukhikh f85fc47383 FIR: introduce separate companion object resolve context
Before this commit, during the resolve of companion objects we used
the same context than for any nested class. However, during companion
object resolve we should not have companion object receiver itself
accessible in any case (in particular, it should not be accessible
in constructor). So in this commit we introduced separate context
for this purpose.
2021-01-18 08:32:06 +03:00
Mikhail Glukhikh 6cee4e968e [FIR] Don't call componentX for anonymous destructuring entry 2021-01-18 08:28:15 +03:00
Dmitry Petrov 2f30b0994a Minor: mute test in WASM 2021-01-15 15:31:41 +03:00
Mads Ager 250cc1dc92 [JVM] Never treat arguments to methods as locals that can be removed.
Fixes KT-44347
2021-01-15 10:33:11 +03:00
Zalim Bashorov 47c4197098 [JS old] Revert fix made for KT-44221 in ab753625
And mute the test for old BE.

#KT-44221 Open
2021-01-13 01:22:17 +03:00
Dmitriy Novozhilov af5a635f85 [Test] Ignore error diagnostics from FIR in some BB tests 2021-01-12 18:35:39 +03:00
Dmitriy Novozhilov 2eeed1281c [Test] Mute failing FIR BB tests related to MPP 2021-01-12 18:35:37 +03:00
Dmitriy Novozhilov e3c7bd5f85 [Test] Migrate AbstractIrBlackBoxCodegenTest to new infrastructure 2021-01-12 18:35:34 +03:00
Dmitriy Novozhilov 85c87f7df9 [Test] Migrate AbstractBlackBoxCodegenTest to new infrastructure 2021-01-12 18:35:30 +03:00
Dmitriy Novozhilov f01122d8dc [Test] Fix module names according to MPP module conventions in test data 2021-01-12 18:35:29 +03:00
Dmitriy Novozhilov 285ccf7583 [Test] Don't generate JVM BB tests for expect-actual linker
This feature is supported only on JS backend so those tests on JVM
  are meaningless. Also those tests had passed on jvm because of
  old codegen tests didn't use `MODULE` directive and analyze all
  files in tests in single module
2021-01-12 18:35:27 +03:00
Dmitriy Novozhilov 3a41f1e435 [Test] Filter out support module with coroutine helpers from module deps
In old tests coroutine helpers was added as separate module named `support`
  instead of additional files for current module.
So to safe compatibility with old testdata we need to filter this dependency
2021-01-12 18:35:26 +03:00
Dmitriy Novozhilov 7e92fb8eb9 [Test] Remove redundant empty IGNORE_BACKEND directive 2021-01-12 18:35:23 +03:00
Dmitriy Novozhilov e0cd830a0e [Test] Drop codegen tests for experimental coroutines
Experimental coroutines was deprecated in Kotlin 1.3,
  so since Kotlin 1.5 we don't support (and don't test) them
2021-01-12 18:35:18 +03:00
Svyatoslav Kuzmich ab753625fe [JS Legacy] Fix returning Char from suspend functions (KT-44221)
Mark translated expression with a proper type, like we do with
non-suspending calls, to coerce it later.
2021-01-12 15:42:31 +03:00
Svyatoslav Kuzmich 2d88ff6fb2 [JS IR] Fix unsgined integer default arguemtns (KT-44180)
Const lowering didn't exprect null constants with unsigned number
types and crashed with NPE. This commit fixes that.
2021-01-12 15:42:31 +03:00
Jinseong Jeon d53354057a FIR: build functional type for SAM with receiver properly 2021-01-12 10:33:55 +03:00
Alexander Udalov 92f3b759c0 Fix codegen test data for genericTypeWithNothing.kt
#KT-18367 Fixed

Co-authored-by: Zalim Bashorov <zalim.bashorov@jetbrains.com>
2021-01-11 17:20:55 +01:00
Dmitry Petrov b02a9846d0 IR KT-44233 support flexible nullability in IrTypeSystemContext
^KT-44233 Fixed Target versions 1.5-M1
2021-01-11 17:33:50 +03:00
Jinseong Jeon 093f62caac FIR2IR: check non-parameter Unit type for adapted callable references 2021-01-11 16:23:00 +03:00
Mads Ager dfc86feecd [IR] Extend test coverage for smart cast handling. 2021-01-11 12:01:48 +03:00
Jinseong Jeon 7cc06489dd IR: move enum value array initialization out of <clinit>
#KT-44192 Fixed
2021-01-07 23:00:37 +01:00
Jinseong Jeon f8f08e8134 IR: add a test about maximum number of constants in an enum class 2021-01-07 23:00:37 +01:00
Svyatoslav Kuzmich b6ad1584c9 [Wasm] Improve interface method dispatch
- Use typed Wasm tables for each interface method to avoid runtime
  function type check

- Use linear search by implemented interface rather than by individual
  virtual function signature
2020-12-30 19:29:10 +03:00
Shagen Ogandzhanian e7dc199ad7 Init enum entries whenever we access companion object or accessing valueOf
Fixes https://youtrack.jetbrains.com/issue/KT-43987
Fixes https://youtrack.jetbrains.com/issue/KT-43989
2020-12-30 14:54:34 +01:00
Dmitry Petrov 7fa04afda2 JVM_IR KT-32115 fix $$delegatedProperties initialization in enum 2020-12-30 15:56:18 +03:00
Dmitry Petrov 81e00ca371 JVM box tests for KT-30402 2020-12-30 10:57:46 +03:00
Ilmir Usmanov 80289e4a3f IC Mangling: Generate inline class literal instead of underlying type
literal in annotations.
 #KT-30280 Fixed
2020-12-30 03:31:08 +01:00