Commit Graph

2642 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
Mikhael Bogdanov 40158d1ce6 Update -Xjvm-default description 2021-11-01 13:30:58 +01:00
Mikhael Bogdanov afc149d460 JvmDefault. Allow non default inheritance with special flag
#KT-47000
2021-11-01 13:30:57 +01:00
Artem Kobzar 979e9f94ef feat(Escaped Identifiers): add ability to use any symbol wrapped in back ticks. 2021-10-29 17:55:59 +00:00
Ilya Chernikov 70366dc7a6 Refactor diagnostic & result reporters...
to better reflect actual roles
2021-10-27 22:17:41 +02:00
Ilya Chernikov fc176e9845 Refactor IR reporting and infrastructure 2021-10-27 22:17:41 +02:00
Ilya Chernikov da2d3f29da Add multiple renderer sources support to new diagnostics infrastructure 2021-10-27 22:17:41 +02:00
Ilya Chernikov 1ce4075112 Prepare CLI reporting infrastructure for non-PSI diagnostics 2021-10-27 22:17:40 +02:00
Ilya Chernikov 9e60c70db7 Add abstract source element and switch diagnostics to it 2021-10-27 22:17:40 +02:00
Ilya Chernikov e9f59e8d1d Move common diagnostics infrastructure to frontend.common 2021-10-27 22:17:39 +02:00
Ilya Chernikov 31c58767cf Rearrange fir diagnostic for further reuse 2021-10-27 22:17:39 +02:00
Ilya Chernikov a65beb2dc5 Move Fir*SourceElement to frontend.common, rename to Kt* (complete) 2021-10-27 21:44:11 +02:00
Victor Petukhov 012f1f6013 Introduce a compiler X flag to enable enhancing not null annotated type parameter's types to definitely not null types 2021-10-26 19:37:59 +03:00
Ilya Gorbunov 4e6243c4f7 Restore useIR Gradle option as HIDDEN (KT-45504)
This will allow to KEEP binary compatibility with
the Compose plugin 1.0.1 for a bit longer

Merge-request: KT-MR-4857
2021-10-26 15:37:31 +00:00
Mikhail Glukhikh 37b95972db Uncomment warning about -Xopt-in deprecation 2021-10-26 13:38:40 +03:00
Ivan Kochurkin c13822a2c5 Optimize containsKey -> get pattern 2021-10-25 21:21:44 +03:00
Aleksei.Cherepanov 276fb77155 Fix incremental build after changing Java const used as class property
Report Java static final constant with InlineConstantTracker, used as class property in Kotlin for further registration in JPS

#KT-49177 Fixed
2021-10-20 15:06:19 +03:00
Dmitriy Novozhilov bee44c6e0f [FIR] Split :compiler:fir:resolve module into three different modules
Those modules are:
- :compiler:fir:providers, which contains Fir and Symbol providers,
    scopes, and different utilities used by them
- :compiler:fir:semantics, which contains different abstractions and
    entities which are used in resolution and in checkers
- :compiler:fir:resolve, which contains all stuff related to resolution
    and inference

There are two pros of this change:
1. It may increase gradle build, because it allows to compile :fir:resolve
  and :fir:checkers modules in parallel
2. Logic of working FIR (scopes, providers, DFA logic system, etc) is
  now separated from logic of resolution phases, so for example checkers,
  which are depend on scopes physically will not be able to run resolve
  in any way
2021-10-18 11:10:47 +03:00
Anton Bannykh 546ce501cb [JS IR] run IC box tests 2021-10-15 20:14:51 +03:00
Svyatoslav Kuzmich 0f66f85cf9 [Wasm] Support main function 2021-10-15 13:58:55 +03:00
Igor Laevsky bede039c08 [Wasm] Add compiler support for the kotlin.test library 2021-10-14 17:24:05 +03:00
Svyatoslav Kuzmich 3f8dce4b53 [JS IR] Support per-file mode and ES modules 2021-10-12 23:29:39 +03:00
Dmitriy Novozhilov fc1f2e9c72 [FIR2IR] Run IrGenerationExtensions after fir2ir stage 2021-10-12 17:26:38 +03:00
Georgy Bronnikov 4caa71538d JVM_IR: introduce modes for IR serialization
Instead of a Boolean flag -Xserialize-ir, use modes: none,inline,all.
In "inline" mode, only information needed to deserialize bodies of inline
functions is serialized.
In the "all" mode, all declarations are serialized completely.
2021-10-11 11:53:29 +03:00
Simon Ogorodnik 64a30cd95e KT-44765: Fix classloader leak in CoreJrtFileSystem 2021-10-08 04:09:56 +03:00
Denis.Zharkov 0d072de737 Do not check package validness for ones that we just checked already 2021-10-07 17:26:28 +03:00
Ilya Goncharov 01fbe6bacc [JS IR] Use property lazy initialization by default 2021-10-01 13:32:11 +00:00
Alexander Udalov aa247726b6 Prohibit using old JVM backend with LV >= 1.6
#KT-48928 Fixed
2021-09-30 13:56:34 +02:00
Ilya Gorbunov ec5c06238d Split language and api version lifetimes, restore apiVersion 1.3 support
KT-49007
2021-09-29 21:46:53 +03:00
Ilya Gorbunov 47adc4fdaa Prolong -no-stdlib option lifetime and regenerate Gradle compilation options
-no-stdlib may still be required internally for kotlin gradle plugin
to launch the compiler with the correct options.
2021-09-29 21:46:52 +03:00
Svyatoslav Kuzmich 841f5a583e [Wasm] Support wasm target in multiplatform plugin 2021-09-28 18:26:07 +03:00
nataliya.valtman 452dfd6edd Use default performance manager for K2JVMCompiler 2021-09-28 09:20:50 +00:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ilya Goncharov 064744fae7 [JS IR] Remove redundant legacy property access property 2021-09-24 07:07:12 +00:00
Denis.Zharkov 54a97a860a FIR: Minor. Rename JavaClassConverter -> FirJavaFacade 2021-09-23 16:58:24 +03:00
Denis.Zharkov 1fc2f13a35 FIR: Pull creation of JavaClassConverter to session factory 2021-09-23 16:58:22 +03:00
Igor Yakovlev b8d11f7938 [WASM] Add text section to implement debug info 2021-09-20 19:08:21 +03:00
Dmitriy Novozhilov 8286927e8c [FIR] Support .jar output with -Xuse-fir flag
To proper support we need to fully implement main function detector,
  see KT-44557

^KT-42868 Fixed
2021-09-20 15:29:45 +03:00
Alexander Udalov 987a346015 JVM IR: support cyclic module dependencies
The only way to make the compiler compile several modules with a
dependency loop is via the "build file", given by -Xbuild-file and used
in the JPS (IntelliJ built-in build system) plugin.

For the old frontend/backend it works like this: we _analyze_ sources of
all modules once, as if it's one big module, and then for each module,
we _generate_ (invoke backend) only sources of that module. Backend
needs to be invoked separately per-module because every module has its
own destination directory specified in the build file.

For JVM IR, this separation into just two steps, analyze and generate,
was problematic because there's psi2ir, which works like frontend, in
that it needs the global analysis result to be able to create and link
IR correctly. So, in case of JVM IR, we need to run psi2ir on the whole
module after analysis and before generation.

In this change, psi2ir is run on the whole module via
`CodegenFactory.convertToIr` (which does nothing in the old backend),
and then parts of the resulting IR module are extracted according to the
original separation of the combined module into individual modules via
`getModuleChunkBackendInput` by matching IrFile against KtFile. And
then, backend is run for each such module.

 #KT-45915 Fixed
 #KT-48668 Fixed
2021-09-17 17:39:49 +02:00
Svyatoslav Kuzmich 7e399202a2 [Wasm] Support generating browser-compatible JS harness
* Use fetch and instantiateStreaming
* Call main export if it is present
* Produce a variable with module name that contains a
  promise of module exports
2021-09-16 14:14:58 +03:00
Alexander Udalov 5df316a129 Minor, rename module backend.jvm:backend.jvm.entrypoint -> backend.jvm.entrypoint 2021-09-14 22:29:13 +02:00
Alexander Udalov 7efc9dac9b JVM IR: extract lowerings to a separate module
Together with extracting codegen to a separate (unrelated) module in the
future, hopefully it'll speed up the build of JVM IR by making it more
parallel, and helping incremental compilation to avoid recompiling code
that depends on lowerings because of `implementation` dependency.
2021-09-14 22:29:12 +02:00
Alexander Udalov eee8b033a6 JVM IR: minimize usages of jvmPhases outside backend.jvm 2021-09-14 22:29:12 +02:00
pyos 3a80cb1808 FIR: hide construction of JavaSymbolProvider 2021-09-14 19:00:45 +03:00
Roman Artemev a2e4ebd820 [JS IC] Support //RECOMPILE directive in js box tests
- change test runner to production mode when sources are being compiled
 into klib and then klib is being translated into js, not directly from
 kt to js
 - fix IC cache format
 - support IC tests
2021-09-13 13:44:55 +03:00
Aleksei.Cherepanov cc5382b37e [JPS] Fix incremental build after changing Java constant
InlineConstantTracker implemented for tracking changed java static final constants, that used in kotlin.

#KT-46506 Fixed
2021-09-11 13:00:00 +03:00
Mikhail Glukhikh 007cf2ce7c Rename AnalysisFlags.useExperimental to optIn 2021-09-10 16:29:18 +03:00
Ivan Kochurkin cfd2835254 [FIR] Add JVM Default diagnostics 2021-09-10 00:48:59 +03:00
Dmitriy Novozhilov 405670e111 Merge :compiler:fir:jvm module into :compiler:fir:java 2021-09-09 17:20:14 +03:00
Dmitriy Novozhilov 8ffe3764ef Remove dependency on descriptors from :compiler:config.jvm 2021-09-09 17:20:13 +03:00