Dmitry Petrov
5480bf69e8
Support property delegation to inline class values (KT-27070)
2018-10-03 11:09:46 +03:00
Dmitry Petrov
70e60ea9bc
Fix inline class coercion in string template with StringBuilder.append
...
Inline class values with array as a carrier type were not boxed.
#KT-27113
2018-10-03 11:09:41 +03:00
Alexander Udalov
009f18f1f4
Split AnalysisFlag values to AnalysisFlags and JvmAnalysisFlags
...
Declare AnalysisFlags in module 'frontend', and JvmAnalysisFlags in
module 'frontend.java', to avoid leaking Java-related logic to common
compiler code
2018-10-01 13:31:00 +02:00
Dmitry Petrov
7b7cf39388
Fix inline classes coercion in 'if' expression
...
#KT-27132
2018-09-28 10:46:42 +03:00
Dmitry Petrov
7624dbbb20
Fix subject variable handling in specialized enum codegen
...
#KT-27161
2018-09-27 10:48:35 +03:00
Dmitry Petrov
792ff3c39e
Generate private interface companion object as package-private synthetic
2018-09-27 10:35:23 +03:00
Dmitry Petrov
7949ac1080
Use common instance receiver generation logic for 'this' expression
...
Otherwise it would skip private companion object accessor generation.
2018-09-27 10:35:23 +03:00
Dmitry Petrov
850d72f13f
Fix accessor generation for inline class members
...
TODO 'generateMethodCallTo' is a bloody mess that deserves rewriting.
2018-09-25 11:15:29 +03:00
Dmitry Petrov
edc8cf3ed0
Use proper type for context 'this'
...
Bug in 'generateThisOrOuterFromContext', it worked while instance of a
class was always an object.
#KT-27078
2018-09-25 11:15:29 +03:00
Dmitry Petrov
2e6d53a43f
Fix extension receiver coercion for inline classes
...
#KT-27031
2018-09-25 11:15:29 +03:00
Dmitry Petrov
20d7210239
Fix outer class mapping for closures in inline class
...
#KT-27030
#KT-27033
2018-09-25 11:15:29 +03:00
Dmitry Petrov
f9a419f940
Fix companion method access from inline class
...
#KT-27025
2018-09-25 11:15:29 +03:00
Dmitry Petrov
1869ed09bc
Fix companion field access from inline class
...
#KT-26858
2018-09-25 11:15:29 +03:00
Dmitry Petrov
6022fb4ec3
Fix default impl for suspend fun
...
We have an extra parameter in the mapped signature, and don't care about
Kotlin types there (so far). Might be a better idea to obtain the actual
descriptor for a suspend function (with extra parameter), and pass
arguments accordingly.
2018-09-21 09:48:11 +03:00
Dmitry Petrov
0f898dc6dc
Fix default interface generic extension fun call with inline class type
...
When we've determined that we are going to invoke an erased inline class
method ('static foo-impl(this, ...)' in inline class), keep track of it
so that the remaining type mapping logic proceeds correctly.
#KT-26998 Fixed Target versions 1.3.20
2018-09-21 09:48:11 +03:00
Dmitry Petrov
95010de32e
Minor: renaming
2018-09-21 09:48:11 +03:00
Dmitry Petrov
8d2b1950e6
Fix Kotlin default interface methods calls for inline classes
...
When mapping callable method signature for erased inline class methods,
use original function descriptor instead of super declaration
(otherwise it would map to a default interface method with mismatching
signature).
When generating delegates to Kotlin default interface methods, keep
track of the original Kotlin types for delegating method arguments and
interface method arguments.
'original' for value parameters of fake overrides points to the
overridden function value parameters instead of the value parameter of
the unsubstituted function. This causes inconsistent type mapping for
inline classes implementing generic interfaces with default methods.
#KT-25295 Fixed Target versions 1.3.20
#KT-26931 Fixed Target versions 1.3.20
2018-09-21 09:48:11 +03:00
Dmitry Petrov
8536ef5b43
Minor: reformat
2018-09-21 09:48:11 +03:00
Dmitry Petrov
947ea88d5e
Refactor: pull up and extract method
2018-09-21 09:48:11 +03:00
Ilmir Usmanov
7b1c564b87
Replace ALOAD 0 with fake continuation if suspension point is default
...
method
#KT-25922 Fixed
#KT-26608 Fixed
#KT-26658 Fixed
2018-09-19 22:14:29 +03:00
Mikhael Bogdanov
1face1c334
Don't generate annotations on synthetic accessor parameters
2018-09-19 12:14:09 +02:00
Mikhael Bogdanov
38652372ce
Generate private constructors for Enums
...
#KT-2680 Fixed
#KT-16867 Fixed
2018-09-19 12:14:08 +02:00
Mikhael Bogdanov
c753a98d02
Use section constants to generate smap data
2018-09-19 12:14:07 +02:00
Mikhael Bogdanov
a789fd92fe
Properly parse smap information
...
#KT-23369 Fixed
2018-09-19 12:14:07 +02:00
Ilmir Usmanov
5dea245a37
Fix linenumbers written to debug metadata
...
#KT-26848 Fixed
2018-09-18 20:06:25 +03:00
Ilmir Usmanov
3bb405bee4
Minor. Move SUSPENSION_POINT_INSIDE_MONITOR to ErrorsJvm
2018-09-17 20:22:49 +03:00
Ilmir Usmanov
35056543a2
Fix LVT entries of 'this' and parameters in coroutine code
...
#KT-24510 Fixed
2018-09-17 20:03:51 +03:00
Ilmir Usmanov
2dd5b8fa70
Forbid suspension points in critical sections
...
#KT-26480: Fixed
2018-09-17 19:29:51 +03:00
Mikhail Zarechenskiy
ea69d26bac
Don't throw exception on error types in light classes mode
...
#KT-26829 Fixed
#KT-26827 Fixed
2018-09-17 16:21:07 +03:00
Mikhail Zarechenskiy
fa9a3868b7
Make generation of assertions for platform types aware of kotlin types
...
#KT-26859 Fixed
2018-09-17 16:21:06 +03:00
Mikhael Bogdanov
9e6637dced
Don't generate additional annotations on synthetic accessors
2018-09-14 16:23:57 +02:00
Mikhael Bogdanov
b7afb4a58e
Generate enum entries classes with package private visibility
...
#KT-6574 Fixed
2018-09-14 16:23:57 +02:00
Alexander Udalov
5dc563a9af
Split deprecationUtil.kt to several files, move to subpackage
...
Also move interface Deprecation to subpackage "deprecation"
2018-09-14 14:43:23 +03:00
Mikhael Bogdanov
03f092fd39
Revert "Generate private constructors for Enums" cause of bootstrap problem
...
This reverts commit 81435c9
2018-09-13 17:07:56 +02:00
Mikhael Bogdanov
81435c98fa
Generate private constructors for Enums
...
#KT-2680 Fixed
#KT-16867 Fixed
2018-09-13 10:09:58 +02:00
Ilmir Usmanov
e9fc65c7ae
Use our own primitive boxing methods in coroutines codegen
...
#KT-26490 Fixed
2018-09-12 15:36:17 +03:00
Dmitry Petrov
792c5f8b3f
Generate metadata and annotations for hidden constructor
...
Reflection expects to see a callable method for a hidden constructor,
thus, it should be a synthetic accessor.
JVM method signature in metadata should point to the synthetic accessor.
Annotations for hidden constructor should be written on the synthetic
accessor.
2018-09-12 15:33:11 +03:00
Denis Zharkov
9cb8a35275
Minor. Pull user-data related things to CallableDescriptor
...
Currently, we assume user data for all non-FunctionDescriptor
declarations is empty
2018-09-12 09:49:25 +03:00
Denis Zharkov
c1cc722ac4
Turn off incorrect switch-optimization for when by enums
...
#KT-24708 Fixed
2018-09-12 09:49:25 +03:00
Denis Zharkov
fc3c4ad883
Support parameterless and suspend main functions in multifile classes
...
#KT-26574 Fixed
2018-09-12 09:49:25 +03:00
Denis Zharkov
b53194ef1a
Minor. Drop unused method in FunctionCodegen
2018-09-12 09:49:25 +03:00
Denis Zharkov
38be1f6947
Minor. Parametrize MainFunctionDetector with LanguageVersionSettings
2018-09-12 09:49:25 +03:00
Denis Zharkov
bc722f9c5f
Support main entry-point without arguments in JVM
...
#KT-26574 In Progress
2018-09-12 09:48:13 +03:00
Denis Zharkov
3cf1c56794
Minor. Get rid of static public parts in MainFunctionDetector
...
In further commits, MainFunctionDetector::isMain will use
getFunctionDescriptor property
2018-09-12 09:48:13 +03:00
Denis Zharkov
c3f6ba3302
Support suspend fun main in JVM
...
#KT-17679 Fixed
2018-09-12 09:48:13 +03:00
Yan Zhulanow
64e85e8a0c
Support new $this_<label> field naming convention in debugger
2018-09-11 16:41:21 +03:00
Yan Zhulanow
d16b55033e
Introduce new naming convention for captured receiver backing fields
...
'receiver$0' -> '$this_<label>'
2018-09-11 16:41:20 +03:00
Yan Zhulanow
11d4a6bf5c
Refactoring: Rename closure methods in CalculatedClosure, add a method for getting receiver labels
2018-09-11 16:40:44 +03:00
Yan Zhulanow
6f7741b6bb
Minor: Move AbstractParcelBytecodeListingTest to compiler tests, change its format a bit
2018-09-11 16:40:43 +03:00
Mikhail Zarechenskiy
2a04df531a
Fix exception: don't try to map value of error type
...
#EA-127029 Fixed
2018-09-11 10:39:20 +03:00