Victor Petukhov
46d0b16142
Use new default settings for java nullability annotations in JavaTypeEnhancementState and get rid of all hardcoded defaults
2021-07-06 09:54:24 +03:00
Victor Petukhov
c8af1b735f
Introduce compiler flag to manage status of specific Java nullability annotations
2021-07-06 09:54:23 +03:00
Alexander Udalov
113632c49c
Psi2ir: load single-value Java array annotation arguments correctly
...
#KT-47467 Fixed
2021-07-05 21:49:10 +02:00
Pavel Punegov
c2fe46020e
Native: improve CompilerVersion to correspond to the versioning schema
...
* Add pub and dev-google-pr meta versions
* Allow using release versions with and without build number
* Add tests for version parsing
2021-07-05 19:43:27 +00:00
Yahor Berdnikau
1bd0607b53
Fix toolchain jdk override was not working for all modules.
...
Now it also considers the case when separate tasks toolchain
are configured or module only has java toolchain.
^KT-46972 Fixed
2021-07-05 21:15:04 +02:00
Zalim Bashorov
8da62b56fb
[IR] Put correct line numbers on return while inlining
...
#KT-46551 In Progress
2021-07-05 21:01:44 +03:00
Zalim Bashorov
d1f5ab4b09
[JS IR] Generate correct source locations in sourcemap for inline declarations
...
* Keep returnable blocks.
* Add a new lowering which simplifies returnable blocks by introducing
temporary variable for result and changing returnable block's type to Unit.
* Use information from returnable blocks in codegen to generate
the right source locations in sourcemap.
* Support in namer (LocalNameGenerator).
* Fix some lowerings to work correctly with returnable blocks.
#KT-46551 In Progress
2021-07-05 21:01:43 +03:00
Zalim Bashorov
2460f5f9ae
[JS CLI] Support sourcemap generation for IR BE in CLI
...
#KT-46551 In Progress
2021-07-05 21:01:41 +03:00
Zalim Bashorov
5a3efc1a98
[JS IR] Fill source info in codegen
...
#KT-46551 In Progress
2021-07-05 21:01:40 +03:00
Zalim Bashorov
64c6d852de
[JS IR] Preparing for introducing sourcemap as another compilation output
...
* Rename `JsCode` to `CompilationOutputs`.
* Rename members of CompilerResult.
#KT-46551 In Progress
2021-07-05 21:01:38 +03:00
Zalim Bashorov
d9b7230144
[JS IR] add dependency to sourcmap module
...
#KT-46551 In Progress
2021-07-05 21:01:37 +03:00
Zalim Bashorov
aae1057f35
[IR] Support IrReturnableBlock inside IR renderer
2021-07-05 21:01:35 +03:00
Ilya Chernikov
32b6cfe2ea
[Scripting] fix receiver substitution in script JVM IR lowering
2021-07-05 19:26:39 +03:00
Ilya Chernikov
0c2591e938
Bump coroutines version used in scripting to 1.5.0
...
#KT-43917 fixed
2021-07-05 19:26:37 +03:00
Tianyu Geng
4c439bb5d7
FIR: fix DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR
...
DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR should be an error but it's
somehow a warning in FIR.
2021-07-05 18:32:37 +03:00
Tianyu Geng
db1db6c64c
FIR: fix CYCLIC_CONSTRUCTOR_DELEGATION_CALL
...
Somehow it's a warning in FIR, but it should be an error.
2021-07-05 18:32:36 +03:00
Jinseong Jeon
cd78a156c5
FIR checker: apply member checkers to anonymous objects
...
because they can have member properties/functions too.
2021-07-05 18:32:34 +03:00
Jinseong Jeon
64a275cf83
FIR: fix type comparator
...
As many other places did, this one is supposed to return the diff value
if the given two intersection types' sizes are different.
2021-07-05 18:32:33 +03:00
Tianyu Geng
cdfb2fb3d9
FIR checker: report SETTER_PROJECTED_OUT
2021-07-05 18:32:32 +03:00
pyos
c3a91efea3
JVM_IR: fix primitive comparison optimizations
...
1. the `primitive == object?.something` fusion should not apply to
`primitive.equals(object?.something)` because it can't;
2. coercions to Int are there for a reason - don't remove them;
3. better optimize `primitive == object?.something` -- the result
should be subject to if-null fusion, so it needs to have a specific
pattern that resembles safe calls.
#KT-47597 Fixed
2021-07-05 18:13:09 +03:00
Yahor Berdnikau
7789054547
Migrate repo to use JVM toolchains Gradle feature.
...
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Dmitriy Novozhilov
6e1fce6b8b
[FIR] Fix creating scopes for enum entry initializers
...
Before we analyzed initializers of enum entry with scope for constructor
in implict type mode, so scope was untouchable. Now we analyze them
in body resolve phase, so previously we add value parameters to
constructors scope, which mess up scope of enum entry initializer
2021-07-04 13:29:03 +03:00
Dmitriy Novozhilov
1593c4859d
[FIR] Get rid of all conditional reads of FirDeclaration.resolvePhase
2021-07-04 13:29:03 +03:00
Dmitriy Novozhilov
43fe0c3bc1
[FIR] Don't initialize type of FirAnonymousObjectExpression
...
In some cases we check that some declaration (e.g. field) was
analyzed by checking type of it's body/initializer (is it implicit
or not), so if type of FirAnonymousObjectExpression is not implicit
we can skip resolve of anonymous object itself
2021-07-04 11:17:50 +03:00
Dmitriy Novozhilov
32173a408a
[FIR] Update type of getter after approximation of property type
2021-07-04 11:17:49 +03:00
Roman Artemev
d472b6c71c
[Psi2Ir] Replace custom IrProperty node with common one
2021-07-02 19:58:31 +03:00
Roman Artemev
4d5186d332
[Psi2Ir] Untangle psi2ir from frontend.java
...
Add extension method to detect and unwrap `JavaSyntheticProperty`
2021-07-02 19:58:30 +03:00
Dmitriy Novozhilov
3f5e6a79c7
Replace all throw error(...) with just error(...)
...
`throw` is not needed in this case, because `error(...)` already
raises exception (so `throw` is unreachable). Also after previous
commit compiler reports `UNREACHABLE_CODE` warning on such `throw`
2021-07-02 17:55:21 +03:00
Dmitriy Novozhilov
ae608ea67f
[FE 1.0] Always create return value for CallInstruction
...
This fixes missing `USED_AS_EXPRESSION` recordings
^KT-47527 Fixed
2021-07-02 17:55:20 +03:00
bracadabra
b2372ff0b9
Fix UTFDataFormatException on encoding long subplugin options.
...
ObjectOutputStream.writeUTF(String) has an unsigned short limit on
String length. On Projects with deep nested modules subplugin
options could produce String over this limit.
^KT-45202 Fixed
2021-07-02 16:17:54 +02:00
Dmitriy Novozhilov
f7c68afb18
[FIR] Don't report EXPOSED_FUNCTION_RETURN_TYPE on property accessors
2021-07-02 15:55:12 +03:00
Dmitriy Novozhilov
3a34a2ca62
[FIR] Properly infer published effective visibility for member declarations
2021-07-02 15:55:10 +03:00
Dmitriy Novozhilov
f1bf3c0d5a
[FIR] Don't duplicate annotations from enum entry to its initializer
2021-07-02 15:55:09 +03:00
Dmitriy Novozhilov
9f547171da
[FIR] Properly calculate annotation targets for enum entries
2021-07-02 15:55:08 +03:00
Dmitriy Novozhilov
7baea7244a
[FIR] Don't report VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION on lambda parameters
2021-07-02 15:55:07 +03:00
Dmitriy Novozhilov
0ab4770f02
[FIR] Add correctly reported diagnostics to testdata
2021-07-02 15:55:05 +03:00
Dmitriy Novozhilov
1f1065d858
[FIR] Add specific checkers for each leaf expression type
2021-07-02 15:55:04 +03:00
Dmitriy Novozhilov
d3ba821371
[FIR] Add specific checkers for each leaf declaration type
2021-07-02 15:55:02 +03:00
Igor Laevsky
ce6459d059
WASM: Optimize few cases where spread operator is used on an immediate array
2021-07-02 15:39:30 +03:00
Igor Laevsky
d835b3c164
WASM: Implement spread operator
2021-07-02 15:39:29 +03:00
Igor Laevsky
f5e59194b5
WASM: Fix linker issues around fake overrides
2021-07-02 15:39:28 +03:00
Dmitry Petrov
c132e1a39f
PSI2IR fix flaky SOE
2021-07-02 13:10:04 +03:00
Roman Golyshev
7b1052296e
Do not try to create a light class for classes in unexpected positions
...
Example of such class declaration would be `10 < class A` expression
The expression is uncompilable, but parsable. Unfortunately, the
FIR compiler does not save `class A` reference in it (because it
is not an expression, and only an expression can be a LHS or RHS of
binary expression `10 < ...`)
When we try to build light classes, we will try to find/build FIR
declaration for this class, but we won't be able to, and this will throw
an error
Adding this check should fix few
`FirKotlinHighlightingPassTestGenerated$Regression` tests
2021-07-02 04:07:26 +03:00
Dmitry Petrov
584310615c
JVM_IR KT-47499 use proper signature for 'clone' intrinsic
2021-07-01 22:10:47 +03:00
Alexander Udalov
e2f462095d
IR: move JVM-specific flexible types to backend.jvm
2021-07-01 19:35:46 +02:00
Alexander Udalov
2834c22a85
IR: add BackendContext.typeSystem and JvmIrTypeSystemContext
...
To be able to override JVM-specific behavior of IrTypeSystemContext in
JVM IR, for things like JVM flexible types.
2021-07-01 19:35:44 +02:00
Alexander Udalov
ae07127f08
JVM IR: support raw types in typeOf
2021-07-01 19:33:56 +02:00
Alexander Udalov
012c7c39af
Improve KType.toString for primitive type arguments in stdlib implementation
2021-07-01 19:33:55 +02:00
Alexander Udalov
7306256127
JVM IR: support mutability-flexible types
2021-07-01 19:33:55 +02:00
Alexander Udalov
0cb905a4b1
Support mutable collection types in typeOf
...
flexibleTypes_1_6.kt is fixed for JVM IR in a subsequent commit.
#KT-35877 Fixed
2021-07-01 19:33:55 +02:00