Commit Graph

977 Commits

Author SHA1 Message Date
Georgy Bronnikov 83ee705c0a IR: make IrClassReference.classType mutable 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 377940a6ea IR: handle IrVararg.varargElementType in RemapTypes 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 728c55973a IR: handle MemberAccessExpression type parameters in RemapTypes 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 3041a2815c IR: handle varargElementType in LocalDeclarationsLowering 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 67d7bf3269 IR: take care of supertypes when copying IrTypeParameters 2020-09-22 23:53:40 +03:00
Georgy Bronnikov 1f3d344835 IR: add RemapTypes.kt 2020-09-22 23:53:39 +03:00
Georgy Bronnikov df1d9a0113 IR: make IrTypeParameter.superTypes persistent mutable field 2020-09-22 23:53:39 +03:00
Georgy Bronnikov a409976d28 IR: make IrValueParameter.varargElementType mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov a3763e8276 IR: make IrTypeAlias.expandedType mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov 78fc690f29 IR: make IrLocaldelegatedProperty.type mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov 09a906cc9a IR: make IrTypeOperatorCall.typeOperand mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov d9681e535d IR: make IrField.type mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov 5065b1a4c6 Make IrValueDeclaration.type mutable 2020-09-22 23:53:38 +03:00
Georgy Bronnikov 1f37795e08 IR: make IrExpression.type mutable 2020-09-22 23:53:38 +03:00
Mads Ager 78483930bc [JVM_IR] Fix offsets in constant propagation optimization.
Loads of temporary variables that contain constants are replaced
with a copy of the constant. This avoids locals loads and stores.
However, the copy of the constant needs to have the offset of
the load and not of the original constant.

Fixes KT-41963.
2020-09-22 19:12:06 +02: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
Georgy Bronnikov 8343ca093c IR: bugfix in wrapped, IR-based descriptors 2020-09-17 19:16:03 +03:00
Georgy Bronnikov 3c0fbd5f45 IR: remove .toKotlinType() usage from coerceToUnit calls in lowerings 2020-09-17 19:16:03 +03:00
Roman Artemev 4da7e762fe [IR] Skip hidden parameters in WrappedDescriptors 2020-09-17 00:57:17 +03:00
Roman Artemev 1da2830e2b [IR] Support hidden parameters in ir builder 2020-09-17 00:57:16 +03:00
Roman Artemev f01941d1dd [IR] Support isHidden is IrFactory API
- add API to create a hidden value parameter
2020-09-17 00:57:16 +03:00
Roman Artemev 79e2886da1 [IR] Add isHidden flag into IrValueParameter 2020-09-17 00:57:15 +03:00
pyos a06181771f IR: make DescriptorMetadataSource a subtype of MetadataSource
FirMetadataSource is a metadata source too.
2020-09-16 18:58:40 +02:00
Alexander Udalov fc141a52da IR: minor, make IrClass.companionObject return IrClass 2020-09-13 09:13:26 +02:00
Alexander Udalov 2f86554d5a IR: don't produce fake overrides for static and private declarations
Note that only irrelevantStaticProperty.kt failed before this change.
Having private declarations caused no problems, but it seems incorrect,
so it's fixed now and irrelevantPrivateDeclarations is added just in
case.

 #KT-41848 Fixed
2020-09-12 20:01:34 +02:00
Georgy Bronnikov 92b03e7ede JVM_IR: Remove descriptor usage from IrSourceCompilerForInline 2020-09-12 12:59:03 +03:00
Alexander Gorshenev 744f290fc4 A proper modality calculation was missing in IR fake override construction algorithm
#KT-41765 Fixed
2020-09-11 18:56:17 +03:00
Igor Chevdar e39ce91253 [IR] Fixed fake override builder for lowerings 2020-09-11 09:35:01 +05:00
Steven Schäfer 44ffb1fb3e Psi2Ir: Fix SAM conversion with new inference 2020-09-08 11:14:14 +03:00
pyos f198a19ab0 FIR2IR: add local delegated property generation 2020-09-08 08:40:07 +03:00
Dmitry Petrov 5b53663eb8 PSI2IR KT-41181 don't generate deep trees in hashCode 2020-09-07 16:09:42 +03:00
Dmitriy Novozhilov d1fd1da56f Rename Visibility to DescriptorVisibility 2020-09-04 11:07:42 +03:00
Dmitry Petrov 475522f938 Represent raw types in IR using a special type annotation 2020-09-04 10:21:48 +03:00
Dmitry Petrov 714ab7c37f Handle java raw types in IR
Raw type Q is represented as a flexible type
  Q<B1, ... Bn> .. Q<*, ... *>
where Bi is a representative upper bound of the corresponding ith type
parameter of Q.
When mapping generic signature, JVM takes type arguments of lower bound
(which is 'Q<B1, ..., Bn>').

There is still some difference in how JVM and JVM_IR handle raw type in
signature. It requires additional investigation.
2020-09-04 10:21:48 +03:00
Roman Artemev fdbc657656 [IR] Fix isFileClass checker 2020-09-01 18:53:17 +03:00
Roman Artemev cae29a5d1c [IR] Clean up WrappedDescriptors API 2020-09-01 17:08:11 +03:00
Roman Artemev c7b57c0fb3 [IR] Use only empty constructor to create WrappedDescriptor 2020-09-01 17:08:11 +03:00
Roman Artemev fd88914cf9 [IR] Remove some descriptor usage from Common/JS/JVM backends
- replace descriptor-based builders with pure IR ones
 - fix matchers
 - fix Ir2Js
 - rewrite some inliner-helpers to pure-IR implementations
2020-09-01 17:08:11 +03:00
Dmitry Petrov 8cb8284957 EnhancedNullability annotation in IR
Fixes KT-40115 & KT-40117.

Move FlexibleNullability annotation to 'kotlin.internal.ir'.
2020-09-01 16:06:03 +03:00
Dmitriy Novozhilov f010dc533c Move Variance.convertVariance to :core:compiler.common 2020-09-01 12:00:11 +03:00
Igor Chevdar 12ddd137bc [IR] Moved isLambda to common IR utils 2020-08-31 12:01:29 +05:00
Roman Artemev 443269af0a [IR] Drop irProviders from stub generator 2020-08-28 18:14:05 +03:00
Roman Artemev 39808789c3 [KLIB] Fix SOE in K/N
- fixes KT-41324
2020-08-28 18:14:04 +03:00
Dmitriy Novozhilov 12fbb93871 [NI] Extract FE 1.0 specific part from NewCommonSuperTypeCalculator 2020-08-28 10:59:51 +03:00
Alexander Udalov 9d81e50128 IR: undeprecate IrUninitializedType
It's no longer a temporary hack, see the comment.
2020-08-27 18:02:04 +02:00
Alexander Udalov a9ddf02556 Replace deprecated usages of max/min with maxOrNull/minOrNull 2020-08-25 20:33:59 +02:00
Dmitriy Novozhilov a764732020 Rename KotlinBuiltInsNames to StandardNames 2020-08-25 10:41:33 +03:00
Dmitriy Novozhilov 20a2ad8223 Move FunctionClassDescriptor.Kind to :core:descriptors.common module 2020-08-25 10:31:36 +03:00
Dmitriy Novozhilov 7a7fe77b8e Move static constants with builtin names to :core:descriptors.common module 2020-08-25 10:31:36 +03:00
Roman Artemev a095909d5c [Plugin API] Provide special context in EP for link-time resolve
- requires to customize declarations from synthetic declarations
2020-08-24 15:37:39 +03:00