Dmitry Jemerov
3c7678092e
Don't mark compiler-created PSI elements as generated
...
This saves some memory on storing the generated flag in the PsiElement
userdata and time required to store the flag.
2017-03-22 13:59:21 +01:00
Mikhail Glukhikh
b121bf8802
Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
2017-03-15 17:35:31 +03:00
Mikhail Glukhikh
d0cc1635db
Cleanup: apply "Use synthetic property access syntax"
2017-03-15 16:13:40 +03:00
Denis Zharkov
c362a9154b
Rename SUSPENDED_MARKER to COROUTINE_SUSPENDED
2017-01-27 23:24:13 +03:00
Denis Zharkov
0e132b9857
Move all coroutine-related declarations from built-ins to stdlib
...
Also move internal declarations from runtime.jvm module into new package
kotlin.coroutines.jvm.internal in stdlib
The necessity of these declarations being in built-ins is controversial,
but also it will complicate the migration of current coroutine runtime
to a separate jar if we ever need this
2017-01-27 23:24:13 +03:00
Denis Zharkov
b61c152b4e
Minor. Drop a couple of unused properties
2017-01-27 23:24:13 +03:00
Alexey Andreev
d261f8eddf
Move generation of fake call to common CodegenUtil to share between JS and JVM
2017-01-24 20:09:31 +03:00
Denis Zharkov
2cb9d3a8ad
Move coroutine intrinsics to kotlin.coroutine.intrinsics package
...
Also rename val SUSPENDED to SUSPENDED_MARKER
#KT-15698 Fixed
2017-01-14 13:24:53 +03:00
Alexey Andreev
7f0166623d
JS: when none of exhaustive when clauses match, generate code that throws exception. See KT-12194
2016-12-30 16:20:00 +03:00
Denis Zharkov
8475869fb3
Support common calls on suspend function typed values
...
Also support multiple value parameters in suspend function type
#KT-15379 Fixed
#KT-15380 Fixed
2016-12-22 11:15:52 +03:00
Alexander Udalov
482b43631c
Refactor DelegationChecker and related code
...
- move getDelegates from CodegenUtil to DelegationResolver, reuse it in
DelegationChecker
- use getAllOverriddenDescriptors + filterOutOverridden instead of a manual DFS
2016-12-20 17:28:50 +03:00
Stanislav Erokhin
0132f3eea7
Remove kotlin.coroutine package from default imports.
2016-12-15 23:57:51 +03:00
Denis Zharkov
6649f64e9f
Support new coroutine convention in JVM backend
2016-12-15 23:57:40 +03:00
Roman Elizarov
8affb2726f
Pluggable Synthetic Objects
2016-12-12 18:43:26 +03:00
Alexey Andreev
060f08a8dd
JS: add support of interceptResume function in coroutine controller
2016-12-09 14:56:20 +03:00
Alexey Andreev
bdda04243d
JS: support new coroutine convention (see KT-15058)
2016-12-09 14:56:19 +03:00
Alexander Udalov
1cfb8f2aef
Use OverridingUtil#overrides instead of CodegenUtil#doesOverride
...
This may be more correct in case of complex cross-module inheritance, where
overridability should be detected by structural equality of signatures instead
of referential equality of constructed descriptors (no test added because it's
not so easy to come up with an example)
2016-10-25 15:42:34 +03:00
Alexey Andreev
aa5d15cff7
KT-2752: minor fixes after code review
2016-10-08 19:25:43 +03:00
Alexander Udalov
73652f309f
Do not create synthesized equals/hashCode/toString in data classes in compatibility mode
...
To simplify migration from 1.0 to 1.1, do not allow data classes to
automatically implement abstract equals/hashCode/toString declared in
super-interfaces (KT-11306) if "-language-version 1.0" is specified
2016-10-04 10:24:41 +03:00
Denis Zharkov
bb1b8cca20
Fix AssertionError in CodegenUtil.getDelegates
...
Change getAllOverriddenDescriptors contracti, now it returns
original (not substituted) descriptors without any duplicates.
First of all it's necessary in CodegenUtil.getDelegates to avoid
duplicates (see assertion there), but also it's convenient for all
other usages of this method
#KT-8154 Fixed
2016-09-28 11:40:35 +03:00
Denis Zharkov
49fee026fc
Minor. Simplify CodegenUtil.getDelegates
2016-09-28 11:40:20 +03:00
Denis Zharkov
217f033552
Prevent generation of delegations to interfaces private methods
...
#KT-13381 Fixed
#KT-13996 Fixed
2016-09-23 14:51:14 +03:00
Alexander Udalov
fea116f14e
Allow data classes to implement equals/hashCode/toString from base classes
...
#KT-11306 Fixed
2016-09-15 16:45:48 +03:00
Michael Bogdanov
69dc18b8b4
Proper concrete implementation filtering in java 8 interface case
2016-09-12 12:59:31 +03:00
Michael Bogdanov
4b0c272e19
'toString' implementation in DescriptorBasedFunctionHandle
2016-09-12 12:59:31 +03:00
Alexander Udalov
d945c33d5e
Move some members from OverrideResolver to OverridingUtil
2016-07-25 15:55:31 +03:00
Denis Zharkov
2d42ba23b3
Minor. Replace TraitImpl -> DefaultImpls, Trait -> Interface
...
There are still a lot of trait word entries in the source code,
only some of them got replaced here
2016-07-12 16:27:48 +03:00
Mikhael Bogdanov
bb59638039
Support bridges in interfaces. Fix for KT-12416: Missed bridges in js backend
...
#KT-12416 Fixed
2016-06-15 13:43:28 +03:00
Stanislav Erokhin
a6da15f8e2
Minor. remove several methods from TypeUtils
2016-06-09 12:58:02 +03:00
Alexander Udalov
1c8272d3f1
Simplify data class function generation and signature lookup code
...
- change prerequisites for generating equals/hashCode/toString in a data class:
previously they were generated if the corresponding method is trivial (i.e.
it comes from kotlin.Any), now we're generating it always unless it'll cause
a JVM signature clash error (see KT-6206)
- use static KotlinBuiltIns.isXxx methods to compare types instead of checking
against descriptors loaded from certain built-ins instance, this is quicker
and more correct in environments where several built-ins are possible
- don't use isOrOverridesSynthesized, it's not relevant for
equals/hashCode/toString because functions with these names are never
synthesized
#KT-6206 Fixed
2016-05-20 00:54:19 +03:00
Alexander Udalov
c1c2651988
J2K backend-common classes: convert
...
Also merge CodegenUtilKt into CodegenUtil
2016-05-20 00:36:56 +03:00
Alexander Udalov
27ed0dd25f
J2K backend-common classes: rename .java -> .kt
2016-05-20 00:36:56 +03:00
Mikhail Glukhikh
733f3e8025
Code cleanup: type parameters can have in / out variance
2016-05-13 17:57:02 +03:00
Valentin Kipyatkov
b551886889
Code cleanup: removed redundant semicolons
2016-04-29 11:26:25 +03:00
Denis Zharkov
78c9dffe00
Refine return type of MemberScope.getContributedFunctions
2016-03-16 20:22:58 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Dmitry Jemerov
117a0d8b7b
compiler: cleanup 'public', property access syntax
2016-01-07 17:57:38 +01:00
Ilya Gorbunov
80916d5ed7
Cleanup in compiler modules
2015-12-29 18:04:15 +03:00
Alexander Udalov
e67318e049
Minor, add DescriptorUtils.isClassOrEnumClass
2015-12-23 16:45:26 +03:00
Michael Bogdanov
7c7786f7d0
Generate private methods in TraitImpl as private, don't generate delegation to private trait methods
2015-12-12 11:41:36 +03:00
Dmitry Jemerov
009e3f9cd7
rename PSI classes according to current terminology:
...
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Dmitry Petrov
84824b1024
Fix KT-10194: skip incorrect delegates.
2015-12-09 17:43:48 +03:00
Natalia Ukhorskaya
d0355a793b
Write lineNumbers for constructors
2015-11-30 12:25:51 +03:00
Michael Nedzelsky
c80c33efb6
add kjsm option for kotlin js command line compiler
2015-11-23 22:32:32 +03:00
Stanislav Erokhin
2c3f58eeb7
Renamed methods in MemberScope from getSmth to getContributedSmth
2015-11-05 14:34:00 +03:00
Stanislav Erokhin
0b5de434fa
Removed usages KtScope.getAllDescriptors
2015-11-04 12:41:34 +03:00
Dmitry Jemerov
d6a3870101
rename Kt to Kotlin in KtType, KtIcons
2015-10-20 16:23:31 +02:00
Dmitry Jemerov
49033e0002
rename Jet* classes to Kt*
2015-10-19 21:35:30 +02:00
Denis Zharkov
d8ede6d03e
Transform Enum.values to property
2015-10-17 17:46:16 +03:00
Dmitry Petrov
8cd624a58a
Drop package facades: code cleanup in Kotlin project.
2015-10-15 10:33:47 +03:00