LepilkinaElena
21fe5ac415
Fix parser for linkerOpts/compilerOpts (KT-29970) ( #2219 )
2019-03-29 20:13:23 +03:00
Alexander Udalov
4cb5a4fb6d
Fix misc typos in IR backends
2019-03-28 14:26:09 +01:00
Alexey Tsvetkov
0687b8eac3
Add argument to allow running compiler without sources
...
`-Xbuild-file` argument allows the compiler to run without
passing any Kotlin source file in arguments.
We have been using this property in
Kotlin Gradle plugin for a few important cases:
1. incremental compilation (to update caches when there are only removed files);
2. for KAPT (Kotlin sources don't make sense in context
of running APs).
We want to stop using `-Xbuild-file` in Kotlin Gradle plugin,
and avoid breaking the Gradle plugin or IC in other build-systems.
This change adds an argument to explicitly run
the compiler without specifying any Kotlin source file.
2019-03-25 16:39:47 +03:00
Alexey Tsvetkov
97d3d38374
Always run codegen when IC is enabled
...
We may need to run code generation when no source files are specified
for incremental compilation (to update caches & metadata)
2019-03-25 16:39:47 +03:00
Alexey Tsvetkov
5b7cee6221
Unify JVM compilation with and without -Xbuild-file
2019-03-25 16:39:47 +03:00
Alexey Tsvetkov
4154e97aa3
Fixes after code review
2019-03-25 16:39:47 +03:00
Alexey Tsvetkov
5f54f67f70
Stop using -Xbuild-file in Gradle Plugin
...
#KT-27640 fixed
#KT-27778 fixed
#KT-27638 fixed
2019-03-25 16:39:47 +03:00
Alexander Udalov
87c6b723f0
Add JvmBuiltIns.Kind instead of boolean flags in constructor
2019-03-22 14:59:03 +01:00
Alexander Udalov
ed86757817
Rework how built-in types are loaded in compiler for JVM
...
In TopDownAnalyzerFacadeForJVM, we now always use the "load built-ins
from module dependencies" behavior that was previously only enabled with
the dedicated CLI argument -Xload-builtins-from-dependencies. However,
sometimes we compile code without kotlin-stdlib in the classpath, and we
don't want everything to crash because some standard type like
kotlin.Unit hasn't been found.
To mitigate this, we add another module at the end of the dependencies
list, namely a "fallback built-ins" module. This module loads all
built-in declarations from the compiler's class loader, as was done by
default previously. This prevents the compiler from crashing if any
built-in declaration is not found, but compiling the code against
built-ins found in the compiler is still discouraged, so we report an
error if anything is resolved to a declaration from this module, via a
new checker MissingBuiltInDeclarationChecker.
Also introduce a new CLI argument -Xsuppress-missing-builtins-error
specifically to suppress this error and to allow compiling code against
compiler's own built-ins.
#KT-19227 Fixed
#KT-28198 Fixed
2019-03-22 14:59:03 +01:00
Alexander Udalov
05700b8c43
Use JvmResolveUtil.createContainer in AbstractDescriptorRendererTest
2019-03-22 14:59:03 +01:00
Georgy Bronnikov
e627f08614
Make wrong phase name an error
2019-03-21 23:32:25 +03:00
Georgy Bronnikov
fae003866b
Use CLI compiler arguments directly in PhaseConfig creation
2019-03-21 23:32:25 +03:00
Georgy Bronnikov
469fd20902
Warn about mistyped phase names in CLI
2019-03-21 23:32:25 +03:00
Alexander Udalov
0fb444a5d1
Move createPhaseConfig to module cli
...
To use things like MessageCollector to report errors/warnings related to
incorrect phase configuration flags
2019-03-21 23:32:25 +03:00
Alexander Udalov
2995be8bd2
Move usages of createPhaseConfig up to cli & test modules
2019-03-21 23:32:25 +03:00
Ilya Chernikov
c56382a62b
Move common idea and compiler parts of the scripting plugin to the new jar
2019-03-21 12:02:29 +01:00
Alexander Udalov
518b03125c
Support JVM target versions up to 12
...
#KT-26240 Fixed
2019-03-07 11:42:31 +01:00
Alexander Udalov
9f75fd0d62
Minor, remove confusing logic from GenericReplChecker
2019-03-07 11:42:31 +01:00
Alexander Udalov
c7c377e1b1
Use JvmTarget.DEFAULT instead of JVM_1_6 where applicable
2019-03-07 11:42:31 +01:00
Ilya Chernikov
e99715cf82
Extract extra imports provision into an extension, implement one ...
...
for script in the plugin, drop direct dependency on scripts from
FileScopeFactory
2019-03-02 08:10:17 +01:00
Ilya Chernikov
57ac149f5b
Extract script cli evaluation to the plugin
2019-03-02 08:10:17 +01:00
Ilya Chernikov
196e274929
Move calculating dependencies from script sources to plugin
2019-03-02 08:10:16 +01:00
Georgy Bronnikov
c618ef9304
Correct phase argument names and cli test outputs
2019-02-28 11:53:02 +03:00
Georgy Bronnikov
da13d3288e
Check pre- and postconditions on phases
2019-02-28 11:53:02 +03:00
Ilya Gorbunov
98c6c925fc
Move JS stdlib merger into cli compiler module
...
Refactor: use stdlib function to relativize paths.
2019-02-22 02:37:24 +03:00
Ilya Chernikov
29fa0f5dff
Replace unnecessary direct usages of the LazyScriptDescriptor with ScriptDescriptor interface
...
lift result property to the interface to implement it
2019-02-21 15:59:48 +01:00
Ilya Chernikov
e28017039d
Split scripts and class/object declarations in DeclarationsProvider
...
simplifies code in most places, avoids filtering in places where they
should be processed independently
2019-02-21 15:59:48 +01:00
Ilya Chernikov
0839b44ebb
Replace explicit ScriptDescriptor in resolver with appropriate superclass
2019-02-21 15:59:47 +01:00
Natalia Selezneva
254374c619
Use ModuleInfo in VirtualFileFinder to add script dependencies in search scope
...
Otherwise it prevent to inline functions from those dependencies during scratch compilation
2019-02-20 18:36:38 +03:00
Yan Zhulanow
a7ea252973
Refactoring: Split KotlinCoreEnvironment setup functions for Android Lint
2019-02-15 21:23:27 +03:00
Yan Zhulanow
0444203b9b
Ignore non-jar files in ServiceLoaderLite (KT-29513)
2019-02-15 21:23:25 +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
Ilya Chernikov
b0c86647ed
Convert KotlinPaths to kotlin
2019-02-10 13:33:22 +01:00
Ilya Chernikov
c6a24c03e4
Move CliScriptDefinition provider to the plugin too, fix tests
2019-02-10 13:33:22 +01:00
Ilya Chernikov
89fc7eba95
Make script infrastructure providers optional
2019-02-10 13:31:56 +01:00
Ilya Chernikov
0732b48701
Move script related configuration to the plugin
2019-02-10 13:31:55 +01:00
kirill.shmakov
4b1e5e8005
Resolve #KT-26865 and related issues
...
CLITool.exec is used in konanc to perform compilation of native project.
Due to some internal limitation, this function runs in separate process.
After this change, there will be a possibility to choose MessageRenderer
used in CLITool.exec via system property
org.jetbrains.kotlin.cliMessageRenderer.
Reviewed at KOTLIN-CR-2698.
2019-02-07 11:29:16 +03:00
Ilya Chernikov
3943bd1b15
Make toString for repl return function types nicer, drop obsolete isFunctionType
2019-02-05 16:13:06 +01:00
Alexander Udalov
8b286faa6a
Workaround issue with unsupported report-cdata-event in XMLInputFactory on IBM JDK
...
#KT-29596 Fixed
2019-02-01 14:27:43 +01:00
Alexander Udalov
db487a622a
Add -Xsanitize-parentheses to workaround ASM 6.1 issue in frame computation
...
#KT-29475 Fixed
2019-01-31 15:47:43 +01:00
Mikhael Bogdanov
a122cba862
Switch Kotlin project to jvm-target 1.8
...
#KT-29405
2019-01-31 07:43:05 +01:00
Ilya Chernikov
f125600af1
Restore returning of functional types from repl eval
...
add tests for the broken case as well for the return value representation
#KT-29490 fixed
2019-01-29 15:05:37 +01:00
Ilya Chernikov
04b04ea0ee
Refactor compiler arguments to configuration conversion:
...
extract into independent functions, rearrange logic
2019-01-28 13:15:36 +01:00
Ilya Chernikov
d5d60cbc6b
Convert CliCompiler class to Kotlin
2019-01-28 13:15:35 +01:00
Ilya Chernikov
025d2d1b66
Rename .java to .kt
2019-01-28 13:15:35 +01:00
Sergey Rostov
f35185b261
Build: remove explicit dependencies to org.jetbrains.annotations
2019-01-28 13:43:08 +03:00
Alexander Udalov
6b5a16884c
Refactor inheritMultifileParts to be a JVM analysis flag
...
Instead of a JVMConfigurationKeys key. This will allow to use it in a
checker in 'frontend.java'
2019-01-25 15:57:13 +01:00
Alexey Tsvetkov
beabbb95db
Enable assertions for Kotlin daemon in Gradle tests
2019-01-23 23:30:28 +03:00
Vyacheslav Gerasimov
f58acbeef5
Build: implement useBootstrapStdlib flag
...
Excludes stdlib projects from build and uses bootstrap stdlib artifacts
#KT-29205
2019-01-21 21:09:40 +03:00