Commit Graph

45799 Commits

Author SHA1 Message Date
Alexander Udalov ed6f044fb0 Add internal WasExperimental for stdlib
Usages of declarations annotated with WasExperimental are allowed even
if the API version requirement is not satisfied, provided that the
opt-in to all mentioned markers is given. This is needed for smooth
graduation of API in kotlin-stdlib
2018-05-07 11:37:31 +02:00
Alexander Udalov fdc4313860 Minor, fix bodyUsagesAndInline.kt test data 2018-05-07 11:37:31 +02:00
Ilmir Usmanov fad5596ef9 Minor: remove builtins from kotlin-stdlib-coroutines.jar 2018-05-07 10:34:50 +03:00
Ilmir Usmanov 5e4ce4f880 Remove coroutineContext from kotlin.coroutines.experimental.intrinsics package
#KT-22400: Fixed
2018-05-07 10:28:54 +03:00
Mikhail Zarechenskiy 54ca2cbbe0 Introduce original for ReceiverValue and use it inside coroutine checker 2018-05-04 19:54:14 +03:00
Mikhail Zarechenskiy b23e9f771b [NI] Fix checking for the same instance inside for suspend functions 2018-05-04 19:53:54 +03:00
Mikhail Zarechenskiy 64b10d827d [NI] Refactoring: rename NonFixedType -> StubType 2018-05-04 19:08:22 +03:00
Mikhail Zarechenskiy 5187f6b060 [NI] Improve performance of resolution part for postoned variables 2018-05-04 19:08:21 +03:00
Mikhail Zarechenskiy a30a1f2a96 [NI] Update calls after inference for coroutines 2018-05-04 19:08:21 +03:00
Mikhail Zarechenskiy 99a95f31d3 [NI] There is no need in copying constraint storage as it read-only 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy e0ca3421ca [NI] Use only receiver from coroutine call to mark postponed variable 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy 59c4b9ad2f [NI] Make it possible to use nullable non-fixed type 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy 9209222112 [NI] Introduce inference for coroutines and builder-like constructions 2018-05-04 19:08:19 +03:00
Mikhail Glukhikh 54fc846dea Minor: fix parcel test (related to KT-21129) 2018-05-04 18:16:57 +03:00
Mikhail Glukhikh e76debb12b Report UNUSED_PARAMETER in setter #KT-21129 Fixed 2018-05-04 18:04:57 +03:00
Mikhail Glukhikh bcc1c02e73 Cleanup: constructor consistency checker 2018-05-04 17:53:00 +03:00
Mikhael Bogdanov 643e4f5c5a Get rid of descriptors in TailrecLowering 2018-05-04 16:35:44 +02:00
Mikhael Bogdanov dc68936e69 Get rid of descriptors in StaticDefaultFunctionLowering 2018-05-04 16:35:44 +02:00
Mikhael Bogdanov 489808ec38 Get rid of descriptors in PropertiesLowering 2018-05-04 16:35:43 +02:00
Mikhael Bogdanov 17e2f1a61e Get rid of descriptors in LateinitLowering 2018-05-04 16:35:42 +02:00
Mikhael Bogdanov 74fa7ee676 Minor. Code clean 2018-05-04 16:35:42 +02:00
Mikhael Bogdanov fdbc863e60 Minor. Reformat 2018-05-04 16:28:12 +02:00
Sergey Igushkin e82170a04e Tracks and match source sets for MPP after the plugins are applied
Since the custom source sets may be added after the plugins are applied in both common and platform module, we need to handle `.all { ... }` source sets in both modules and add common sources to the platform module once a match is found.

Issue #KT-22510 Fixed
2018-05-04 15:37:08 +03:00
Dmitry Savvinov 97d455729b Add -Xdump-perf 2018-05-04 15:00:43 +03:00
Dmitry Savvinov 9996a1bc7e Rewrite performance statistics collection
This commit introduces notion of 'PerformanceManager' in CLI, suitable
for collecting performance metrics of the compiler. It:

- provides `notifyX{Started/Finished}` API, where 'X' is some
measurable event (previously there were just ad hoc manual time
measurements using System.nanoTime() and stuff)

- collects measurements, so that later they can be reported in an
appropriate way (previously measurements were reported immediately to
MessageCollector as plain strings)

- allows overriding to collect metrics, specific for just one target
platform compilation

Also, common logic of compiler performance statistics collection was
extracted from platform-compilers (K2JVMCompiler) to common classes
(CLICompiler), to allow other platform-compilers (e.g. K2JSCompiler)
re-use it.
2018-05-04 15:00:43 +03:00
Dmitry Savvinov c3745c9040 Drop -Xrepeat flag
This flag hadn't been maintained for a long time and isn't working
properly at the moment.
2018-05-04 15:00:43 +03:00
Dmitry Savvinov e3073be726 Minor: reformat KotlinToJvmBytecodeCompiler 2018-05-04 15:00:43 +03:00
Alexander Udalov c57864e46c Require "-Xuse-experimental=kotlin.Experimental" on usages of Experimental
Since we're not yet sure of the design of Experimental/UseExperimental,
we're making them "experimental" themselves in some sense, in that the
user is required to provide the magic argument
"-Xuse-experimental=kotlin.Experimental" to be allowed to use either
Experimental or UseExperimental. This is more convenient than the
previous approach of "-language-version 1.3
-Xskip-metadata-version-check" because it's simpler and does not cause
pre-release binaries to be produced
2018-05-04 13:48:24 +02:00
Alexander Udalov 2a61d42fc1 Refactor and simplify ExperimentalUsageChecker 2018-05-04 13:48:24 +02:00
Alexander Udalov 4f53a54115 Drop Experimental.Impact, simplify related code and tests
See https://github.com/Kotlin/KEEP/issues/95#issuecomment-383889404

Drop Experimental.changesMayBreak, Experimental.Impact, the concept of
signature/body usage, same module exemption. Make the majority of tests
single-module because there is now no difference in the checker between
usages from the same module or from another module
2018-05-04 13:48:24 +02:00
Alexander Udalov 1719eecb67 Minor, init slice debug names for FilesByFacadeFqNameIndexer 2018-05-04 13:48:24 +02:00
Mikhael Bogdanov 12ba1b002c Refactor SharedVariablesManager: get rid of descriptors in API 2018-05-04 12:33:44 +02:00
Mikhael Bogdanov f1c0db346a Code clean 2018-05-04 12:33:35 +02:00
Sergey Rostov 9fafe0473c jps (refactor): reimplement KotlinModuleBuildTarget data binding using CompileContext 2018-05-04 11:14:45 +03:00
Sergey Rostov 91b703d529 jps: common modules metadata compiler
(cherry picked from commit cde333d)
2018-05-04 11:05:13 +03:00
Sergey Rostov 41dcc9ad4d jps: minor: refine kotlin.jps.model package
(cherry picked from commit 2a31e78)
2018-05-04 11:05:12 +03:00
Sergey Rostov a390fc36e2 jps: Refactor module/project settings getters/setters
(cherry picked from commit d29ffa0)
2018-05-04 11:05:12 +03:00
Sergey Rostov 75e6be7802 jps(refactor): Extract platform related code
#KT-23656 Fixed

(cherry picked from commit 18a751d)
2018-05-04 11:05:12 +03:00
Ilya Chernikov 22439250e2 Use kts file extension instead of kt in tests...
since all "kt" files are now considered - definitely non-scripts
2018-05-03 22:15:10 +02:00
Ilya Chernikov 24e8e7c40d Eliminate script dependencies queries for non-scripts 2018-05-03 22:15:10 +02:00
Ilya Chernikov d4070cc4d7 Return null on directories in script definition wrappers for files 2018-05-03 22:15:10 +02:00
Ilya Chernikov 9eab7a627d Add script API libs sources to the IDEA plugin 2018-05-03 22:15:10 +02:00
Alexander Udalov 64f5c2c9a3 Refactor and simplify AbstractCustomScriptCodegenTest
Remove copy-paste, use CodegenTestCase's infrastructure as much as
possible, use InTextDirectiveUtils instead of regexps
2018-05-03 22:15:10 +02:00
Alexander Udalov c48bb9c981 Minor, drop unused parameter in CodegenTestCase, add testJdkKind 2018-05-03 22:15:10 +02:00
Ilya Chernikov 48cf0bd949 Fixes and refactorings after review 2018-05-03 22:15:10 +02:00
Ilya Chernikov dff4be9e04 Implement script environment variables in backend, add simple test 2018-05-03 22:15:09 +02:00
Ilya Chernikov a9600e34bf Add test infrastructure for custom scripts testing, add receiver test 2018-05-03 22:15:09 +02:00
Ilya Chernikov 57db77a295 Refactor script infrastructure for easier usage and testability:
- add script annotation for specifying default configuration for a script
- add support for this annotation in the default configurator
- rename configurator accordingly
- add default implementation of the refineConfiguration method
- make property bag class open
2018-05-03 22:15:09 +02:00
Ilya Chernikov 516924cda1 Add support for script environment variables to the frontend 2018-05-03 22:15:09 +02:00
Ilya Chernikov 15f9ad9531 Implement quick non-script detection and lazy script discovery..
so ".kt" and ".java" files are not considered as scripts and quickly
filtered out, and for the other files the the checks are implemented
using sequences, mechanisms provided to supply script definitions
lazily, and script discovery is implemented using this mechanisms.
2018-05-03 22:15:09 +02:00