Commit Graph

517 Commits

Author SHA1 Message Date
Dmitry Savvinov 2359944fa7 Minor: add debugName to JS-slices 2019-02-25 11:10:16 +03:00
Anton Bannykh 4b39e2df12 JS: (review fix) Header -> InlineData 2019-02-14 15:14:28 +03:00
Anton Bannykh 6d26bf9622 JS: don't load binary AST unless required by the inliner 2019-02-14 15:14:28 +03:00
Mikhael Bogdanov a122cba862 Switch Kotlin project to jvm-target 1.8
#KT-29405
2019-01-31 07:43:05 +01:00
Sergey Rostov 0f2fb4ff82 Build: remove intellijCore/annotations.jar usages 2019-01-28 13:43:08 +03:00
Svyatoslav Kuzmich 8c89ffbe2d [JS IR BE] Load builtins from code to runtime
Bypass builtins deserialization mechanism in legacy JS backend and load
bultins direcly as kotlin code.

This way we won't have separated IR declarations for Enum, Char, Long

Some "native" builtins are implemented in libraries/stdlib/js/irRuntime/builtins/
Other builtins are moved by MoveExternalDeclarationsToSeparatePlace and
used only in compile-time
2019-01-24 23:05:56 +03:00
Dmitry Savvinov 69fff12384 Drop LockBasedStorageManager.defaultDebugName, use meaningful name everywhere
Also, drop `createDelegatingWithSameLock` as it was unused
2019-01-14 11:10:37 +03:00
Sergey Rostov 883970fadb Add explicit dependencies to nullable annotations 2018-12-26 09:07:06 +03:00
Simon Ogorodnik e3aed04d96 Extract module info & target platform to separate frontend.common 2018-12-11 22:07:41 +03:00
Alexander Udalov 49d6a7a7cb Refactor and improve code obtaining actual Java annotation parameter values
Extract Java-specific code into module 'frontend.java' and use already
existing JavaAnnotationArgument facilities to determine the default
parameter value in an actual Java annotation class.

Annotation arguments are not yet supported because to create an instance
of AnnotationValue, we need a descriptor, which is not available at this
point.

 #KT-22704 In Progress
 #KT-28077 Open
2018-11-13 19:05:14 +01:00
Anton Bannykh 82268cd95d JS: fix concurrent access to NameSuggestion.cache 2018-11-07 12:07:58 +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
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
Denis Zharkov 38be1f6947 Minor. Parametrize MainFunctionDetector with LanguageVersionSettings 2018-09-12 09:49:25 +03:00
Anton Bannykh d571d0ad51 JS: prohibit using experimental coroutines from 1.3 2018-09-10 14:18:44 +03:00
Alexander Udalov 87c0d56618 Drop Annotations.getAllAnnotations 2018-09-06 19:13:14 +03:00
Alexander Udalov 7271995ff0 Drop Annotations.findAnyAnnotation, DescriptorUtils.getAnnotationByFqName 2018-09-06 19:13:13 +03:00
Ilmir Usmanov 0559cfb724 Move SuspendFunction{N} interfaces to kotlin.coroutines package
#KT-25824: Fixed
2018-08-22 16:21:30 +03:00
Zalim Bashorov 503fcd5cd3 [JS FE] Minor: cleanup JsExternalChecker.kt 2018-08-21 17:09:34 +03:00
Zalim Bashorov 589085369e [JS FE] Unify how the compiler checks parameters and return types for external declarations 2018-08-21 17:09:33 +03:00
Zalim Bashorov 9d0b880f67 [JS FE] Prohibit inline classes as parameter type and return type of external declarations
#KT-26171 Fixed
2018-08-21 17:09:33 +03:00
Zalim Bashorov 839bce5236 [JS FE] Prohibit external inline classes
#KT-26138 Fixed
2018-08-21 17:09:33 +03:00
Alexey Tsvetkov 8f002fdb43 JS IC: track lookups from libraries
Otherwise we don't track lookups from other modules

    #KT-25540 fixed
2018-07-23 15:43:17 +03:00
Alexander Udalov 4122021090 Add BinaryVersion to DeserializationContext
This will be useful to implement version-dependent deserialization,
which is needed for gradual fixes of issues in metadata

 #KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Alexander Udalov ae6627fe94 Simplify code in JS serialization related to module descriptors
Do not use `JsModuleDescriptor<...>` where only its `data` is needed
2018-07-17 20:26:31 +02:00
Alexander Udalov ce34deb9af Delete DefaultImportProvider, refactor TargetPlatform.defaultImports 2018-07-16 13:45:11 +02:00
Anton Bannykh 4872c97929 JS: enable release coroutines 2018-07-10 13:11:39 +03:00
Alexander Udalov 959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Yan Zhulanow ab5614eaac Minor: Replace a number of trivial Guava usages with constructor calls and kotlin-stdlib function calls 2018-06-08 19:37:47 +03:00
Sergey Rostov ce96c1b9a8 jps, daemon: fix javascript inline functions tracking
inline function hash should computed after compilation
2018-06-08 09:46:50 +03:00
Stanislav Erokhin 8f0b073c08 [NI] Prototype for SAM-conversion.
Supported:
- conversion in resolution parts. Also sam-with-receiver is supported automatically
- separate flag for kotlin function with java SAM as parameters

TODO:
- fix overload conflict error when function type is the same byte origin types is ordered
- consider case when parameter type is T, T <:> Runnable
- support vararg of Runnable

[NI] Turn off synthetic scope with SAM adapter functions if NI enabled
2018-06-04 12:21:56 +03:00
Dmitry Savvinov c33b7377da Add support of internal arguments for language feature settings
Arguments are passed in form '-XXLanguage:+LanguageFeatureName' for enabling
LanguageFeature.LanguageFeatureName, and '-XXLanguage:-LanguageFeatureName'
for disabling.

Note that they do override other settings, including 'language-version'
or extra ('-X') args.
2018-05-18 16:16:23 +03:00
Denis Zharkov 0788afe92c Avoid computing AST for IdentifierChecker
Basically, it's unnecessary to check anything when analysing stubs,
but it's complicated now to avoid that, so we just postpone
computing AST until reporting happens
2018-04-28 17:12:52 +03:00
Ilmir Usmanov 2cfe387bab Move coroutines to kotlin.coroutines package: compiler
Generate continuation type as kotlin.coroutines.Continuaion. This code will
fail at runtime since there is no stdlib backing this change yet.
However, in order to generate compatible stdlib we need a compiler, which
generates continuation type as kotlin.coroutines.Continuation.
Thus, firstly we support the change in the compiler, make it bootstrap
compiler and only then change stdlib and tests accordingly.
 #KT-23362
2018-04-10 22:51:46 +03:00
Roman Artemev 3bc323807f Fix function lookup in modules with similar names [KT-23582] 2018-04-10 15:58:30 +03:00
Roman Artemev 96b6cec33f Add warning in case similar module names 2018-04-10 15:58:30 +03:00
Anton Bannykh 7b860eab36 Merge kotlin-experimental into kotlin standard library (KT-23055 fixed)
* kotlin-experimental.js has been already merged into kotlin.js
* change library name to kotlin in kotlin-experimental.meta.js in order to produce correct require calls
* concatenate kotlin-experimental.meta.js with kotlin.meta.js
* suppress multiple module declaration warning for such use case
2018-03-26 23:13:28 +03:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Zalim Bashorov a47a916437 Restore hack for avoiding tracking declarations from JS stdlib 2018-03-24 20:09:11 +03:00
Zalim Bashorov 44d5d0da7e Rid of most of the usage of JsConfig in TopDownAnalyzerFacadeForJS 2018-03-20 22:44:25 +03:00
Alexey Tsvetkov 89275410a6 Avoid reading JS libraries twice per compilation 2018-03-19 18:04:33 +03:00
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Alexander Udalov 890374a42a Load module annotations for JVM and JS modules in compiler
#KT-22759 In Progress
2018-02-08 17:08:33 +01:00
Alexander Udalov ac5444ef7c Add declaresOrInheritsDefaultValue, move hasDefaultValue to 'resolution'
'hasDefaultValue' needs to be adapted to support locating default values
in 'expect' functions, and this is not possible in module 'descriptors',
where it was originally declared. Therefore, move it to module
'resolution' and copy its current logic to a separate function
'declaresOrInheritsDefaultValue' which is used in 5 places.
'hasDefaultValue' itself is updated in subsequent commits.

Besides changing imports, also use a simpler declaresDefaultValue in
some places, which does not include default values inherited from
supertypes: this is OK for constructors, and in LazyJavaClassMemberScope
for functions from built-ins which do not have default argument values
at all
2018-02-05 13:38:04 +01:00
Vyacheslav Gerasimov 89a07ded1c Extract versions and remove unnecessary '.jar' extensions 2018-01-30 17:06:18 +03:00
Ilya Chernikov 7e21573cf4 Convert the rest of the project to intellij repo prepared in buildSrc 2018-01-30 17:06:13 +03:00
Ilya Chernikov a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov 8266777bd5 Convert js modules to intellij plugin 2018-01-30 17:06:07 +03:00
Alexander Udalov 8cd7686535 Introduce DeclarationCheckerContext, remove SimpleDeclarationChecker 2018-01-29 12:22:40 +01:00
Alexey Tsvetkov ad1978940b Recompile inline function usages in JS when offset is changed
Otherwise source maps would differ after rebuild
2017-12-22 16:12:20 +03:00