Commit Graph

491 Commits

Author SHA1 Message Date
Mikhael Bogdanov ab96e0102a Support IrGetClass 2018-01-16 11:53:18 +01:00
Mikhael Bogdanov 9a1f484771 Fix equals 2018-01-16 11:53:18 +01:00
Mikhael Bogdanov 3e1f471121 Rollback change in 'usesDefaultArguments' 2017-12-20 10:58:35 +01:00
Mikhael Bogdanov 32b90a1cae Generate type checker barriers in bridges 2017-12-20 10:48:52 +01:00
Mikhael Bogdanov be18cb9b16 Fix default methods visibility 2017-12-20 10:48:51 +01:00
Mikhael Bogdanov 9365d1d859 Remove redundant extra default mask for function with N*32 parameters 2017-12-20 10:48:51 +01:00
Mikhael Bogdanov ef5c3512cd Skip FAKE_OVERRIDE fields 2017-12-20 10:48:50 +01:00
Mikhael Bogdanov aeb74f7e70 Skip bridge generation for non real declaration on first step they would be processed later
~

~
2017-12-20 10:48:50 +01:00
Mikhael Bogdanov 4657ae06f4 Don't cast receiver to super type on super calls 2017-12-20 10:48:49 +01:00
Mikhael Bogdanov a936f75423 Fix empty vararg processing in intrinsics 2017-12-20 10:48:49 +01:00
Mikhael Bogdanov 420b9fdaa9 Support interface companion object lowering 2017-12-20 10:48:48 +01:00
Mikhael Bogdanov 24336113a2 Support class companion object lowering 2017-12-20 10:48:48 +01:00
Mikhael Bogdanov 224adfabc5 Support synthetic accessors for constructors 2017-12-20 10:48:47 +01:00
Mikhael Bogdanov 5cbfdf6024 SyntheticAccessorLowering refactoring 2017-12-20 10:48:47 +01:00
Mikhael Bogdanov 7da847e943 Fix coercion after call 2017-12-20 10:48:46 +01:00
Mikhael Bogdanov 4df0a1bb1f Fix parameter indices on lowering 2017-12-20 10:48:46 +01:00
Mikhael Bogdanov 0729566458 Support javaClass for Void type 2017-12-20 10:48:45 +01:00
Mikhael Bogdanov f7968e1b61 Fix inner class lowering: don't try to process nested classes on processing outer 2017-12-20 10:48:45 +01:00
Mikhael Bogdanov dde0535c5a Fix cast for IMPLICIT_NOTNULL 2017-12-20 10:48:44 +01:00
Mikhael Bogdanov 05b56b0c4a Update ArrayConstructor to support inline 2017-12-20 10:48:44 +01:00
Mikhael Bogdanov 665a697093 Support simple function inlining in ir 2017-12-20 10:48:43 +01:00
Mikhael Bogdanov 4711e2f9da Don't use kind for static check
Lowers should perform proper transformations
2017-12-20 10:48:42 +01:00
Mikhael Bogdanov 3432014971 Add 'generateModule' method to CodegenFactory 2017-12-20 10:48:41 +01:00
Mikhael Bogdanov 06fd996266 Switch LocalFunctionLowering to LocalDeclarationLowering 2017-12-20 10:48:41 +01:00
Mikhael Bogdanov 1f053be289 Support default function lowering 2017-12-20 10:48:40 +01:00
Mikhael Bogdanov 83710a8ed6 HACK: process unbound symbols 2017-12-20 10:48:40 +01:00
Mikhael Bogdanov 5032064bf0 Enable tailrec lower 2017-12-20 10:48:39 +01:00
Mikhael Bogdanov 84e960b3a4 Enable lateinit lowering 2017-12-20 10:48:39 +01:00
Mikhael Bogdanov 039e036e22 Support IrExpressionBody in codegen 2017-12-20 10:48:38 +01:00
Mikhael Bogdanov e16bdd4287 Switch JvmBackendContext to CommonBackendContext
(cherry picked from commit 5d4736c)
2017-12-20 10:48:37 +01:00
Denis Zharkov ac56965a99 Do not force loading all kt-files inside LazyPackageDescriptor constructor
Effectively it leads to all stubs being built for any once used package

The idea is that they only were used for FILE_TO_PACKAGE_FRAGMENT
that is mostly read in backend and rarely in the IDE, so we can replace
its usages with searching through related package-fragments
2017-12-07 12:53:33 +03:00
Igor Chevdar d4d3f237ee Fix for package level lateinit properties 2017-11-17 13:48:17 +03:00
Mikhael Bogdanov cbfcb74b58 Get rid of cli dependencies from ir 2017-11-16 14:46:53 +01:00
Alexander Udalov 56a51c1d22 Do not treat annotation classes as interfaces in bridges codegen
From Kotlin's point of view, everything in annotation classes is
non-abstract. A class inheriting from an annotation has a non-abstract
fake override for each property of the annotation class constructor. But
because members of annotation classes themselves were considered as
abstract in the bridge-generating code (see
DescriptorBasedFunctionHandle.isAbstract), there was a situation where a
concrete fake override has only one declaration among overridden
descriptors and it was abstract. This situation is invalid (a concrete
fake override must have exactly one concrete super-declaration),
therefore an exception was thrown.

The fix is to avoid considering annotation class members abstract for
the purposes of bridge generation. It's reasonably safe because no
bridges should be ever generated for annotation subclasses anyway,
because annotations can only have members with simple return types
(final and non-generic).

Note that in KT-19928, the problem is reproducible because of an
incorrect "inexact analysis" in light classes where "Target" is resolved
to an annotation class kotlin.annotation.Target. This behavior of the
analysis in light classes seems to do no harm otherwise, so it's not a
goal of this commit to change anything in that regard

 #KT-19928 Fixed
2017-11-02 14:02:09 +01:00
Dmitry Petrov c2b9803933 Generate source information for synthesized data class members
For now, bind such elements to data class declaration.

 #KT-20443 Fixed
2017-10-31 17:34:32 +03:00
Alexander Udalov dc02b2e3ab Fix TypeConstructor.isFinal for synthetic class descriptors
As in LazyClassTypeConstructor.isFinal, check if the class modality is
Modality.FINAL
2017-10-16 15:08:50 +02:00
Denis Zharkov 1c9b454d90 Rename KotlinTypeFactory::simpleType to simpleTypeWithNonTrivialMemberScope
To state it must be used only for limited number of cases
2017-10-10 18:27:00 +03:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov 27968c8e13 Set proper jvmTarget for projects 2017-09-19 21:37:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Stanislav Erokhin e86d2f00ff Rename isImpl to isActual in descriptors 2017-09-15 18:25:49 +03:00
Stanislav Erokhin c8ee424f67 Rename isHeader to isExpect in descriptors 2017-09-15 18:25:41 +03:00
Dmitry Petrov 3bae430d49 Resolve lateinit variables
Do not report UNINITIALIZED_VARIABLE on lateinit variables
Provide delegating constructors for descriptors for compatibility.
2017-08-31 11:28:08 +03:00
Mikhael Bogdanov 68522b9f1e Use lazy logging in lowers 2017-08-30 10:41:55 +02:00
Mikhail Glukhikh 9dc5354f24 Eliminate some warnings (mostly redundant is checks in whens) 2017-08-18 15:16:59 +03:00
Mikhail Glukhikh 3623f581b8 Eliminate a set of warnings, mostly nullability ones 2017-08-18 15:10:27 +03:00
e5l 5fd8f93b0e Fix a typo: Defaul -> Default 2017-08-15 11:01:08 +03:00
Mikhael Bogdanov 82c3637d91 Wide visibility in ir common stuff 2017-08-09 12:07:38 +02:00
Valentin Kipyatkov 9361cd895c Support for import aliases in code completion
#KT-8848 Fixed
2017-08-08 22:06:04 +03:00