Commit Graph

63 Commits

Author SHA1 Message Date
Dmitry Petrov 08b761ae7a PSI2IR don't copy annotations for properties implemented by delegation
KT-43012
2020-10-29 16:23:02 +03:00
Alexander Udalov fbf56c054b JVM IR: fix names of $annotations methods for internal properties
#KT-40384 Fixed
2020-10-14 19:32:51 +02:00
Dmitry Petrov c8bf74c7d5 Bytecode listing test fails if JVM and JVM_IR have same testData 2020-10-13 19:20:29 +03:00
Alexander Udalov b8d16f3d46 Add EnclosingMethod information to bytecode listing tests 2020-09-02 16:46:05 +02:00
Alexander Udalov a639915a34 JVM IR: do not mangle property accessors of unsigned types in annotations
Before this change, we incorrectly mangled the names of annotation
methods (e.g. `getI-pVg5ArA` instead of `i`) because the isSpecial
condition was false.
2020-08-31 14:19:14 +02:00
Steven Schäfer 02e78bcd76 JVM IR: Use package visibility for fields of captured variables 2020-08-28 20:03:19 +02:00
Dmitry Petrov 89a0b3e944 Check class source in bytecode listing tests 2020-07-27 19:13:37 +03:00
Dmitry Petrov 0741781462 Compare inner class access flags in bytecode listing tests 2020-07-23 19:13:28 +03:00
Dmitry Petrov 2e31f95554 Update testData 2020-07-20 20:04:32 +03:00
Dmitry Petrov e4198466b8 JVM_IR: No nullability annotations on static lambda instances 2020-06-29 19:32:03 +03:00
Alexander Udalov b94a4d9fc3 Render more information on inner classes in bytecode listing tests 2020-06-29 17:33:39 +02:00
Dmitry Petrov 3f266aafb4 JVM: no nullability annotations on private and synthetic fields 2020-06-25 22:31:12 +03:00
Kristoffer Andersen b95d3e711e [JVM IR] KT-36985: $default respects @Deprecated
$default dispatch methods gains @Deprecated if the original function
with default arguments has it.
2020-06-25 18:43:45 +03:00
Dmitry Petrov 4e92c79bc4 JVM_IR: don't generate nullability annotations on synthetic declarations
Fixes KT-36993 and some other related issues.
2020-06-23 20:51:48 +03:00
Dmitry Petrov 5bfec7f6bc JVM: don't generate nullability annotations on property delegate fields
Such fields are private, so these annotations are redundant.

They were incorrect, anyway (property type was used instead of delegate
type).
2020-06-23 20:18:42 +03:00
Dmitry Petrov e9231b5624 JVM: Generate object and companion object INSTANCE fields as @NotNull 2020-06-22 16:28:00 +03:00
Dmitry Petrov 4739adb6dc KT-36992 Do not generate annotations on synthetic accessors
Also, do not generate nullability annotations on synthetic methods.
2020-06-17 23:54:51 +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
Alexander Udalov e2a42446ed Use getter names for $annotations methods in most codegen tests
This is needed to update master to 1.4, while still testing the latest
compiler by default. Also add one test on the old behavior.
2019-12-30 16:29:13 +01:00
Ilya Chernikov f38bb19fc6 [minor] Fix testdata for compiler 1.4 2019-12-19 14:01:01 +01:00
Alexander Udalov 01ddac58e1 Add language feature for changed name of property annotations method
#KT-31352 Fixed
2019-08-12 16:48:26 +02:00
Alexander Udalov ea0142da60 Use JVM name of getter in synthetic method for property annotations
#KT-31352 In Progress
2019-08-12 16:48:25 +02:00
Mikhael Bogdanov 3b57ceeafe Don't generate annotations on $default methods
#KT-29965 Fixed
2019-02-19 10:51:37 +01:00
Mikhael Bogdanov d2a205c72d Update synthetic parameter processing logic according to ASM 7 changes
#KT-27774 Fixed
2018-11-07 15:42:57 +01:00
Alexander Udalov 17d740a373 Do not try computing return type in OverloadChecker
Return type is not needed for checking overloads, but querying it may
involve resolving function bodies, which usually happens after overload
checking (see LazyTopDownAnalyzer.analyzeDeclarations) and at this point
can lead to incorrect BACKING_FIELD_REQUIRED value being computed for
some properties (see KT-27895)

 #KT-27895 Fixed
2018-11-07 11:00:15 +01:00
Mikhael Bogdanov 1face1c334 Don't generate annotations on synthetic accessor parameters 2018-09-19 12:14:09 +02:00
Mikhael Bogdanov 9e6637dced Don't generate additional annotations on synthetic accessors 2018-09-14 16:23:57 +02:00
Dmitry Petrov acf0bb349c Update testData for restricted expression annotations retention 2018-07-20 10:39:51 +03:00
Mikhael Bogdanov d24ebf711b Fix for KT-16441: NoSuchFieldError: $$delegatedProperties when delegating through provideDelegate in companion object
#KT-16441 Fixed
2017-02-21 13:01:40 +01:00
Alexander Udalov 0db60bf6cb Do not always generate synthetic "$annotations" as private
Since annotations are a part of the declaration, they must have the same
visibility as the declaration in the bytecode. Otherwise obfuscators like
Proguard might strip the "$annotations" method and no annotations would be
found via Kotlin reflection

 #KT-15993 Fixed
2017-02-03 19:35:15 +03:00
Yan Zhulanow e31a39386e Minor: Fix testDeprecatedJvmOverloads test (Kotlin runtime is not enabled by default now in bytecode listing tests) 2016-12-05 19:58:06 +03: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
Dmitry Jemerov a57748f4f4 @JvmOverloads-generated overloads of final methods are also final; test to verify that overloads of deprecated methods are deprecated 2016-11-18 11:05:03 +01:00
Michael Bogdanov ca41f01468 Generate interface property annotations in interface class (not in DefaultImpls) 2016-10-03 13:50:12 +03:00
Alexander Udalov b208995d73 Render different class kinds differently in bytecode listing test 2016-05-20 00:36:56 +03:00
Alexander Udalov 994dc46bcd Write nullability annotations on extension receiver parameters
#KT-5429 Fixed
2016-03-11 15:20:32 +03:00
Alexander Udalov 9f786c00a7 Fix test data after removing old annotation classes 2016-02-07 10:03:19 +05:30
Alexander Udalov 5de1cf3bb4 Do not write old metadata annotations to bytecode 2016-02-06 15:53:55 +05:30
Mikhail Glukhikh 84100abd9e Annotations on object literals are now correctly resolved #KT-9320 Fixed 2016-02-01 16:24:57 +03:00
Alexander Udalov aef6d49b48 Drop isLocalClass, do not write KotlinLocalClass 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
Mikhail Glukhikh e4f7446bec JvmSynthetic forbidden for delegated properties (and searched for different use-site targets) 2016-01-19 11:38:53 +03:00
Mikhail Glukhikh b78d481bb1 delegate use-site targeted annotations: parser, front-end, codegen with some tests #KT-10502 Fixed 2016-01-19 11:38:41 +03:00
Mikhail Glukhikh 3fb04aceb9 Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Natalia Ukhorskaya 67dd97b918 Mark bridge methods in lambdas classes as synthetic
#KT-10101 Fixed
2015-11-26 11:39:19 +03:00
Yan Zhulanow 3475b4796f Do not generate DefaultImpls if empty 2015-10-26 20:37:31 +03:00
Michael Bogdanov c8c3e88c82 Make top-level property backing field private in bytecode 2015-10-19 19:09:30 +03:00
Dmitry Petrov 621d26aeeb Drop package facades: fix incremental compilation tests & proto comparison tests
(package facades are no longer generated)
2015-10-19 16:03:21 +03:00
Dmitry Petrov 3502c393fc Drop package facades: JVM BE tests passed. 2015-10-19 16:03:16 +03:00