Commit Graph

44 Commits

Author SHA1 Message Date
Alexander Udalov 4cb5a4fb6d Fix misc typos in IR backends 2019-03-28 14:26:09 +01:00
Georgy Bronnikov fae003866b Use CLI compiler arguments directly in PhaseConfig creation 2019-03-21 23:32:25 +03:00
Georgy Bronnikov c618ef9304 Correct phase argument names and cli test outputs 2019-02-28 11:53:02 +03:00
Georgy Bronnikov ffa3d7c57a Update test data 2018-11-29 12:48:52 +03:00
Mikhail Zarechenskiy 169599abcc Add flag to allow using kotlin.Result as a return type
#KT-26659 Fixed
2018-09-11 10:39:11 +03:00
Alexander Udalov 9311ea5d25 Support progressive mode via "-progressive"
#KT-25862 Fixed
2018-09-10 14:12:31 +03:00
Alexander Udalov 0f003802fe Introduce -Xcommon-sources and pass it correctly from build tool plugins
#KT-25196 In Progress
2018-08-21 12:49:10 +02:00
Alexander Udalov 871b896a21 Add internal compiler argument to change metadata version
Will be used in tests to check how we behave on binaries produced by a
"future" compiler
2018-07-18 17:59:37 +02:00
Alexander Udalov 0c45f20515 Minor, fix several CLI argument descriptions 2018-06-27 13:25:30 +02:00
Dmitry Savvinov e8181c0473 Introduce -Xprogressive 2018-05-18 16:16:23 +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
Anton Bannykh 703611a15c Revert "JS: remove -XtypedArraysEnabled flag (always true now)"
This reverts commit 4a5e9bb
2018-04-10 20:45:07 +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
Alexander Udalov 77625831f7 Support -Xexperimental and -Xuse-experimental, validate their values
#KT-22759 In Progress
2018-02-08 17:07:22 +01: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
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
Mikhail Glukhikh c0dd97b40d Migration to expect/actual: fix CLI tests 2017-09-16 19:47:41 +03:00
Stanislav Erokhin 7982f3489e Rename compiler key -Xno-check-impl to -Xno-check-actual 2017-09-16 19:47:39 +03:00
Alexander Udalov fb4bf4e5b8 Report error if Java 9 module "kotlin.stdlib" is not found in the graph
Use "-Xallow-kotlin-package" to suppress this error

 #KT-19176 Fixed
2017-08-30 15:47:54 +03:00
Alexey Sedunov e6f1a3ccf3 Minor: Use Kotlin reflection in usage printing and update test data 2017-08-02 13:08:06 +03:00
Anton Bannykh 2e9a59819a JS: support internal visibility from friend modules
Friend modules should be provided using the -Xfriend-modules flag
in the same format as -libraries. No manual configuration required for
JPS, Gradle and Maven plugins.

Friend modules could be switched off using the -Xfriend-modules-disabled
flag. Doing that will
  * prevent internal declarations from being exported,
  * values provided by -Xfriend-modules ignored,
  * raise a compilation error on attemps to use internal declarations from other modules

Fixes #KT-15135 and #KT-16568.
2017-05-04 21:44:17 +03:00
Alexander Udalov d8d3bafbe9 Introduce "-Xreport-output-files" to report source-output mapping for JPS
This makes "-verbose" not required for JPS to run correctly and
therefore allows to print more useful debugging stuff in the compiler
and read them in CLI, for example. The output will also be more readable
because there'll be no "output" messages
2017-04-28 20:49:28 +03:00
Alexander Udalov 072f87ddab Introduce -Xintellij-plugin-root, deprecate CompilerJarLocator 2017-04-14 20:13:11 +03:00
Alexander Udalov be54e4b93b Get rid of coroutinesWarn/coroutinesEnable/coroutinesError
Use a single coroutinesState instead. Change the coroutines state in
some tests from "warn" to "enable"/"error" to test that deserialization
of older config files works ("warn" is the default value, so it wasn't
testing anything here)
2017-04-14 20:07:54 +03:00
Alexander Udalov f4b6db4dc0 Change format of -X arguments to require value after '='
Report a warning when an argument is passed in the old form (with the
whitespace)

 #KT-17264 Fixed
2017-04-14 20:07:54 +03:00
Dmitry Jemerov 406714a1f4 Remove warning for running the compiler under Java 6/7
Now the compiler won't even start, so no need to check this manually.
2017-04-10 17:30:03 +02:00
Anton Bannykh 9b34e21619 JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).

The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Dmitry Jemerov af7de9a0c5 Warn when running the compiler under Java 6 or 7
(cherry picked from commit 5537800)

(cherry picked from commit 5614874)
2017-03-01 16:21:57 +01:00
Alexander Udalov 2e8bfde2e7 Move -Xskip-metadata-version-check from JVM to common arguments
To be used in JS
2017-02-15 10:46:48 +03:00
Alexander Udalov 20d856fa77 Minor, remove blank line in extra help 2017-02-13 14:09:38 +03:00
Zalim Bashorov 29ac01f2e2 KJS: allow to use packages with names starting with "kotlin" only if the -Xallow-kotlin-package command line option is specified
#KT-14668 Fixed
2017-01-29 17:21:01 +03:00
Mikhail Zarechenskiy d1a3c4c48b Fix description of -Xcoroutines key 2016-12-15 23:58:11 +03:00
Mikhail Zarechenskiy 664485f4bb Introduce keys to control applicability of coroutines
By default now we produce warnings on coroutines
2016-12-15 23:58:07 +03:00
Alexander Udalov 204873edf2 Support "-Xno-check-impl" argument, check only real declarations
Use "-Xno-check-impl" to suppress checking whether the platform declaration
implementation has the "impl" modifier.

Do not check presence of fake overrides from platform class in the impl class,
otherwise there would be a lot of errors about the fact that
equals/hashCode/toString are not marked with the "impl" modifier
2016-11-25 20:50:29 +03:00
Alexander Udalov 73f872172f Add multi-platform projects as experimental language feature 2016-11-22 18:19:01 +03:00
Dmitry Jemerov 5eb4a47a1a command line flag to repeat compilation multiple times 2015-06-17 14:55:12 +02:00
Yan Zhulanow 6ab2dc90f8 Fix cli help tests 2015-02-26 15:25:54 +03:00
Alexey Tsvetkov 436fc33e84 Minor testData: fixed -Xno-inline option at extraHelp.out 2014-10-03 14:23:57 +04:00
Alexander Udalov 160cde09d6 CLI: Support "-X" advanced options, simplify some boolean options 2014-08-13 11:10:37 +04:00