Commit Graph

101 Commits

Author SHA1 Message Date
Igor Laevsky 43eeaa925f [Wasm] Add ability to choose flavor for the wasm launcher 2021-11-03 16:23:01 +03:00
Svyatoslav Kuzmich 3f8dce4b53 [JS IR] Support per-file mode and ES modules 2021-10-12 23:29:39 +03:00
Ilya Goncharov 064744fae7 [JS IR] Remove redundant legacy property access property 2021-09-24 07:07:12 +00:00
Igor Yakovlev b8d11f7938 [WASM] Add text section to implement debug info 2021-09-20 19:08:21 +03:00
Victor Petukhov 86d8468b8b Introduce a compiler X-flag to use the builder inference by default for all calls
^KT-48622 Fixed
2021-09-08 13:09:19 +03:00
Alexander Udalov 0a10cec579 Remove obsolete -X compiler arguments for JVM backend
-Xno-exception-on-explicit-equals-for-boxed-null
-Xstrict-java-nullability-assertions
-Xuse-old-spilled-var-type-analysis
-Xpolymorphic-signature
2021-09-02 22:11:22 +02:00
Ilya Goncharov ecefda58fb [JS IR] Add separate key to enable extensions in external interfaces 2021-09-01 13:47:12 +00:00
Victor Petukhov dc8dbad0bc Add compiler X-flag to enable self upper bound type inference
^KT-48026 Fixed
2021-08-04 17:36:52 +03:00
Ilya Chernikov 5b2acea98f FIR: Add analysis flag for loading IR builtins from sources 2021-07-16 02:24:32 +03:00
Mikhail Glukhikh 113d2653aa Drop deprecated -Xexperimental flag from compiler and tests 2021-07-14 21:18:23 +03:00
Victor Petukhov 33a281c637 Introduce separate compiler flag for unrestricted builder inference 2021-07-12 13:57:13 +03:00
Ilya Goncharov 21a3494bca [JS IR] Add test with boolean in external interface
[JS IR] Add possibility to safely access Boolean in external declaration

[JS IR] Add diagnostic for booleans in externals
2021-06-29 10:12:54 +00:00
Ilya Goncharov f40110eb83 [JS IR] Fixes after rebase 2021-05-20 16:37:52 +03:00
Ilya Goncharov d65cbdf44d [JS IR] Fixes in tests
- Compilation of tests
- add arguments to extra help
2021-05-20 16:37:50 +03:00
Ilya Goncharov b9fc97b44f [Gradle, JS] Add arguments for building caches 2021-05-12 11:57:14 +03:00
Ilya Goncharov bd2601f289 [JS IR] Extract adding of function call to another function
[JS IR] Add option for dce mode

[JS IR] Add logging to non useful declarations if appropriate dce mode

[JS IR] Add mode with throwing exception

[JS IR] unreachableDeclaration method is in rootDeclarations

[JS IR] Add js extra help arg with dce mode and include debug.kt to compile unreachableMethod

[JS IR] unreachableDeclaration as internal to not reproduce stdlib api

[JS IR] Fix description of dce mode argument

- Use console.error instead of console.log
- Use JsError instead Kotlin exception for lightweight

[JS IR] Remove body for throwing exception

[JS IR] Remove default parameter in unreachableDeclaration

[JS IR] Process without removing fields and declaration containers

[JS IR] Rename dce mode on dce runtime diagnostic

[JS IR] Use console.trace instead of console.error

[JS IR] Extract JsError

- Fix naming in prependFunctionCall
- Fix description on runtime diagnostic argument
- Using message collector instead of throwing exception

[JS IR] Distinguish unreachableMethods for log and exception

[JS IR] Extract checking of Kotlin packages of IrField

^KT-45059 fixed
2021-02-20 12:05:06 +03:00
Pavel Kirpichenkov 2a46da906c Provide additional information about missing supertypes
Add -X flag to report extra compiler diagnostics which migth break compatibility.
Use the flag to unconditionally check constructors without fear of
prematurely evaluating lazy supertypes.

KT-19234
KT-42404
KT-44583
2021-02-08 18:47:30 +03:00
Alexander Udalov bd45a6c11d Support -Xsuppress-version-warnings to suppress API/language version warnings
To be used in the project after bootstrap to get rid of warnings like
"Language version 1.3 is deprecated, ..." which prevent us from enabling
`-Werror` in `:compiler:cli` and other modules.
2021-02-03 13:07:04 +01:00
Roman Artemev 2daf0cc11c [JS IR] Support additional repositories in CLI (cli part) 2021-01-26 19:23:22 +03:00
Dmitriy Novozhilov e991c9d476 [CLI] Drop CommonCompilerArguments.coroutinesState 2021-01-12 16:47:54 +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
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
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
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
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
vldf a26eeb6ee8 [FIR] Add CLI flag for running extended checkers 2020-08-18 21:53:07 +03:00
Alexander Gorshenev 41a472693a Updated extraHelp test data for the new flags 2020-06-29 21:58:32 +03:00
Anton Bannykh da79f93c61 JS IR: per-module .js generation support 2020-06-26 17:55:33 +03:00
Alexander Udalov a0400f59c2 Add -Xskip-prerelease-check compiler argument
#KT-38070 Fixed
2020-05-07 13:24:26 +02:00
Ilya Matveev e4f4b4eef0 [JS IR] Support setting custom module name (= unique name)
Required for #KT-36721.
2020-04-22 10:50:26 +07:00
Alexander Gorshenev 97be5617ca Renamed -Xklib-mpp to -Xexpect-actual-linker to reduce user confusion 2020-04-08 05:23:12 +03:00
Zalim Bashorov 2a7e32d3ae [JS IR DCE] Add CLI option to print reachability info 2020-03-11 12:54:39 +03:00
Anton Bannykh 1e96c3d21e DCE-driven mode
:js:js.tests:jsIrTest works same as before
:js:js.tests:jsPirTest runs tests in DCE-driven mode
2020-02-06 21:03:41 +03:00
Svyatoslav Kuzmich fbf71be30c [JS IR BE] Support mode of linking multiple klibs without .kt files 2020-01-14 18:00:29 +03:00
Alexander Gorshenev dc8240c24e Expect/actual support in klibs under -Xklib-mpp 2019-12-18 19:29:56 +03:00
Alexander Udalov e009c7064e Add -Xopt-in command line argument
As per https://github.com/Kotlin/KEEP/pull/201
2019-12-17 18:17:48 +01:00
Anton Bannykh 81699299f5 JS_IR: DCE
Could be enabled by toggling `-Xir-dce`

Box test output in js/js.translator/testData/out-min
2019-11-26 12:20:39 +03:00
Svyatoslav Kuzmich 42c4591df8 [JS IR] Add -Xgenerate-dts CLI argument 2019-11-12 18:19:06 +03:00
Nikolay Krasko 155a760ee9 Revert "Revert [JS IR] commits that failed build"
This reverts commit 740f851a
2019-11-07 16:24:13 +03:00
Leonid Startsev 3b100e57f2 Change NO_EXPLICIT_VISIBILITY_IN_API_MODE diagnostic range to 'declaration modifiers + name'.
Motivation: missing visibility modifier is an error in visibility modifiers list, so we should highlight this list.
Including a name in the range is convenient for using alt+enter (you don't have to move cursor from name to fun/class/val keyword)

 Also change NO_EXPLICIT_RETURN_TYPE_IN_API_MODE diagnostic range to 'declaration name' to match corresponding IDE inspection.

Fix stylistic problems and typos after review
2019-11-06 19:54:00 +03:00
Leonid Startsev ebb7e434c8 Explicit Api mode: Renamings after design discussions
Change CLI flag to -Xexplicit-api=strict|warning. 'Disable' state and 'mode' suffix are left out as implementation details.

Change intention title to 'make X public explicitly'

Do not report 'no explicit visibility' on property accessors

Set DECLARATION_SIGNATURE as a range for report

Rename internal diagnostic from _MIGRATION to _WARNING
2019-11-06 19:53:59 +03:00
Leonid Startsev 7058492b55 Explicit Api mode: prototype with check for missing explicit visibility
Add cli flag with 3-state switch
2019-11-06 19:53:58 +03:00
Dmitriy Novozhilov ca4784ffd3 Fix CLI testdata broken in 7f58162a 2019-11-05 15:41:35 +03:00
Nikolay Krasko 740f851a10 Revert [JS IR] commits that failed build
Revert "[JS IR] Build hybrid versions of stdlib and kotlin.test"
This reverts commit b9f88350dd.

Revert "[JS IR] Add gradle plugin integration tests"
This reverts commit d872b27663.

Revert "Update bootstrap"
This reverts commit bc47594c7a.

Revert "[JS IR] Support generating both IR and pre-IR libraries"
This reverts commit 1b8df45bfe.
2019-11-05 13:58:39 +03:00
Svyatoslav Kuzmich 1b8df45bfe [JS IR] Support generating both IR and pre-IR libraries
Remove all previous -Xir options

Add:
 -Xir-produce-klib-dir
 -Xir-produce-klib-file
 -Xir-produce-js
 -Xir-only
2019-11-01 19:42:05 +03:00
Vitaliy.Tikhonov f59e393e37 [CLI] add support running scripts in js compiler, extract common code with jvm part 2019-10-10 12:52:06 +03:00