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
Mikhael Bogdanov
25d75bcd8b
Delegates to java defaults methods in compatibility mode
2017-01-26 14:32:33 +01:00
mglukhikh
f64345634b
WHEN_ENUM_CAN_BE_NULL_IN_JAVA is no more reported after smart cast to not-null #KT-15201 Fixed
2017-01-24 13:51:15 +03:00
Alexander Udalov
f1cd2ee6fd
Introduce PropertyDescriptor.isDelegated, write new flag to metadata
...
#KT-8384 In Progress
2017-01-23 12:25:34 +03:00
Mikhael Bogdanov
da1b8a02ed
Exclude builtins members mapped to java default methods from delegation
2017-01-20 13:16:58 +01:00
Denis Zharkov
bbb5d4eb0f
Fix 1.0-compatibility mode for JDK dependendent built-ins
...
Do not report UNSUPPORTED_FEATURE if there is no overridden descriptors
E.g. in case of property accessors
2017-01-19 15:20:57 +03:00
Denis Zharkov
5d4f51d9b6
Refine 1.0-compatibility mode for JDK dependent members
...
- calls must be prohibited iff they refer to some additonal built in member
- override must be prohibited iff all of the overridden descriptors are additional
Other usages were able to be successfully compiled by 1.0.x
Solution with @Deprecated(level=Error) doesn't work properly, because
deprecation propagates to overridden, thus call 'java.util.ArrayList<String>().stream()'
becomes invalid, while it was correct in 1.0.x
#KT-15794 Fixed
2017-01-19 10:20:35 +03:00
Zalim Bashorov
6ea6e4ab98
KJS: move println to kotlin.io; import kotlin.io by default in Default platform
2017-01-18 14:25:36 +03:00
Mikhael Bogdanov
de52a5bc20
Fixed diagnostic message
2017-01-18 11:19:36 +01:00
Mikhael Bogdanov
591de36666
Added deprecated diagnostic for invoking default methods within jvm-target 1.6
2017-01-18 10:50:59 +01:00
Mikhael Bogdanov
7a27a9d51f
Propagate 'CompilerConfiguration' to frontend checkers
2017-01-18 10:23:40 +01:00
Denis Zharkov
d0d617b44e
Fix signature mapping for default suspend function from interface
...
Use jvm suspend function view in function codegen.
Also use SUSPEND_FUNCTION_TO_JVM_VIEW slice if the value exists
for the given key
#KT-15552 Fixed
2017-01-18 12:00:45 +03:00
Yan Zhulanow
5adc3bacff
SamWithReceiver: Call onContainerComposed() properly for module dependencies as well. Inject SamWithReceiverResolver by instance.
2017-01-17 20:39:28 +09:00
Denis Zharkov
7837d736f7
Merge RestrictedCoroutineImpl into CoroutineImpl
2017-01-14 13:24:53 +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
Mikhael Bogdanov
0a363fd1a5
Introduced test flag: JVM8_TARGET_WITH_DEFAULTS
2017-01-13 13:52:56 +01:00
Mikhail Glukhikh
c09a71b178
Multi-platform refactoring: get rid of PlatformKind (replace with MultiTargetPlatform)
2017-01-12 18:58:13 +03:00
Alexander Udalov
6ffa56b640
Move name sanitization utilities to module 'descriptors'
2017-01-12 11:24:23 +03:00
Alexander Udalov
db3fa8eaca
Refactor JvmPackagePartProvider
...
Make code more imperative than functional, preserve the information about the
original root where the module mapping was discovered
2017-01-11 13:15:56 +03:00
Dmitry Petrov
7a8ec86cb9
KT-11398
...
- turn INACCESSIBLE_TYPE into a warning;
- improve diagnostic message for INACCESSIBLE_TYPE.
2017-01-11 10:23:01 +03:00
Dmitry Petrov
8d16bd1215
Method can be hidden if it is annotated with kotlin.internal.PlatformDependent,
...
or is a Java method from a Kotlin built-in class (transitively).
https://github.com/Kotlin/KEEP/blob/master/proposals/jdk-dependent-built-ins.md#backward-compatibility-of-overrides
2016-12-23 13:51:08 +03:00
Alexey Tsvetkov
4fdca24db4
Remove source annotations removing (not needed with KAPT3)
2016-12-19 22:46:12 +03:00
Denis Zharkov
c73b0d7b76
Move coroutine intrinsics to object (backend's)
2016-12-15 23:58:23 +03:00
Stanislav Erokhin
42440f50dc
Remove soft keyword coroutine & isCoroutine from ValueParameterDescriptor.
2016-12-15 23:57:56 +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
Denis Zharkov
b1d1128466
Minor. Move createFunctionType to core
...
As it will be used in the type mapper soon
2016-12-15 23:32:09 +03:00
Mikhael Bogdanov
268d55104c
Don't generate delegation to java default methods
...
#KT-15226 Fixed
2016-12-14 11:20:04 +01:00
Alexander Udalov
d0fa9bac75
Introduce '-Xskip-runtime-version-check' command line option
2016-12-13 21:09:00 +03:00
Mikhail Glukhikh
57da92b862
Infrastructure change: module descriptor now knows its platform kind & its sources kind
2016-12-13 18:53:55 +03:00
Stanislav Erokhin
59efedf610
Rename platform to header.
2016-12-13 18:00:00 +03:00
Dmitry Jemerov
7e92cf2af7
Don't create light classes for platform declarations
...
#KT-15137 Fixed
2016-12-12 20:47:45 +01:00
Roman Elizarov
8affb2726f
Pluggable Synthetic Objects
2016-12-12 18:43:26 +03:00
Yan Zhulanow
b9a0a4f3db
Kapt3: Ensure that field types and method return types are not anonymous (KT-14997)
2016-12-09 20:28:31 +03:00
Yan Zhulanow
cbef0250aa
Allow to turn the first parameter of a SAM-converted lambda into the receiver (KT-12848)
2016-12-09 20:01:21 +03:00
Alexander Udalov
789483e1eb
Remove old mechanism of metadata version error reporting
2016-12-09 01:59:36 +03:00
Alexander Udalov
11f975fe89
Add classifier usage checker for missing dependency classes
...
This has no effect for the original use case of mock class descriptors
(unresolved classes used in libraries), but is necessary for pre-release
classes in case the compiler is a release, because such classes end up in scope
and can be the result of the resolution
2016-12-09 01:59:33 +03:00
Alexander Udalov
4e99349f1f
Write "pre-release" flag to class files, do not allow usages in release
2016-12-09 01:59:33 +03:00
Alexey Andreev
7e37d5d6fa
Prohibit external modifiers on classes and properties in JVM target
2016-12-08 15:41:42 +03:00
Alexey Andreev
ba2443bcb3
Add external property to class and property descriptors
2016-12-08 15:41:38 +03:00
Alexander Udalov
228d0a1c43
Move "missing dependency class" diagnostic from JVM to common front-end
2016-12-07 21:46:37 +03:00
Alexander Udalov
3b18531b20
Add expectedVersion to IncompatibleVersionErrorData, move to deserialization
2016-12-07 21:46:36 +03:00
Denis Zharkov
dd392963ac
Minor. Rename SyntheticExtensionFunctions -> SyntheticMemberFunctions
2016-12-07 21:04:57 +03:00
Denis Zharkov
891a036b59
Change resolution priority level for SAM adapters
...
After this change SAM adapters are being resolved in the same group
as members, thus their overload resolution happens simultaneously.
But in the case of overload resolution ambiguity try to filter out all
synthetic members and run the process again.
See the issue and new test for clarification
#KT-11128 In Progress
2016-12-07 21:04:44 +03:00
Denis Zharkov
a4adfb43d4
Minor. Refine substitution for SAM adapters
...
Introduce CompositionTypeSubstitution instead of manual composition of
two substitutions.
This change is necessary for the later changes where original substitution
will be able to contain outer type parameters
#KT-11128 In Progress
2016-12-07 21:04:39 +03:00
Yan Zhulanow
d884830700
Allow to avoid declaration body resolution for function and property initializers if the return type is explicitly specified. This significantly reduces the analysis time in kapt3.
2016-12-05 19:57:43 +03:00
Mikhail Zarechenskiy
240d82d167
Move reified type parameter checker to additional checkers to able turn it off by demand
2016-12-01 10:06:38 +03:00
Denis Zharkov
fcd9ee037e
Support coroutines stack-unwinding in JVM backend
...
#KT-14924 In Progress
2016-11-29 14:14:50 +03:00
Alexander Udalov
8d3f6f1ce7
Check platform<->impl declaration compatibility
...
For each platform declaration, there must be at least one impl declaration in
the module with the compatible signature; similarly, for each impl declaration,
there must be at least one platform declaration with the compatible signature.
Note that currently the presence of the 'impl' modifier is not checked yet.
Also, the sad fact is that if you have platform and impl declarations which are
not compatible, you get two errors: on the platform delcaration and on the impl
declaration. This needs to be addressed as well
2016-11-25 20:50:26 +03:00
Alexander Udalov
ce9691cd2b
Support platform/impl modifiers for properties
...
Do not allow platform properties to have backing fields, initializers, be
delegated, lateinit or const, or have accessors with bodies
2016-11-25 20:50:18 +03:00