Dmitriy Novozhilov
e991c9d476
[CLI] Drop CommonCompilerArguments.coroutinesState
2021-01-12 16:47:54 +03:00
Alexander Udalov
12078666c2
Add warning if both -Xuse-ir and -Xuse-old-backend are passed
2021-01-11 12:57:03 +01:00
Alexander Udalov
cb3191769d
Enable JVM IR by default if language version is >= 1.5
...
#KT-44021 Fixed
2021-01-11 12:47:54 +01:00
Alexander Udalov
22d0e5eb65
Rename -Xno-use-ir -> -Xuse-old-backend, add Gradle option
...
As soon as JVM IR is enabled by default (in language version 1.5), use
the CLI argument `-Xuse-old-backend` or Gradle option `useOldBackend` to
switch to the old JVM backend.
2021-01-11 12:47:54 +01:00
Ilya Chernikov
9a7d1948a7
Implement support for -Xdefault-script-extension cli option
2021-01-07 10:37:22 +01:00
Alexander Udalov
ee2ae0c471
JVM IR: remove obsolete -Xir-check-local-names
...
This flag was added a long time ago, at the time when we weren't sure if
we were going to keep the naming of local and anonymous classes
completely equal to the naming in the old backend. Now that we've
decided that we won't keep it equal and there are a lot of differences
already, it's not useful anymore.
2021-01-04 12:13:13 +01:00
Alexander Udalov
eef06cded3
JVM IR: output stable ABI binaries by default
...
#KT-43592 Fixed
2020-12-20 23:14:54 +01:00
Alexander Udalov
06805ffbaa
Change CLI flags for controlling diagnostics for ABI of FIR and JVM IR
...
- Use a more generic `-Xallow-unstable-dependencies` instead of
`-Xallow-jvm-ir-dependencies`
- Change `-Xir-binary-with-stable-abi` to `-Xabi-stability=stable`, with
an additional option to specify `unstable` after a subsequent commit
where JVM IR becomes stable by default
#KT-43592
2020-12-20 23:14:32 +01:00
Victor Petukhov
48d9812d9e
Review fixes around type enhancement and loading type use annotations
2020-12-18 19:32:05 +03:00
Denis.Zharkov
f4a25066a8
Fix freshly added CLI tests for windows agents
2020-12-10 16:15:29 +03:00
Denis.Zharkov
92b402759b
Report incorrect JVM target only when @JvmRecord is actually used
2020-12-09 16:47:25 +03:00
Denis.Zharkov
46c3979acd
Separate JVM target option from javac's --enable-preview analogue
2020-12-09 16:47:24 +03:00
Denis.Zharkov
3abd8b1ab2
Adapt CliTests for api requirement of @JvmRecord
2020-12-09 16:47:24 +03:00
Denis.Zharkov
6e4f84dddf
Add @SinceKotlin("1.5") on JvmRecord annotation
2020-12-09 16:47:23 +03:00
Denis.Zharkov
f64980a597
Add check for bytecode target when @JvmRecord is used
...
^KT-43677 In Progress
2020-12-09 16:47:23 +03:00
Ilya Goncharov
efee3ea648
[JS IR] - Remove file lowering declarations from lowering phases
...
- rename fileToPurenessInitializers onto fileToInitializerPureness
- remove redundant check on top-level property
[JS IR] Rename initialis* to initializ* for consistency
[JS IR] Move propertyLazyInitialization property to context from configuration
[JS IR] Add test on lazy initialization properties order
[JS IR] Add multi module for lazy initialization of properties
[JS IR] Move tests onto js.translator
[JS IR] Rename fileToInitializerPureness according to context name
^KT-43222 fixed
2020-11-24 12:33:44 +03:00
Ilya Goncharov
1b5ebd83de
[JS IR] Lazy initialisation is optional for tests
...
^KT-43222 fixed
2020-11-24 12:33:43 +03:00
Ilmir Usmanov
2cd9016016
IC mangling: Replace compiler hack with configuration flag
2020-11-19 17:39:30 +01:00
Alexander Gorshenev
01ef41ab17
No need to explicitly deprecate -Xdisable-fake-override-validator
...
A warning is produced automagically
2020-11-18 12:46:40 +03:00
Alexander Gorshenev
f42b902bc8
Made -Xfake-override-validator off by default
...
Deprected -Xdisable-fake-override-validator
2020-11-18 12:46:40 +03:00
Martin Petrov
68fdeaf865
Produce deterministic jar files.
...
This resets all timestamps present in jars produced by kotlinc.
This is important for build systems like bazel that rely on
deterministic outputs.
Before:
```
$ kotlinc ~/test.kt -d /tmp/a.jar
$ kotlinc ~/test.kt -d /tmp/b.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/a.jar
1ba022697317f796bd123fb4dc95418a18bcb51a /tmp/a.jar
6d2a2683470c24928f3fbd6768a4c57f55b0d196 /tmp/b.jar
$ unzip -l /tmp/a.jar
Archive: /tmp/a.jar
Length Date Time Name
--------- ---------- ----- ----
75 09-25-2020 16:48 META-INF/MANIFEST.MF
683 09-25-2020 16:48 TestKt.class
28 09-25-2020 16:48 META-INF/main.kotlin_module
--------- -------
786 3 files
```
After:
```
$ kotlinc ~/test.kt -d /tmp/a.jar
$ kotlinc ~/test.kt -d /tmp/b.jar
$ shasum /tmp/a.jar /tmp/b.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/a.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/b.jar
$ unzip -l /tmp/a.jar
Archive: /tmp/a.jar
Length Date Time Name
--------- ---------- ----- ----
75 12-31-1969 19:00 META-INF/MANIFEST.MF
590 12-31-1969 19:00 TestKt.class
36 12-31-1969 19:00 META-INF/main.kotlin_module
--------- -------
701 3 files
```
See https://github.com/JetBrains/kotlin/pull/3226 for a similar change.
2020-11-16 19:25:20 +01:00
Svyatoslav Kuzmich
e51a76bc4e
[Wasm] Basic CLI
...
-Xwasm option that will produce wasm instead of JS when used with -Xir-produce-js
Does not affect klib production
2020-11-10 13:08:04 +03:00
Alexander Gorshenev
5de7a10df0
Eliminated -Xdeserialize-fake-overrides
2020-11-09 16:02:14 +03:00
Alexander Udalov
382a0bd298
JVM IR: clear BindingContext after psi2ir
...
This helps to reduce peak memory in lowerings/codegen by a lot.
A more robust approach would be to have a separate BindingContext for
each file, and clear each of them after running psi2ir on it. This would
also lower peak memory usage in psi2ir.
Provide a fallback workaround compiler argument
-Xir-do-not-clear-binding-context just in case BindingContext is in fact
used somewhere and it's not caught by tests.
2020-10-26 10:34:43 +01:00
Alexander Udalov
48cd86b717
Add JVM target bytecode version 15
...
#KT-41916 Fixed
2020-10-19 14:47:21 +02:00
Victor Petukhov
9f716ba37c
Jspecify: Rename DefaultNotNull to DefaultNonNull
2020-10-08 14:00:10 +03:00
Victor Petukhov
2685c7efce
Jspecify: Rename codeanalysis annotations to jspecify ones
2020-10-08 14:00:10 +03:00
Denis Zharkov
f3a490ee16
Support compiler flag -Xcodeanalysis-annotations
2020-10-08 14:00:09 +03:00
Mikhael Bogdanov
d2c4be18a0
Rename runtime-string-concat option into 'string-concat'
2020-10-06 07:14:39 +02:00
Mikhael Bogdanov
c329c22630
Add runtime string concat options. Some renaming
2020-10-02 11:47:27 +02:00
Pavel Kirpichenkov
1465e10f12
Add language feature for inference compatibility mode
...
The feature is intended for updates in the inference algorithm
that change behaviour compared to the previous stable version.
2020-09-22 15:06:12 +03:00
Igor Yakovlev
c70383cc70
[ULC] Add compiler flag -Xdisable-ultra-light-classes to fallback to light implementation in CLI
2020-09-11 12:49:04 +03:00
Alexander Udalov
e7937db8fa
Add link to the online docs to kotlinc's help
...
#KT-35111 Fixed
2020-09-02 16:45:56 +02:00
Roman Artemev
0bff406a12
[JS IR] Add infra to test compilation with error
...
- add bunch of tests
- fix help test
2020-09-01 14:53:08 +03:00
Alexander Udalov
5e48be3d11
Add a fallback flag -Xno-unified-null-checks for KT-22275
...
#KT-41482 Fixed
2020-08-31 12:43:28 +02:00
vldf
6a15e0410f
[FIR] Fix CLI tests to prevent non-relevant errors from appearing
2020-08-27 16:07:04 +03:00
Nick
aeae898b94
[FIR] Fix issues with properties' fake sources
2020-08-24 11:06:45 +03:00
Nick
c8f8908a01
[FIR] Add NO_THIS & INSTANCE_ACCESS_BEFORE_SUPER_CALL
2020-08-24 11:06:10 +03:00
Nick
7e1c2cfd36
[FIR] Add diagnostic INAPPLICABLE_LATEINIT_MODIFIER + some builtin types
2020-08-24 11:06:06 +03:00
Nick
091e12c093
[FIR] Add diagnostic CONFLICTING_PROJECTION
2020-08-24 11:06:04 +03:00
vldf
a26eeb6ee8
[FIR] Add CLI flag for running extended checkers
2020-08-18 21:53:07 +03:00
Dmitriy Novozhilov
0e53d11dd4
Disable AllowResultInReturnType feature
...
#KT-40843
2020-08-10 17:57:53 +03:00
Mikhail Zarechenskiy
0c13a7f89a
Fix accessibility check for experimental declarations from default scope
...
#KT-40919 Fixed
2020-08-07 17:49:15 +03:00
Nick
6c0abe7e48
[FIR] Fix CliTestGenerated$Jvm.testFirError
2020-08-07 13:27:29 +03:00
Mikhail Glukhikh
e841b3a77b
[FIR] Add diagnostic collection to KotlinToJVMBytecodeCompiler
2020-08-04 22:27:18 +03:00
Mikhail Glukhikh
9c3b8484b9
[FIR TEST] Add CLI test with should-be-error (not yet)
2020-08-04 22:27:18 +03:00
Mikhail Zarechenskiy
0c8b847ae6
Introduce compiler key to disable compatibility resolution mechanism
...
Enable it if one was using new inferene before 1.4
#KT-40128 Fixed
#KT-40112 Fixed
#KT-40113 Fixed
2020-07-10 14:23:45 +03:00
Mikhail Bogdanov
b5b5c8aebc
Check target for -Xjvm-default modes
...
#KT-39925 Fixed
2020-06-30 19:47:06 +02:00
Alexander Gorshenev
41a472693a
Updated extraHelp test data for the new flags
2020-06-29 21:58:32 +03:00
Ilmir Usmanov
f127a0f593
Add flag to disable new spilled variable type analysis
2020-06-29 20:50:43 +02:00