Commit Graph

85138 Commits

Author SHA1 Message Date
Igor Yakovlev
035f1ff89f [FIR IDE] Add ValueWithPostCompute recursive guard 2021-08-19 21:26:07 +02:00
Igor Yakovlev
d0e25eb987 [FIR IDE] Preprocess cone types in psi type mapper 2021-08-19 21:26:07 +02:00
Igor Yakovlev
79b70a6f98 [FIR IDE] Ensure resolved for status when resolving local declarations 2021-08-19 21:26:07 +02:00
Igor Yakovlev
21f36ef19a [FIR IDE] Fix inner light classes creation 2021-08-19 21:26:07 +02:00
Igor Yakovlev
0ca7fb7af5 [FIR] Fix JvmTypeMapper for generic type aliases 2021-08-19 21:26:06 +02:00
Igor Yakovlev
9bc695e245 [FIR IDE] Make one global lock for resolve 2021-08-19 21:26:06 +02:00
Georgy Bronnikov
b42358f893 JVM_IR: do not index on AttributeOwnerId in AddContinuationLowering build-1.6.0-dev-3312 2021-08-19 21:53:47 +03:00
Georgy Bronnikov
32518eee4b JVM_IR: use computeIfAbsent in ClassCodegen.getOrCreate() 2021-08-19 21:53:46 +03:00
Georgy Bronnikov
a5a79215d7 JVM_IR: No need to use ConcurrentHashMap in ClassCodegen 2021-08-19 21:53:45 +03:00
Georgy Bronnikov
07eef9b751 JVM_IR: double call to adjustDefaultArgumentStubs 2021-08-19 21:53:44 +03:00
Alexander Shabalin
a7460e9061 [K/N] Enable lazy property initialization with the new MM build-1.6.0-dev-3309 2021-08-19 18:23:01 +00:00
Ilmir Usmanov
b5fa129540 Loosen tail-call optimization check for functions returning Unit
Do not check, that all Unit predecessors are POPs. This is safe for the
same reason, as it is safe to allow some of ARETURN sources not be
suspension point results.
To elaborate, before Unit, the stack is empty. This is because if there
are multiple paths to Unit and at least one of them comes from POP after
suspension point (we are interested in this case only - otherwise, the
call is not tail-call), in path from said POP the stack is empty, since
after suspension point the stack contains only one element. Thus, the
stack in other paths leading to Unit has to be empty, otherwise, merge
operation is not possible and ASM will report error during analysis.
Since the stack is empty in all paths, we can hoist Unit and following
ARETURN to predecessors, effectively turning path from suspension point
to tail-call.
build-1.6.0-dev-3305
2021-08-19 16:05:21 +00:00
Mads Ager
d33b70af1a [JVM IR] Ensure an instruction for the line number for a break.
This ensures that the debugger always has a bytecode offset for
the line number of a break/continue so that you step there and
so that you can set breakpoints there.

The `nop` instruction is optimized out if it has no line number
information.

^KT-46450 Fixed
build-1.6.0-dev-3291
2021-08-19 15:40:44 +02:00
Andrey Zinovyev
894a446585 [FIR] Add missing messages for jvm diagnostics and fix some tests build-1.6.0-dev-3279 2021-08-19 15:25:51 +03:00
Andrey Zinovyev
3b21759697 [FIR] SUPER_CALL_WITH_DEFAULT_PARAMETERS diagnostic 2021-08-19 15:25:50 +03:00
Andrey Zinovyev
24fbe0f072 [FIR] UPPER_BOUND_CANNOT_BE_ARRAY diagnostic 2021-08-19 15:25:49 +03:00
Andrey Zinovyev
4661656b8c [FIR] JVM_PACKAGE_NAME* diagnostics 2021-08-19 15:25:47 +03:00
Andrey Zinovyev
ae558c0290 [FIR] Add DEPRECATED_JAVA_ANNOTATION diagnostic 2021-08-19 15:25:46 +03:00
Andrey Zinovyev
f9b601edae [FIR] @JvmOverloads related checkers 2021-08-19 15:25:44 +03:00
Andrey Zinovyev
17ae69416c [FIR] Add SYNCHRONIZED_* diagnostics 2021-08-19 15:25:43 +03:00
Andrey Zinovyev
7ba8e0d9cc [FIR] Add VOLATILE_ON_VALUE/VOLATILE_ON_DELEGATE diagnostic 2021-08-19 15:25:43 +03:00
Andrey Zinovyev
f90b534c4c [FIR] Add STRICTFP_ON_CLASS diagnostic 2021-08-19 15:25:41 +03:00
sebastian.sellmair
565ea2c4f5 [Commonizer] Improve iteration performance in transformer and mergeCirTree
An allocation/iterator free `forEach` is used for lists that
are not intended to be modified at the same time.
2021-08-19 12:19:15 +00:00
sebastian.sellmair
e2816ffabb [Commonizer] Rename CirTypeSubstitutor implementations
^KT-48287
^KT-48286
2021-08-19 12:19:14 +00:00
sebastian.sellmair
8aceff3641 [Commonizer] Implement CirUnderscoredTypeAliasSubstitutor
Try substituting TypeAlias types that start with `__` in favour
of TypeAlias without the underscored prefix

^KT-48287 Verification Pending
^KT-48286 Verification Pending
2021-08-19 12:19:14 +00:00
Ilya Goncharov
7d3830ba7d [Gradle, JS] Use stable version of webpack-dev-server build-1.6.0-dev-3275 2021-08-19 15:06:16 +03:00
Hung Nguyen
16dfdb620e KT-45777: Add custom serialization for classpath snapshot
Also add a few commonly-used classes/methods to externalizers.kt to
allow reuse.

Bug: KT-45777
Test: New ClasspathSnapshotSerializerTest
build-1.6.0-dev-3267
2021-08-19 13:50:26 +03:00
Alexander Likhachev
0d2a514a70 [Gradle, JS] Fix NPM resolution skip condition for js compilation
#KT-48241 Fixed
build-1.6.0-dev-3249
2021-08-19 12:07:23 +03:00
Alexander Likhachev
b74253521e [Gradle, JS] Add test for KT-48241 2021-08-19 12:06:32 +03:00
Igor Chevdar
a576160847 [K/N][IR][codegen] Lazy initialization fix for new GC
A mutable field should be registered in GC even if its initializer is a const
build-1.6.0-dev-3236
2021-08-19 00:50:28 +05:00
Alexander Udalov
af59955566 IR: minor, refactor code in ExpectDeclarationRemover
Inline unnecessary inline functions to keep stacktraces saner, fix
incorrect "this" in exception message in
findActualForExpect/findExpectForActual (see KT-45628).
build-1.6.0-dev-3231
2021-08-18 21:27:55 +02:00
Alexander Udalov
a4730dd57e Minor, set JAVA_HOME to JDK 1.8 in LauncherScriptTest
Otherwise the test would invoke the "java" executable from PATH, which
might not be 1.8, and that would cause some tests to fail because error
messages are slightly different in newer Java versions.
2021-08-18 21:27:55 +02:00
Alexander Udalov
b1bce6a29e JVM IR: fix noarg plugin for sealed class with existing noarg ctor
#KT-48111 Fixed
build-1.6.0-dev-3230
2021-08-18 20:57:19 +02:00
pyos
d3de0109ca Add tests for KT-48180 build-1.6.0-dev-3227 2021-08-18 18:39:33 +02:00
pyos
ff6de0fe6a JVM: remove InlineCodegen.expressionMap
#KT-48180 Fixed
2021-08-18 16:55:44 +02:00
pyos
47d0211370 FE: do not enhance ? in jspecify NullMarked scope
No clue whether this should be done for `@TypeQualifierDefault` since it
appears to have no specification whatsoever.

 #KT-48262 Fixed
build-1.6.0-dev-3206
2021-08-18 16:41:00 +03:00
Jinseong Jeon
5819959cce Consolidate arrayOf call names build-1.6.0-dev-3202 2021-08-18 16:04:36 +03:00
Andrey Zinovyev
1cd321a90f [FIR] Add INAPPLICABLE_OPERATOR_MODIFIER diagnostic 2021-08-18 16:03:01 +03:00
Ilya Goncharov
16f41bd80c [Gradle, JS] Use webpack-dev-server rc.1 build-1.6.0-dev-3197 2021-08-18 15:50:38 +03:00
Mikhael Bogdanov
8ab546ba51 [FIR]: Pass special origins for local functions (named and anonymous) build-1.6.0-dev-3177 2021-08-18 09:58:27 +00:00
Mikhael Bogdanov
a5e59e09ee Copy methods for lambdas to DefaultImpls without receiver transformation
#KT-48230 Fixed
2021-08-18 09:58:27 +00:00
pyos
6d7eb2bd21 Add test for KT-48230 2021-08-18 09:58:27 +00:00
Sebastian Sellmair
21f7e16ee6 [Gradle] NativeDistributionCommonizationCache: Acquire FileLock
A `.lock` file will be acquired before running the native
distribution commonizer. This is done to protect data corruption
when multiple process try to commonize at the same time.

This could happen when e.g. two new projects are opened that
both trigger the commonizer during syncing.

^KT-46343 Verification Pending
build-1.6.0-dev-3171
2021-08-18 09:22:46 +00:00
Tianyu Geng
fb1eac0985 FIR: report SMARTCAST_IMPOSSIBLE on inherited alien properties [KT-48101] build-1.6.0-dev-3169 2021-08-18 12:02:02 +03:00
Mikhail Glukhikh
0a6e51e47f FirJavaGenericVarianceViolationTypeChecker: make code a bit more clear 2021-08-18 12:02:01 +03:00
Ilya Goncharov
f37d880964 [Gradle, JS] Add test on valid of webpack config
^KT-48273 fixed
build-1.6.0-dev-3168
2021-08-18 11:56:19 +03:00
Ivan Kochurkin
301f446433 Restore KtModifierKeywordToken instead of String in modifier diagnostics
Remove KeywordType
build-1.6.0-M1-2 build-1.6.0-dev-3158
2021-08-18 00:45:57 +03:00
Denis.Zharkov
a8077aebb0 FIR: Ignore suspicious test on StrictJavaNullabilityAssertions
^KT-48302 Open
build-1.6.0-dev-3151
2021-08-17 21:38:01 +03:00
Denis.Zharkov
753ba99b04 FIR: Support enhanced types when checking if Java type is primitive 2021-08-17 21:38:01 +03:00
Denis.Zharkov
a0553f4dfd FIR: Do not build synthetic property named with first capital character 2021-08-17 21:38:01 +03:00