Commit Graph

1425 Commits

Author SHA1 Message Date
Ivan Kylchik f3252334b2 Move most of ir utils from backend.common to ir.tree 2022-05-18 21:20:03 +03:00
Simon Ogorodnik 58885a1b07 KT-52217 Rename 'use-fir' to 'use-k2', update message 2022-04-28 15:42:42 +00:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Denis.Zharkov 55159eba45 FIR: Do not verify descriptors consistency for FIR-based IR functions 2022-04-06 16:05:40 +00:00
Ilya Chernikov 03cbfea737 FIR LT: Introduce source file abstraction, carry it from parsing to IR
along with source lines mapping, allows to "emulate" usage of the
PSI files which allows to extract source file and line mapping info
on every stage from source element.
It makes sense to use this mapping for the error reporting too.
2022-03-30 08:34:30 +00:00
Ilya Chernikov a08e70ae5c FIR CLI: fix java sources search scope usage 2022-03-30 08:33:27 +00:00
Ilya Chernikov f89765eb33 Make JDK classpath roots configuration explicit...
instead of relying on the "configuration files" parameter.
(in the process of migration from KotlinCoreEnvironment).
2022-03-30 08:32:56 +00:00
Ilya Chernikov 275135a1b2 FIR: extend cli pipeline with incremental compilation logic
use it in the IncrementalCompilationRunner
2022-03-30 08:31:10 +00:00
Ilya Chernikov 12d49c2cd8 FIR: new cli pipeline with LightTree support 2022-03-30 08:29:47 +00:00
Victor Petukhov b5933c70e2 [FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds 2022-03-23 21:13:33 +00:00
Mikhail Glukhikh 9aaf7b7d24 FIR: drop pluginPhase special parameter 2022-03-10 20:42:40 +00:00
Dmitriy Novozhilov 44bfb6fde8 [FIR] Don't register FirJavaElementFinder for common session 2022-02-18 17:44:40 +03:00
Victor Petukhov 5c8ca0ca9b [Compiler CLI] Use reading language version settings from environment only if the resource is presented or flag is set 2022-02-16 18:41:51 +03:00
Victor Petukhov 683a3e74a0 [Compiler CLI] Implement reading language version settings from environment variable
^KT-51306 Fixed
2022-02-16 18:41:50 +03:00
Dmitriy Novozhilov 0bd3e8f418 [FIR] Rename ConeClassErrorType to ConeErrorType, drop ConeKotlinErrorType alias 2022-02-07 13:36:33 +03:00
Georgy Bronnikov 6a3a375372 IR: pass DescriptorByIdSignatureFinder as parameter to DeclarationStubGeneratorimpl
This breaks dependency between serialization.common and psi2ir modules.
2022-01-27 01:02:23 +03:00
Georgy Bronnikov 3cc883cf7b IR: use DescriptorBySignatureFinder in DeclarationStubGenerator
Duplicating code that was used for the same purpose in
DeclarationStubGenerator is removed.
2022-01-27 01:02:14 +03:00
Dmitriy Dolovov 7df68af664 [IR, Native] KLIB ABI tests: backup but don't overwrite artifacts
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov 9096725d1d [IR, JS] KLIB ABI tests: separate testing logic so that it can be reused in non-JS tests
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov d64a720749 [IR, JS] KLIB ABI tests: create KotlinCoreEnvironment in setUp()
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov d80572dac8 [IR, JS] KLIB ABI tests: create and clean up build directory with setUp()/tearDown()
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov 703fd8539d [IR, JS] KLIB ABI tests: don't create unnecessary disposable
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Novozhilov dd953908df [FE 1.0] Add compiler flag for rendering internal diagnostic names in error messages 2022-01-23 11:14:56 +03:00
Dmitriy Novozhilov 50f6825775 [FE 1.0] Cleanup code of ControlFlowProcessor
- Always pass not nullable language version settings
- Fix warnings and style
- Remove redundant pseudocode utils
2022-01-14 14:26:53 +03:00
Irene Dea 19bfc43bee Fixes and refactors 2022-01-08 15:25:07 +03:00
Roman Artemev 353bfe9018 [JS IR] Cleanup pir IC code 2021-12-24 16:50:40 +03:00
Sergej Jaskiewicz 3fb1096c18 [JS IR] Support IR dump in JS tests 2021-12-22 17:55:33 +00:00
Roman Artemev e17f121b23 [JS REPL] Extract JS script/repl parts into separate module
- don't load js evaluation plugin in CLI compiler
2021-12-21 04:15:11 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Roman Artemev fb84287ae0 [KLIB] Compute relative path instead of absolute if relative base is provided
- normalize  path if required
 - path it in JS/Native
 - path null for JVM (temporary)
 - fix build
2021-12-15 21:13:52 +03:00
Dmitriy Dolovov 60dcafcf43 [Test] TestGen: Use canonical class names for generated imports
This is needed to have correct class names for inner/nested classes. For example, to have `import java.util.AbstractMap.SimpleEntry` instead of `import java.util.AbstractMap$SimpleEntry`.
2021-12-14 13:48:23 +03:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Evgeniy.Zhelenskiy cb4ec932d7 [Tests] Introduce replacing source transformer 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy 2874462e3a [Tests] Introduce transformers functions object 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy af73034235 [Tests] Introduce runTest with transformer to old testing framework 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy 9b196c738f [Tests] Generify transforming tests method model 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy e62c6e3eac [Tests] All tests correct generation 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy f92290dfdf [Tests] Generate runTest with transformer parameter + example 2021-12-10 18:19:15 +03:00
Roman Artemev c3c2bb5884 [TEST] Add Klib ABI test runner logic
- common and js-specific classes
2021-12-08 20:18:14 +03:00
Roman Artemev 699f16ba55 [KLIB] Move klib-related tests into separate package/directory
- regenerate tests
2021-12-08 20:18:08 +03:00
Anastasiya Shadrina 37495bcba0 [FE] Change resolution scheme 2021-12-02 20:23:57 +03:00
Anastasiya Shadrina d923c95671 [FE] Add context receivers to scope 2021-12-02 20:23:22 +03:00
Dmitriy Novozhilov ce218b8a0b [FIR] Make FirExtensionRegistrar a proper extension point
After that commit it's allowed to register any FIR plugin using
  existing extension infrastructure (`-Xplugin` CLI argument,
  plugin.xml for IDE plugins, etc)
2021-11-30 12:57:50 +03:00
Alexander Udalov 1b5e3f5d51 Deserialize repeated annotations inside implicit container
#KT-49651 Fixed
2021-11-18 15:33:34 +01:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Denis.Zharkov 360d67410d FIR: Fix overridability rule for Java declarations with different return type kinds
See the class at org/jmock/Expectations
public <T> T with(Matcher<T> matcher);
public boolean with(Matcher<Boolean> matcher);

When we extending such class it we start assuming
that fake generic override overrides both of the overridden that is wrong
from POV of Java and it fails at FIR ultimate build

NB: It's hard to write a test because such Expectation-like
class is impossible to write in pure Java
2021-11-02 19:08:28 +03:00
Stanislav Erokhin f455141ade [ULC] Fix rendering for Foo.class in annotation value
Previously it was Foo::class, but it isn't correct because in java it
is Foo.class

P.s. Array<Foo> cannot be passed as annotation parameter
2021-11-01 10:38:09 +00:00
Ilya Chernikov 5446168770 Add path to FirFile to pass it to the DiagnosticContext 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