Commit Graph

328 Commits

Author SHA1 Message Date
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Yan Zhulanow 0ebcd0ad40 Remove inline function usages that break JPS compilation 2018-03-01 21:30:51 +03:00
Anton Bannykh 4a5e9bbc7f JS: remove -XtypedArraysEnabled flag (always true now) 2018-03-01 14:26:13 +03:00
Anton Bannykh ed80252ba8 JS: fix double compareTo behaviour for NaN and +-0 (KT-22723) 2018-02-28 15:01:58 +03:00
Dmitry Petrov 839ebba157 ProperNumberComparisons is disabled by default (until LDC decision) 2018-02-13 09:26:00 +03:00
Dmitry Petrov af79bbd247 Minor: reformat code 2018-02-13 09:25:40 +03:00
Yan Zhulanow 310ee67c35 REPL, minor: Ignore empty lines (#KT-21611) 2018-02-09 19:24:57 +03:00
Alexander Udalov 77625831f7 Support -Xexperimental and -Xuse-experimental, validate their values
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov f4e2102787 Minor, remove extra empty lines from -X arguments help 2018-02-01 19:38:32 +01:00
Alexander Udalov f9e195351a Minor, rephrase usage help for -no-stdlib/-no-reflect compiler arguments 2018-02-01 19:38:30 +01:00
Ilya Chernikov 4eb557724c Convert compiler projects to the new intellij deps 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 74411d9b9c Convert all compiler modules to intellij plugin 2018-01-30 17:06:06 +03:00
Dmitry Savvinov b29a6e48fb Refactor language features, which control effect system
- Introduce new language feature 'ReadDeserializedContracts', which
allows to deserialize contracts from metadata.

- Introduce new language feature 'AllowContractsForCustomFunctions',
which allows reading contracts from sources.

- Use new features instead of combination 'CallsInPlaceEffect ||
ReturnsEffect'

- Rename 'CallsInPlaceEffect' -> 'UseCallsInPlaceEffect',
'ReturnsEffect' -> 'UseReturnsEffect'. As names suggest, they control
if it is allowed to use corresponding effect in analysis.

We have to introduce separate 'ReadDeserializedContracts' to enable
contracts only in some modules of the project, because libraries are
read with project-wide settings (see KT-20692).
2018-01-26 11:30:44 +03:00
Denis Zharkov 3cfe43f83a Add -Xsupport-compatqual-checker-framework-annotations flag
It's implemented through Jsr305State while it's not related
to jsr-305 becasue currently it's the most convenient way
to introduce the flag.

Probably, it's worth renaming Jsr305State to something more abstract
like NullabilityAnnotationsConfiguration

 #KT-21982 Fixed
2018-01-10 17:02:46 +03:00
Alexander Udalov 613297ad60 Rename ModuleScriptData -> ModuleChunk and refactor related code
Use the term "build file" instead of the old "module"/"module script"
2017-12-27 14:50:03 +01:00
Ilya Chernikov 953a485fe7 Increment repl line generation on compilation error
fixes #KT-17921 and #KT-21141
Tests added to the JSR223 local eval example
2017-12-26 19:27:32 +01:00
Sergey Igushkin 149b197b24 Fix unconditional warning in JS compilation with sourceMap disabled. 2017-12-25 15:30:01 +03:00
Alexey Tsvetkov 3f082346ae Do not set api version to language version when language version is null
#KT-21852 fixed
    #KT-21574 fixed
2017-12-18 16:22:07 +03:00
Alexander Udalov c5c4c9cfcc Support "-module-name" argument for common code compiler
#KT-20892 Fixed
2017-12-13 11:49:58 +01:00
Alexander Udalov 3ede503042 Minor, remove empty K2JSCompilerArguments.java 2017-12-13 11:49:58 +01:00
Alexander Udalov cc9ebb26de Minor, improve "-module-name" argument description 2017-12-13 11:49:58 +01:00
Alexey Sedunov 38d3362bcb Configuration: Support selection of "Latest stable" version vs specific one
#KT-21229 Fixed
2017-12-12 20:48:26 +03:00
Alexander Udalov 3c98274006 Move -Xjsr-305 argument parsing out of K2JVMCompilerArguments
To simplify K2JVMCompilerArguments, which is mostly a data holder
2017-12-11 18:02:37 +01:00
Alexander Udalov 5092758acb Improve help message on -Xjsr305 CLI argument 2017-12-11 18:02:04 +01:00
Alexey Andreev 1d48442a5d Change default output dir in JS DCE Gradle plugin
See KT-21328

Compiler removes all files from its output directory.
Due to this reason (and some other reasons) it't not a good idea
to put DCE output to `classes` dir.
Therefore we changed output dir to `$buildDir/kotlin-js-min`.
Additionally, we now allow to customize output dir.
In particular, this fixes issues with webpack in multi-project build +
continuous Gradle build.
2017-11-29 20:08:30 +03:00
Alexey Andreev 5672e1f56e JS: add DCE devmode. Fix mapping paths in source maps
See KT-20210, KT-21307
2017-11-29 20:08:30 +03:00
Alexander Udalov aca74cef0e Replace dependencies on kotlin-reflect with kotlin-reflect-api
See the previous commit for information on the kotlin-reflect vs
kotlin-reflect-api distinction.

Add kotlin-reflect as an explicit runtime dependency of most of the test
configurations because even though they all depend on tests-common, the
runtime dependency on kotlin-reflect is not exported from tests-common
to other modules because the projectTests dependency is not transitive.
2017-11-28 12:35:49 +01:00
Dmitry Savvinov 440b6d9934 Add -Xeffect-system CLI argument which enables Effect System 2017-11-23 12:35:51 +03:00
Mikhail Glukhikh 078c27efa3 Add fallback flag for legacy var smart casts after try #KT-21377 Fixed 2017-11-22 18:31:04 +03:00
Mikhail Zarechenskiy 0b484771dd Add compiler key to enable new inference 2017-11-13 16:24:34 +03:00
Dmitry Petrov 6c47b4a39c Language feature for nullability assertions on enhanced nullability 2017-10-25 12:30:32 +03:00
Alexey Sedunov 87f3d24f9b Misc: Protect freeArgs with FreezableVar 2017-10-24 15:43:51 +03:00
Dmitry Petrov 68870a16bb Remove CLI help on 'preserve-class-initialization' mode
See https://youtrack.jetbrains.com/issue/KT-19532#comment=27-2492178
2017-10-24 09:36:56 +03:00
Sergey Igushkin 5edf8664fb Rename warningsAsErrors -> allWarningsAsErrors in args
(cherry picked from commit 377acf5)
2017-10-11 20:13:25 +03:00
Alexander Udalov 5cbcbe4a9c Support -Werror CLI argument to treat warnings as errors
The option is named "warningsAsErrors" in the Gradle plugin

 #KT-10563 Fixed
2017-10-11 19:23:46 +03:00
Anton Bannykh 158c03b07f JS: enable TypedArrays by default 2017-10-11 19:20:24 +03:00
Dmitry Savvinov eae9923dbe Add allowKotlinPackage AnalysisFlag
This flag is used internally by EffectSystem as a sign of compiling
stdlib. If this flag is present, then EffectSystem will read contracts
on functions and serialize them into metadata even if corresponding
LanguageFeatures are turned off. This is done solely for building
1.2-runtime with contracts in it without the need to turn on
LanguageFeatures manually.

======
This commit finishes a first series of commits related to effect
system. After it, compiler is ready to work with contracts, but it is
impossible to actually annotate anything, because there are no
contracts DSL in stdlib yet.
2017-10-11 13:40:16 +03:00
Dmitry Petrov a89f978597 Provide configurable constructor call normalization
Three modes:

- 'disable' (default): normalize constructor calls in coroutines only
  (required because uninitialized objects can't be stored in fields),
  don't insert additional code for forced class initialization;

- 'enable': normalize constructor calls,
  don't insert additional code for forced class initialization;

- 'preserve-class-initialization': normalize constructor calls,
  insert additional code for forced class initialization.
2017-10-10 08:49:19 +03:00
e5l c512db8e1c Validate -Xjsr305 value in CLI 2017-10-03 16:44:02 +03:00
Leonid Stashevsky 95d32d8d1e Add @UnderMigration annotation and options for report level 2017-10-03 16:44:02 +03:00
Alexey Andreev 21e91c4052 JS: rename -source-map-source-roots to -source-map-base-dirs
See KT-19906
2017-10-03 14:26:37 +03:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov 27968c8e13 Set proper jvmTarget for projects 2017-09-19 21:37:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Stanislav Erokhin 7982f3489e Rename compiler key -Xno-check-impl to -Xno-check-actual 2017-09-16 19:47:39 +03:00
Denis Zharkov 4d95c30360 Restore -Xjsr305-annotations flag as a deprecated 2017-09-14 18:05:32 +03:00
Alexander Udalov d32e101802 Support deprecatedName for advanced CLI arguments 2017-09-14 18:05:32 +03:00
Dmitry Petrov 179e720e4a Provide fallback flag for KT-19174
-Xno-exception-on-explicit-equals-for-boxed-null

Also unify corresponding names.
2017-09-14 10:15:28 +03:00