Commit Graph

37 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 6b343515e1 [Test] Save IR bytecode dumps from BytecodeListingHandler to .ir.txt file instead of _ir.txt
This is needed to keep consistency with other dumps and to allow
  test helper plugin to recognize those dumps
2022-12-01 07:29:37 +00:00
Ilya Chernikov 5b3816cce5 Test infra: refactor IGNORE_BACKEND directive
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Pavel Mikhailovskii 18e61315f4 KT-27936 Generate InnerClasses attributes 2022-08-23 22:06:10 +00:00
Dmitry Petrov 5946242d75 JVM_IR fix special bridges in mixed Java/Kotlin hierarchies
KT-50257 KT-50476
2021-12-29 13:29:19 +00:00
Dmitry Petrov 30ceb49442 JVM_IR KT-48945 generate special bridge with unsubstituted signature 2021-11-17 17:44:01 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Alexander Udalov e079fb665e JVM IR: fix inheritance from mutable collections of Int
For subclasses of `AbstractMutableList<Int>` which are not inline
classes, the special bridge `remove` had a parameter of type `Int`
(mapped to JVM primitive int) before this fix. The hack in
`MethodSignatureMapper` changed this type to `Int?`, yet the body of the
special bridge still loaded it as non-nullable, which resulted in
incorrect bytecode.

It looks like a part of this hack in `BridgeLowering` was made only for
inline classes which are subclasses of mutable collections. Supposedly
it should be extended to non-inline classes, so that `remove` special
bridge would have consistent IR by the time it reaches codegen.

 #KT-46516 Fixed
2021-05-12 13:58:40 +02:00
Alexander Udalov 0c3f2eefe0 Migrate bytecodeListing tests to new test infrastructure 2021-04-23 17:58:16 +02:00
Dmitry Petrov c2a5b0b6e2 JVM_IR KT-45920 don't add special bridge if it clashes with known method 2021-04-08 23:48:39 +03:00
Dmitry Petrov d0f26abd18 JVM_IR KT-44798 don't generate multiple stubs with same signature 2021-02-10 09:09:28 +03: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
Dmitry Petrov 3dbe02b7fe JVM_IR KT-43109 generate internal bridge for custom internal 'toArray'
Also add some tests for internal collection stubs.
2020-12-04 18:57:10 +03:00
Alexander Udalov 8ce2e4654b JVM IR: allow custom toArray to have any array type
To avoid breaking Java source compatibility. This problem can be fixed
later once JVM IR is stabilized.

 #KT-43111 Fixed
2020-12-02 20:53:47 +01:00
Dmitry Petrov 47e2656ca9 JVM_IR keep track of original overrides at collection stubs generation
KT-43068
2020-11-11 18:35:41 +03:00
Dmitry Petrov e10d8e51b6 JVM_IR more precise superclass stub filtering
Filter out abstract members of superclasses when generating collection
stubs.

KT-43207
2020-11-10 16:41:45 +03:00
Dmitry Petrov ee5edf4caa JVM_IR fix 'remove' in inline class implementing MutableCollection 2020-10-16 00:02:12 +03:00
Dmitry Petrov d623f4d1d6 Add test for KT-40190 2020-10-14 16:05:15 +03:00
Dmitry Petrov 052f345a17 JVM_IR no generic signatures for abstract stubs KT-42609 2020-10-13 19:20:29 +03:00
Dmitry Petrov c8bf74c7d5 Bytecode listing test fails if JVM and JVM_IR have same testData 2020-10-13 19:20:29 +03:00
Dmitry Petrov af86c52101 JVM_IR merge annotations when substituting types
Otherwise special annotations such as @EnhancedNullability are lost,
which affects JVM signatures.

KT-42330
2020-09-30 15:44:54 +03:00
Dmitry Petrov f79afd67f4 Add more tests for collections implemented by delegation 2020-09-29 22:44:00 +03:00
Dmitry Petrov 79a2d9858c JVM_IR emulate JVM stub generation scheme
KT-42114
KT-42115
2020-09-29 21:06:30 +03:00
Dmitry Petrov 1fc459ab4c JVM_IR KT-42260 add abstract overrides for generated stubs 2020-09-29 14:06:12 +03:00
Dmitry Petrov d9906ae8da Minor: unmute some bytecode listing tests in JVM_IR 2020-09-28 21:48:14 +03:00
Dmitry Petrov 70095712eb Minor: drop new bytecode listing test that passes only in JVM_IR
Unfortunately, there's no way to mute it in JVM right now.
Corresponding case is tracked as KT-42179, anyway.
2020-09-25 13:49:53 +03:00
Dmitry Petrov cfd62c15bf JVM_IR KT-36994 don't generate stub if present in superclass 2020-09-25 11:57:33 +03:00
Dmitry Petrov 1adce11257 Add tests for KT-40191 2020-09-25 11:57:32 +03:00
Dmitry Petrov 1c4567c999 Add tests for KT-40152 2020-09-23 18:14:21 +03:00
Dmitry Petrov 99dbeecc40 Some more bytecode listing tests for JVM_IR 2020-09-23 18:14:20 +03:00
Dmitry Petrov c03573fc18 JVM_IR fix override equivalence check for collection stub generation
KT-42043 KT-42033
2020-09-22 15:26:34 +03:00
Dmitry Petrov 89a0b3e944 Check class source in bytecode listing tests 2020-07-27 19:13:37 +03:00
Dmitry Petrov 84baa0b4c2 Check more flags in bytecode listing tests 2020-02-26 12:03:37 +03:00
Mark Punzalan b782e8f0f0 Add IR equivalent of AbstractBytecodeListingTest and muted failures. 2020-02-13 23:44:53 +03:00
Toshiaki Kameyama 4d9b19da82 Remove comments from function/property implementation template
#KT-18539 Fixed
2019-11-13 08:37:25 +09:00
Yan Zhulanow 328286ab14 Use box tests to check if the light analysis mode (without analyzing bodies when possible) produces the same result as the complete analysis. See also the next commit in which light analysis mode is applied. Note that no tests were changed. 2016-12-05 19:57:47 +03:00
Denis Zharkov 6e838f0adc Avoid generation of redundant toArray stubs
#KT-13698 In Progress
2016-10-07 11:59:15 +03:00
Denis Zharkov e05e0ec921 Optimize method count for collection stubs
Do not generate stubs if they're already present in superclasses

 #KT-13698 In Progress
2016-10-07 11:59:15 +03:00