Ivan Kylchik
f3252334b2
Move most of ir utils from backend.common to ir.tree
2022-05-18 21:20:03 +03:00
Ilya Muradyan
00819c421f
[REPL] Report script codegen errors in advance
2022-05-18 10:02:58 +03:00
Vladimir Dolzhenko
efd5beb49b
IJ file type optimizations based on extension
...
#KTIJ-21668
Merge-request: KT-MR-6288
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com >
2022-05-17 14:46:00 +00:00
Ilya Chernikov
49902bb851
IR Scripting: allow to specify nullable types for provided props...
...
but only explicitly. This does not fix a breaking change described in
#KT-52120, because it seems the correct behavior, but it allows
to "workaround" the problem by specifying nullability explicitly.
Also improve handling of nullable bindings in JSR-223.
#KT-49173 fixed
#KT-51213 fixed
2022-04-29 11:03:11 +00:00
Simon Ogorodnik
58885a1b07
KT-52217 Rename 'use-fir' to 'use-k2', update message
2022-04-28 15:42:42 +00:00
Ilya Chernikov
af933b9d3d
Switch to FastJarFS for scripting
...
#KT-51731 fixed
2022-04-20 19:15:12 +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
Ilya Chernikov
35f80c04ca
IR Scripting: update capturing logic for the REPL, imported scripts,
...
as well as all other implicit receivers.
2022-04-04 14:55:53 +00:00
Ilya Chernikov
2044754628
Backend: remove psi files from generation state
...
pass them explicitly to all destinations. This is a step in attempt to
abstract dependencies on PSI in the GenerationState and related places.
2022-03-30 08:33:59 +00:00
Ilya Chernikov
da41fddabb
Backend: remove codegen factory from generation state
...
use it explicitly. This is a step in attempt to abstract dependencies
on PSI in the GenerationState and related places.
2022-03-30 08:33:51 +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
9d2cadc908
[minor] scripting fixes in obsolete and test code...
...
relax acceptedAnnotations extraction rules for obsolete script template
handling code - the previous variant was failing on the typealias
comparison
also reduce warnings and possible exceptions on some test execution
paths
2022-03-30 08:32:48 +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
Dmitriy Novozhilov
faba9c4272
[CLI] Don't register classpath roots twice
...
There are two ways how content roots are registered in compiler configuration
in JVM CLI compiler:
1. Directly from arguments
2. From Module, which build from arguments
And there was a problem that both ways used at the same time in some
circumstances (regular compilation without .xml module file) which
caused duplication of all content roots.
Ideal solution for this problem is removal of Module usages at all,
because it looks like redundant abstraction which just complicate
things, but it's too scary to remove it, because it hove some none
trivial usages inside compiler. So to fix problem with duplicated
roots this commit just removes registration of roots from arguments
if Module is used
2022-02-23 19:33:51 +03:00
Dmitriy Novozhilov
aab66bd623
[FIR] Support rendering diagnostic names in CLI FIR compiler
2022-01-28 16:12:12 +03:00
Ilya Muradyan
070f537ee9
REPL: Extract IDE-specific tests to a separate test set
2022-01-27 02:23:28 +03:00
Ilya Muradyan
9637b6b848
REPL: Fix REPL scripts metadata to be correctly recognized by class file decompiler
2022-01-27 02:23:27 +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 Novozhilov
dd953908df
[FE 1.0] Add compiler flag for rendering internal diagnostic names in error messages
2022-01-23 11:14:56 +03:00
Irene Dea
19bfc43bee
Fixes and refactors
2022-01-08 15:25:07 +03:00
Ilya Muradyan
bb34a74abb
REPL: Fix completion for protected members
2021-12-24 08:34:40 +03:00
Stanislav Erokhin
61526c9700
Move AbstractJsScriptlikeCodeAnalyser to the kotlin-scripting-compiler-js module
2021-12-23 20:10:19 +03:00
Nikolay Krasko
1e378ed136
Stop publication for kotlin-scripting-compiler-js
...
Library is in undefined status and might be removed soon.
^KTI-741 Fixed
2021-12-23 03:46:33 +03:00
Nikolay Krasko
8ef20aa045
Remove test dependencies from kotlin-scripting-compiler-js
2021-12-23 03:46:31 +03: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
Ilya Chernikov
1450f4d890
Implement property for explicit jvmTarget for script definition...
...
Apply the property to the default JSR-223 script taking the value from
java.specification.version property, so effectively implementing
jvmTarget detection from current VM.
Also drop enforcing of target 1.8, using common default.
#KT-49329 fixed
#KT-40497 fixed
2021-12-14 13:39:21 +03:00
Ilya Chernikov
f0316cde54
[minor] test infrastructure: fix default handling in proc launcher
2021-12-14 13:39:21 +03:00
Ilya Chernikov
ec2d6ea5f1
Restore script testing on both backends, fix some tests
2021-12-14 13:39:19 +03:00
Ilya Chernikov
670575696f
Remove forced old backend for script compilation, using common default
2021-12-14 13:39:19 +03:00
Ilya Chernikov
6d6de9dd76
Implement tests for script instance capturing in the host tests
2021-12-14 13:39:18 +03:00
Ilya Chernikov
10c5071eda
Implement backend error reporting on unsupported script capturing
...
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00
Mikhael Bogdanov
c599b58eb3
Remove obsolete options
2021-12-08 12:25:02 +01:00
Mikhael Bogdanov
0997207c7c
Apply -Xjvm-default for specific modules only
2021-12-03 06:39:38 +01: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
Anastasiya Shadrina
a39fbd3822
[FE] Add getContextReceivers to CallableDescriptor interface
2021-12-02 20:23:17 +03:00
Ilya Muradyan
6917ff7d2a
[scripting] Move earlierScripts to the frontend descriptor
...
^KT-20488 fixed
2021-11-30 09:11:59 +03:00
Dmitriy Novozhilov
93378b1a04
[FE 1.0] Resolve private constructors of sealed classes same as for regular classes
...
^KT-44866
^KT-49729
2021-11-18 13:54:05 +03:00
Mads Ager
6622846bc1
[JVM IR] Do not put destructuring params or underscores in LVT.
...
Putting them in the local variable table means that the debugger
needs to have special handling for parameters with specific names.
That forces us to generate mangled names for these.
Instead of also implementing the name mangling for FIR, this
change gets rid of the parameters from the LVT instead.
2021-11-02 15:13:14 +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
Alexey Subach
ca2f37f6eb
Add possibility to get location of the script.main.kts file
...
#KT-48414 fixed
2021-10-11 15:45:57 +02:00
Ilya Muradyan
58831eacca
[scripting] Make properties from destructing declarations available with reflection
2021-10-07 18:17:21 +03:00
Vyacheslav Gerasimov
f91d6958a8
Build: Rework runtimeJar helper and drop redundant configuration
...
#KTI-559
2021-09-26 20:10:29 +03: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
Alexander Udalov
5d6ca27c93
JVM IR: introduce CodegenFactory.convertToIr
...
The steps of psi2ir and JVM backend need to be separated in the API
because in case of cyclic module dependencies (which are allowed in JPS)
psi2ir should be run first on all sources, and then JVM backend on each
module separately. `CodegenFactory.convertToIr` does nothing in the old
backend.
Also, move the ignoreErrors to GenerationState for simplicity.
2021-09-17 17:39:48 +02: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
eee8b033a6
JVM IR: minimize usages of jvmPhases outside backend.jvm
2021-09-14 22:29:12 +02:00