Commit Graph

44 Commits

Author SHA1 Message Date
Dmitry Petrov 4ec369ac5b JVM_IR fix special bridge generation for inline classes 2021-02-01 17:57:58 +03:00
Dmitry Petrov a157b58c61 JVM_IR KT-43610 keep track of "special bridges" for interface funs 2020-11-30 15:49:01 +03:00
Dmitry Petrov 498047e64e KT-43562 don't remap static inline class funs as special builtins 2020-11-25 17:31:46 +03:00
Dmitry Petrov ee5edf4caa JVM_IR fix 'remove' in inline class implementing MutableCollection 2020-10-16 00:02:12 +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 df64bb3eb7 JVM_IR emulate JVM hack for generic signatures in KT-18189
KT-40307

See also KT-42609
2020-10-12 21:14:48 +03:00
Dmitry Petrov 91b8e32d43 Add ABI tests for classes extending Number and CharSequence 2020-10-09 16:36:35 +03:00
Dmitry Petrov a412596d8e JVM_IR emulate old back-end behavior in special bridges + inline classes
KT-42491 KT-42539
2020-10-09 16:06:08 +03:00
Dmitry Petrov e018f2bd3e JVM_IR more precise check for special bridges in super class
KT-41123
2020-10-02 12:51:49 +03:00
Dmitry Petrov d9906ae8da Minor: unmute some bytecode listing tests in JVM_IR 2020-09-28 21:48:14 +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 ee3ada4e55 JVM_IR KT-40304 KT-41998 special handling for 'removeAt' 2020-09-18 14:27:36 +03:00
Dmitry Petrov 54d5494ecd JVM_IR special handling for 'remove' collection method stub 2020-09-16 15:36:16 +03:00
Dmitry Petrov b395771d01 KT-37050 don't generate redundant special bridges
Loosely based on https://github.com/JetBrains/kotlin/pull/3662
2020-09-14 16:13:34 +03:00
Alexander Udalov b9243aad24 Minor, fix test data in bytecodeListing/specialBridges 2020-07-28 12:12:39 +02:00
Dmitry Petrov 89a0b3e944 Check class source in bytecode listing tests 2020-07-27 19:13:37 +03:00
Steven Schäfer 9d63412b3e JVM IR: Produce correct generic signatures for special bridge methods 2020-07-27 17:02:24 +02:00
Dmitry Petrov 0741781462 Compare inner class access flags in bytecode listing tests 2020-07-23 19:13:28 +03:00
Mikhail Bogdanov b8f0ad2111 Generate nullability annotations on this receiver in DefaultImpls. Don't generate nullability annotations in private methods
#KT-36969 Fixed
2020-06-19 11:57:35 +02:00
Alexander Udalov 5647a935a2 JVM IR: do not generate DefaultImpls delegate for collection fake overrides
In the newly added test, prior to this change, JVM IR was generating
DefaultImpls classes with calls to things like
`kotlin/collections/MutableList$DefaultImpls.spliterator` and other
default methods present in JDK 8+. This obviously didn't make much
sense. Although these weren't explicitly mentioned anywhere in the
bytecode, they caused some validation tools to report errors (e.g.
animalsniffer used in arrow).
2020-06-04 14:27:46 +02:00
Steven Schäfer 34fb636904 JVM: Generate generic signatures for delegate fields 2020-03-06 21:51:30 +01: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
Alexander Udalov f3f8db989a Fix test data for annotations on DefaultImpls members
After ea5505f80c, the annotations are now generated correctly
2017-12-27 14:12:14 +01:00
Dmitry Petrov 17d2472511 Do not patch generic signature for methods with special bridges
Somewhat awkward solution for KT-18189.
2017-05-31 10:18:48 +03:00
Dmitry Petrov fd00a6fbe8 Generate generic signatures for special bridges
#KT-12408 Fixed Target versions 1.1.4
2017-05-31 10:18:48 +03:00
Dmitry Petrov 48a60e6f39 Dump generic signatures in bytecode listing tests if required
Add '// WITH_SIGNATURES' to test file if generic signatures should be
dumped.
2017-05-31 10:18:48 +03:00
Denis Zharkov dfb9b323ff Avoid generation of redundant abstract special stubs
#KT-13698 Fixed
2016-10-07 11:59:15 +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 8ee568105c Do not generate collection stubs for Kotlin-specific signatures
#KT-14188 Fixed
2016-10-07 11:59:15 +03:00
Denis Zharkov 84eb009c29 Refine stubs generation for special built-ins
Do not generate stub if declaration has the same signature

 #KT-12909 Fixed
2016-06-30 20:12:34 +03:00
Denis Zharkov 5c34b27ea9 Fix stub generation for special built-ins
Do not generate stubs if there is no special bridge in the current class
- there are already Kotlin super class in hierarchy
- special bridge has the same signature as method itself

 #KT-11915 Fixed
2016-06-30 20:12:34 +03:00
Alexander Udalov 2200bfcc85 Simplify ImplementationBodyCodegen#generateToArray
- don't do anything for interfaces because there's no point in generating
  abstract methods which are already abstract in supertypes
- don't use getDeclaredFunctionByRawSignature, check function signature
  manually instead
- don't use isOrOverridesSynthesized because 'toArray' is never synthesized
2016-05-20 00:54:18 +03:00
Alexander Udalov b208995d73 Render different class kinds differently in bytecode listing test 2016-05-20 00:36:56 +03:00
Denis Zharkov 12552d2fc1 Refine special bridges generation
#KT-10958 Fixed
2016-02-10 20:18:46 +03:00
Alexander Udalov 5de1cf3bb4 Do not write old metadata annotations to bytecode 2016-02-06 15:53:55 +05:30
Alexander Udalov e37bd4eba6 Do not write and read KotlinInterfaceDefaultImpls
This was only used in InlineTestUtil.kt and had no effect in the condition
2016-01-19 18:39:59 +03:00
Alexander Udalov 59dab0a558 Combine all metadata annotations into one kotlin/Metadata 2016-01-19 18:39:59 +03:00
Yan Zhulanow 3475b4796f Do not generate DefaultImpls if empty 2015-10-26 20:37:31 +03:00
Denis Zharkov 64da399b31 Do not generate builtin bridges with Kotlin signature as synthetic
They should be available in Java (at least for overridding)
2015-10-16 18:16:02 +03:00
Denis Zharkov d335f71dfe Generate special bridges for builtins with same name but different JVM descriptor 2015-10-16 18:16:02 +03:00
Denis Zharkov 07d8754adb Minor. Add bytecode listing tests with contains* methods 2015-10-16 18:16:02 +03:00