Natalia Selezneva
1d45dc8d81
Optimize ScriptTemplatesFromDependenciesProvider
...
No needs to convert file.url to VirtualFile
because index already has getContainingFiles method
Do not iterate through all children of VirtualFile
to avoid VFS events initialisation for those files
there is no guarantee that file is under source root
so is can be not present is vfs at this moment
2020-07-07 23:26:58 +03:00
Vladimir Dolzhenko
45600830d3
Fixed locking granularity in ScriptDefinitionsManager
...
#KT-34552 Fixed
#KT-39547 Fixed
2020-07-07 19:15:32 +00:00
simon.ogorodnik
77ccb3767c
[FIR] Add system property selector for lightTree2fir / psi2fir
2020-07-07 21:47:24 +03:00
simon.ogorodnik
a460b8f2f4
[FIR] Support source directories for lightTree2fir
2020-07-07 21:47:24 +03:00
simon.ogorodnik
6c7a40627f
[FIR] Forbid constructors in processFunctionsByName
2020-07-07 21:47:24 +03:00
simon.ogorodnik
6bc654ee49
[FIR] Add full compiler pipeline modularized test
...
Fixup: allow kotlin package
2020-07-07 21:47:24 +03:00
simon.ogorodnik
b48dfe9b3d
Allow dirs as content root in modularized tests
2020-07-07 21:47:24 +03:00
simon.ogorodnik
bf1c3777ab
Add IR specific timing measurements to performance manager
2020-07-07 21:47:24 +03:00
simon.ogorodnik
0de70d295a
Fix argument names
2020-07-07 21:47:23 +03:00
simon.ogorodnik
b401443dbd
Compute GC metrics only during compilation
2020-07-07 21:47:23 +03:00
simon.ogorodnik
6095ec66ed
Allow to pass external performance manager to compiler
2020-07-07 21:47:23 +03:00
Alexander Udalov
8c71d8f126
Undeprecate VariableDescriptorWithAccessors.isDelegated
...
Apparently there's quite a few valid usages of this method outside of
the compiler frontend, where manual suppression is annoying.
2020-07-07 18:09:40 +02:00
Jinseong Jeon
50b2ea7053
FIR: avoid cast exception in Candidate.prepareExpectedType
2020-07-07 16:55:53 +03:00
Nick
a5f34a880c
[FIR] Fix computeTypeArguments() & add diagnostic for type args
2020-07-07 15:52:17 +03:00
Stanislav Erokhin
8772fabc4f
Fix since-build version for AS 3.6 and AS 4.0
2020-07-07 15:40:02 +03:00
Nikita Bobko
50d2b963cc
Revert "202: Fix GradleFacetImportTest#testJDKImport test" for 193 bunch
...
This fixes test in 193 and 192 bunch
2020-07-07 12:29:19 +00:00
Nikita Bobko
496b8d5bd4
Create 193 bunch for GradleFacetImportTest.kt
2020-07-07 12:29:18 +00:00
Anton Bannykh
0885d608d8
JS IR: normalize the generate file path in the box tests
2020-07-07 13:00:42 +03:00
Ilya Goncharov
bb35509c38
[Gradle, JS] Warning on missed types and typings on genext npm dep
...
#KT-38331 fixed
2020-07-07 12:10:13 +03:00
Ilya Goncharov
1b3b2e539c
[Gradle, JS] Not run separate dukat if there is no d ts files
...
^KT-38331 fixed
2020-07-07 12:09:58 +03:00
Jinseong Jeon
a18bd1bb75
FIR deserializer: use annotation info from enclosing class for companion object
2020-07-07 11:43:51 +03:00
Jinseong Jeon
81345bcc26
FIR deserializer: load annotations on inner classes
2020-07-07 11:43:51 +03:00
Victor Petukhov
c588bc604d
NI: do substitution stub types during updating trace for lambda (these stub types can appear from the builder inference as postponed variables)
...
^KT-40060 Fixed
2020-07-07 11:17:06 +03:00
Victor Petukhov
eec3a4720c
NI: don't collect members if a receiver type is StubType to avoid creating error candidates instead of not crating them at all
...
^KT-37717 Fixed
2020-07-07 11:17:06 +03:00
Ivan Kylchik
989e4293a3
[FIR] Fix exhaustiveness check in case of sealed subclass
...
The problem appear because check was performed only on direct children
of sealed class. To fix this, heritage tree is built and used in check
#KT-38989 Fixed
2020-07-07 10:58:06 +03:00
Nick
40cd30f7f6
[FIR] Partial performance fix for the effective visibility checker
2020-07-07 10:24:04 +03:00
Leonid Startsev
80561ec125
Update kx.serialization dependency
...
so tests won't fail due to
'library was compiled with pre-release flag' error.
Update test data
2020-07-07 01:14:32 +03:00
Natalia Selezneva
74aa3ac79a
Minor: replace deprecated method usage
2020-07-06 23:23:46 +03:00
Natalia Selezneva
b3a84ba081
Fix warning in ScriptConfigurationHighlightingTest
...
In case of exception from dependencies resolver
we do not threat the configurations as up-to-date,
so the reloading process will be started during test
despite updateScriptDependenciesSynchronously called at startup.
This will lead to the warning from checkHighlighting
because if script reports are different we rehighlight the script.
Note that test won't fail.
2020-07-06 23:23:46 +03:00
Natalia Selezneva
6ec13ab38a
Scripts: do not throw roots change event in case when roots are empty
2020-07-06 23:23:46 +03:00
Natalia Selezneva
16c5ba0988
Tests: do not throw roots change event in the current thread
...
This may cause exception during resolve,
because all caches are invalidated after this
and resolve should be restarted
Exception: module descriptor isn't find in its own dependencies
Unmute IdeReplCompletionTestGenerated.testDefinedExtension
^KT-34825 Fixed
2020-07-06 23:23:46 +03:00
Igor Yakovlev
5871628f2b
Possibly fix flacky test of light classes for decompiled declarations
...
Tests:
JavaAgainstKotlinBinariesCheckerTestGenerated.testInferenceReturnType_1_8JavaAgainstKotlinBinariesCheckerTestGenerated.testReturnInnerClasses
2020-07-06 22:28:45 +03:00
Roman Golyshev
637d3430ff
KT-39869 Remove redundant performDelayedRefactoringRequests call
...
- In `ObsoleteExperimentalCoroutinesInspection` it is redundant because
it is performed immediately after the single `bindToFqName` call,
so there is no reason to postpone the refactoring and then immediately
invoke it
- In `ObsoleteKotlinJsPackagesInspection` there are no reason to call
it at all (no refactorings are postponed)
2020-07-06 18:04:02 +00:00
Roman Golyshev
5cf6b860a6
KT-39869 Add inspection for FQN usages of kotlin.browser package
...
- `kotlin.dom` does not need this because it contains only extensions
- Add test for launching whole project fix; mute it because currently it
does not pass
- The test fails because in tests `RefJavaManager` tries to create
`RefJavaFileImpl` for .kt files. It will try to use UAST, but it
does not work for JS files. In production this is disabled, so no
problems occur
2020-07-06 18:04:01 +00:00
Roman Golyshev
91fa5d38b3
KT-39869 Fix review suggestions
...
- Review: https://jetbrains.team/p/kt/review/1349
2020-07-06 18:04:00 +00:00
Roman Golyshev
75de352ce2
KT-39869 Add ObsoleteKotlinJsPackagesInspection inspection
...
- This inspection allows to migrate from `kotlin.dom|kotlin.browser`
to `kotlinx.dom|kotlinx.browser` packages respectively
- This inspection is available from the import statements, and also
from the `Run migrations` action
- ^KT-39869 Fixed
2020-07-06 18:04:00 +00:00
Roman Golyshev
ec087e8f3d
KT-39869 Move base classes to separate file
2020-07-06 18:03:59 +00:00
Roman Golyshev
871bb30dbe
KT-39869 Refactor ObsoleteExperimentalCoroutinesInspection.kt
...
- We need this to reuse the logic for migration inspections
2020-07-06 18:03:58 +00:00
Toshiaki Kameyama
6b5c31e2fc
Move statement up: do not apply to @file annotation
...
#KT-10790 Fixed
2020-07-06 17:50:39 +02:00
Yaroslav Chernyshev
aeed7fe52d
KT-36801 Added forgotten changes for 192 platform
...
#KT-39989 Fixed
2020-07-06 18:07:11 +03:00
Ivan Kylchik
574aa0affe
[FIR] Fix synthetic property is not var due to Nullable on parameter
...
Synthetic property is var when it have setter. The latter is set up
in property when its parameter type is equal to getter return type. In
case of using @Nullable, parameter type of setter is not equal to
return type of getter, because the latter is flexible type. So to fix
this verification should occur using not null types
#KT-39076 Fixed
2020-07-06 17:52:37 +03:00
Pavel Punegov
48c5f48af0
Ignore test in Native, see #KT-38859
2020-07-06 17:33:12 +03:00
Ilya Goncharov
cb3d7349a3
[Gradle, JS] Deprecation of frontend plugin
...
^KT-40048 fixed
2020-07-06 17:30:31 +03:00
Natalia Selezneva
56afd763dc
Minor: add debug log messages
2020-07-06 15:53:28 +03:00
Natalia Selezneva
6c0d91837c
Load file attributes for last modified files under try-catch
...
This should avoid exceptions from initialization of GradleBuildRootsManager.EP
EA-232521 Fixed
2020-07-06 15:52:43 +03:00
Ilya Goncharov
03bc61c80a
[Gradle, JS] Add test on public package json inside archives (jar and klib)
2020-07-06 15:23:33 +03:00
Ilya Goncharov
f76a1f0e86
[Gradle, JS] jsJar dependsOn PublicPackageJsonTask
...
But package.json included into jar only if public npm dependencies exists
2020-07-06 15:23:33 +03:00
Ilya Goncharov
5c968acb13
[Gradle, JS] Simplify creation of public package json task
2020-07-06 15:23:33 +03:00
Ilya Goncharov
a2d5cda716
[Gradle, JS] Output file of public package json as var for changing it
2020-07-06 15:23:33 +03:00
Ilya Goncharov
a4ad3d88c6
[Gradle, JS] Remove duplicate of reporting js compiler statistic
2020-07-06 15:10:16 +03:00
Vladimir Dolzhenko
974dfbc9ab
Advance bootstrap to 1.4.20-dev-1680
2020-07-06 12:04:11 +02:00
Vladimir Ilmov
a2040f01bf
Body elements resolution in KotlinDebuggerCache added / analyzeWithContentAndGetResult
...
While we trying to find an inlined SourcePosition, the body should be
resolved KotlinPositionManager.getLambdaOrFunIfInside / InlineUtil.isInlinedArgument
to make shure the lambda is an argument for a call.
#KT-39309 fixed
#KT-39435 fixed
2020-07-06 11:33:50 +02:00
Dmitriy Novozhilov
a0f8ada285
[FIR-TEST] Unmute failing diagnostic tests
2020-07-06 12:11:57 +03:00
Igor Yakovlev
4707f4fc3f
Change signature does not make doubled refactoring for java usages
...
Fixed #KT-22170
2020-07-06 11:54:36 +03:00
Dmitry Gridin
7b9fad00a1
Rename KotlinLikeLangLineIndentProvider to KotlinLangLineIndentProvider
...
Relates to #KT-22211
2020-07-06 14:51:29 +07:00
Dmitry Petrov
b75de60afb
Minor: mute failing test
2020-07-06 10:47:10 +03:00
Mikhail Zarechenskiy
d8f701ee61
Add test for obsolete issue
...
#KT-39588 Obsolete
2020-07-05 18:17:44 +03:00
Vladimir Dolzhenko
03d5fe8d6c
Add dispatchAllInvocationEvents to editor actions in perf tests
2020-07-04 23:33:02 +02:00
Vladimir Dolzhenko
a830c69a30
Regenerate TypingIndentationTestBaseGenerated
2020-07-04 22:25:09 +02:00
Vladimir Krivosheev
75b1cf8a23
Explicitly specify id of KotlinNonJvmSourceRootConverterProvider
...
IDEA 2020.3 uses `id` from extension definition to avoid creating instance of converter without need.
2020-07-04 15:38:15 +02:00
Vyacheslav Karpukhin
6ecd2e57fb
Created bunch 203
2020-07-04 02:11:18 +02:00
Vladimir Dolzhenko
357746e344
Do not force FULL analysis for PARTIAL_FOR_COMPLETION for the current open file
...
Relates to #KT-38687
2020-07-03 22:57:22 +02:00
Vladimir Dolzhenko
51375ed278
PluginStartupListener clean up
...
Relates to #KT-39968
2020-07-03 22:30:15 +02:00
Vladimir Dolzhenko
0b2e15d20c
PluginStartupListener clean up
...
Relates to #KT-39968
2020-07-03 22:05:43 +02:00
Mikhail Zarechenskiy
01f2b0e26b
Fix test data about JsExport
...
It allows only for top-level declarations, plus JsName is needed to
avoid error about method redeclaration
2020-07-03 21:23:29 +03:00
Mikhail Zarechenskiy
9a08085146
Fix redundant semicolon inspection before soft keywords
...
Fixes few tests:
- RedundantSemicolon.testBetweenSoftModifierKeywordAndDeclaration
- RedundantSemicolon.testBetweenSoftModifierKeywordAndDeclaration2
- RedundantSemicolon.testBetweenSoftModifierKeywordAndDeclaration3
This bug was introduced in 741ebeb7b8
2020-07-03 21:23:29 +03:00
Mikhail Zarechenskiy
a0ecfce7b7
Update test data: add correct error
2020-07-03 21:23:29 +03:00
Nikolay Krasko
87a520fc30
202: Overcome failure in PathManager.getHomePath() because of the wrong dir
...
Stacktrace:
java.lang.RuntimeException: Could not find installation home path. Please reinstall the software.
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:106)
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:76)
at com.intellij.openapi.application.PathManager.getPreInstalledPluginsPath(PathManager.java:248)
at com.intellij.ide.plugins.DescriptorListLoadingContext.<init>(DescriptorListLoadingContext.java:57)
at com.intellij.ide.plugins.DescriptorListLoadingContext.createSingleDescriptorContext(DescriptorListLoadingContext.java:61)
at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointAndExtensions(PluginManagerCore.java:1397)
at com.intellij.core.CoreApplicationEnvironment.registerExtensionPointAndExtensions(CoreApplicationEnvironment.java:266)
at org.jetbrains.kotlin.cli.jvm.compiler.CoreApplicationEnvironmentCompatKt.registerExtensionPointAndExtensionsEx(coreApplicationEnvironmentCompat.kt:17)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerApplicationExtensionPointsAndExtensionsFrom(KotlinCoreEnvironment.kt:534)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createApplicationEnvironment(KotlinCoreEnvironment.kt:505)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.getOrCreateApplicationEnvironmentForProduction(KotlinCoreEnvironment.kt:465)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:92)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:225)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:262)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:63)
2020-07-03 21:21:23 +03:00
Dmitriy Dolovov
d63728afe5
[Commonizer] Use 'index:Int' instead of Name for addressing type parameters
2020-07-03 22:27:58 +07:00
Mikhail Zarechenskiy
0ee7306d9c
Fix coercion to Unit when variable already have other constraints
...
Don't add `Unit` if variable has an upper constraint T <: A.
It's impossible to coerce variable T to Unit as constraint system will
be always contradictory: T := Unit => Unit should be subtype of A
#KT-39900 Fixed
2020-07-03 17:54:14 +03:00
Dmitry Petrov
026f54f3d8
Fix Kapt3 tests
...
Nullability annotations are no longer generated on private fields,
so line numbers in generated java sources changed.
2020-07-03 17:51:30 +03:00
Dmitry Petrov
761e47264a
JVM_IR: fix property reference generation for inline class primary val
2020-07-03 17:51:30 +03:00
Vladimir Dolzhenko
1450cf5f63
Fix KOTLIN_BUNDLED registration
...
#KT-39968 Fixed
2020-07-03 14:46:40 +00:00
Dmitry Gridin
d1455d0d22
KotlinOptimizeImportsRefactoringHelper: should remove unused directives by pointer
...
#KT-39899 Fixed
#EA-209827 Fixed
2020-07-03 14:29:46 +00:00
Dmitry Gridin
62e252ec26
Inline refactoring: should support set/get operator
...
#KT-17378 Fixed
2020-07-03 21:11:58 +07:00
Toshiaki Kameyama
e31ea0c243
ReplaceWith: suggest to replace for 'get/set' operator functions
...
#KT-15944 Fixed
2020-07-03 21:10:24 +07:00
Dmitriy Novozhilov
82b6ecfa64
[FIR-TEST] Add test for KT-39075
2020-07-03 17:09:29 +03:00
Dmitriy Novozhilov
59bedaaa55
[FIR] Rename FirElvisCall to FirElvisExpression
...
FirElvisCall is not a FirCall, so FirElvisExpression is more
convenient name
2020-07-03 17:09:29 +03:00
Dmitriy Novozhilov
1db2ba51d2
[FIR] Don't pass flow from inplace lambdas throw when and elvis expressions
...
#KT-39080 Fixed
2020-07-03 17:09:29 +03:00
Dmitriy Novozhilov
1429cba2d4
[FIR] Fix CCE in postponed lambda resolution
2020-07-03 17:09:28 +03:00
Dmitriy Novozhilov
8311c1f0e2
[FIR] Fix projection of Comparable supertype for ILT
...
#KT-39048 Fixed
2020-07-03 17:09:28 +03:00
Dmitriy Novozhilov
a882a9dff5
[FIR] Create scope for type parameter as scope for intersection of bounds
...
Before change we've created composite scope for all bounds, which
is incorrect, because intersection of all bounds may be less than
all bounds (see test in commit)
#KT-39032 Fixed
2020-07-03 17:09:28 +03:00
Jinseong Jeon
44d0af8597
FIR2IR: handle 'this' as reference to outer object
2020-07-03 12:53:57 +03:00
Ilya Muradyan
1798542db7
Fix and enable embedded tests in scripting-ide-services
2020-07-03 12:21:45 +03:00
Ilya Muradyan
e88bef4275
Fix jar-dependent test in scripting-ide-services
2020-07-03 12:21:45 +03:00
Mikhail Zarechenskiy
d51bb2c053
Add compatibility resolve when variable has "bad" intersection type
...
#KT-39468 Fixed
2020-07-03 12:18:28 +03:00
Ivan Kylchik
92a51b9794
[FIR] Add illegal underscore check in BaseFirBuilder
2020-07-03 12:06:49 +03:00
Ivan Kylchik
cc4b50fdc1
[FIR] Add illegal underscore diagnostic
2020-07-03 12:06:47 +03:00
Ivan Kylchik
54945b7fbc
Extract illegal underscore check function to ParseUtils
2020-07-03 12:06:45 +03:00
Ivan Kylchik
d0f6997e6d
[FIR] Fix some of fir spec tests for real-literals
...
#KT-38336 Fixed
2020-07-03 12:06:44 +03:00
Dmitry Petrov
17c15cfe0a
JVM, JVM_IR: update bytecode listing testData for inline classes
2020-07-02 22:39:06 +03:00
Dmitry Petrov
6e0bb0b468
JVM: no nullability annotations for inline class '-impl' methods
...
Specialized generated methods for inline classes (toString-impl,
hashCode-impl, equals-impl, etc) are inaccessible from Java, and thus
don't require nullability annotations.
2020-07-02 22:39:06 +03:00
Dmitry Petrov
ea042eb6c4
JVM_IR: no nullability annotations for inline class '-impl' methods
...
Specialized generated methods for inline classes (toString-impl,
hashCode-impl, equals-impl, etc) are inaccessible from Java, and thus
don't require nullability annotations.
2020-07-02 22:39:06 +03:00
Dmitry Petrov
a238d6a890
JVM_IR: no annotations on parameters of 'property$annotations' methods
2020-07-02 22:39:06 +03:00
Dmitry Petrov
8da988b18e
JVM_IR: Mangle primary val getter of inline class if required
...
TODO fix reflection
2020-07-02 22:39:06 +03:00
Dmitry Petrov
62d2581faf
JVM_IR: Don't generate annotations on generated inline class members
2020-07-02 22:39:05 +03:00
Dmitry Petrov
dc4b9d3887
JVM_IR: Don't mangle internal constructor-impl for inline classes
2020-07-02 22:39:05 +03:00
Ilya Kirillov
5cfac8fa3f
FIR IDE: introduce symbol pointers for restoring symbols in another read action
...
fix pointer
2020-07-02 22:25:06 +03:00
Ilya Kirillov
f88ebed1a3
FIR IDE: move types to its own package
2020-07-02 22:25:06 +03:00
Ilya Kirillov
5f548fc459
FIR IDE: add creating stdlib symbols by fqName tests
2020-07-02 22:25:06 +03:00
Ilya Kirillov
799a49649c
FIR IDE: introduce symbol modality
2020-07-02 22:25:06 +03:00
Ilya Kirillov
75a96f0153
FIR IDE: add info about varargs to parmater symbol
2020-07-02 22:25:05 +03:00
Ilya Kirillov
f10f6c6360
FIR IDE: introduce package symbol
2020-07-02 22:25:05 +03:00
Ilya Kirillov
18d46a86ae
FIR IDE: add identity weak map based cache for KtSymbolByFirBuilder
2020-07-02 22:25:05 +03:00
Ilya Kirillov
a26063b3f8
FIR IDE: rename Invalidatable -> ValidityOwner
2020-07-02 22:25:05 +03:00
Ilya Kirillov
226d514788
FIR IDE: rename reference classes to KtFir*Reference for consistency
2020-07-02 22:25:05 +03:00
Ilya Kirillov
66933ea2fe
FIR IDE: use withValidityAssertion instead of explicit check in FirAnalysisSession
2020-07-02 22:25:04 +03:00
Ilya Kirillov
8368284817
FIR IDE: introduce KtType
2020-07-02 22:25:04 +03:00
Ilya Kirillov
c44756bbfd
FIR IDE: add tests for building kt symbols by PSI
2020-07-02 22:25:04 +03:00
Ilya Kirillov
8a52954bf8
FIR IDE: introduce symbol provider
2020-07-02 22:25:03 +03:00
Ilya Kirillov
20b93507ab
FIR IDE: use symbols for reference resolve
2020-07-02 22:25:03 +03:00
Ilya Kirillov
749afbd141
FIR IDE: use symbols for call resolve
2020-07-02 22:25:03 +03:00
Ilya Kirillov
82866176fb
FIR IDE: introduce symbol API
2020-07-02 22:25:03 +03:00
Alexander Udalov
ba948cda38
Report warning on characters which can cause problems on Windows
...
As soon as we fix KT-17438, this warning will be turned into an error.
2020-07-02 21:19:28 +02:00
Alexander Udalov
181965f6e8
IR: inline namedIrModulePhase and namedIrFilePhase phase builders
...
Construct NamedCompilerPhase directly instead. Only use phase builders
where the code becomes easier to read.
2020-07-02 21:19:28 +02:00
Alexander Udalov
15a969b3ba
IR: refactor performByIrFile a little
...
Take a list of phases instead of the CompositePhase, to make stacktraces
nicer and avoid quadratic time of phase construction.
2020-07-02 21:19:28 +02:00
Alexander Udalov
4475325ffa
IR: refactor PhaseBuilders a little
...
- use named classes to improve stacktraces
- reorder parameters to make the code shorter
- use explicit types to improve IDE resolve in usages
2020-07-02 21:19:27 +02:00
Alexander Udalov
7997d4afd3
IR: do not use AnyNamedPhase where there is Context parameter
2020-07-02 21:19:27 +02:00
Alexander Udalov
ef58f1e72e
IR: simplify phaser code a little
...
- merge NamedCompilerPhase, SameTypeNamedPhaseWrapper,
AbstractNamedPhaseWrapper and inherit it from SameTypeCompilerPhase
- inline some functions to simplify stacktraces
- reformat and fix inspections
2020-07-02 21:19:27 +02:00
Stanislav Erokhin
74ce26cdc2
Fix 1.4-M2 ChangeLog.md
2020-07-02 22:16:59 +03:00
Vyacheslav Gerasimov
18d71c7907
Build: Encode build number in teamcity build url
2020-07-02 22:05:35 +03:00
Vyacheslav Gerasimov
8e1269cc32
Build: Add hacky workaround for retrying PublishToMavenRepository tasks
...
It's supposed to help with `Caused by: org.apache.http.NoHttpResponseException: api.bintray.com:443 failed to respond`
2020-07-02 22:05:35 +03:00
Dmitriy Dolovov
3bb234b17c
[Commonizer] Clean-up CirTypeSignature usages
2020-07-03 00:22:44 +07:00
Dmitriy Dolovov
ffd0c69698
[Commonizer] Use ClassId instead of FqName for addressing classes and TAs
2020-07-03 00:22:38 +07:00
Ilya Kirillov
57aefbcd57
FIR IDE: migrate to 201
2020-07-02 19:34:37 +03:00
Mads Ager
1124887aa0
[JVM_IR] Fix stepping behavior for assignments to local variables.
2020-07-02 17:29:07 +02:00
Vladimir Dolzhenko
543efffa5c
Turn off stability check for PerformanceTypingIndentationTest
2020-07-02 17:13:10 +02:00
Igor Yakovlev
89d5c030dc
Improve incremental analisys for nested blocks
2020-07-02 17:52:40 +03:00
Toshiaki Kameyama
efdeb7b449
Introduce "Add '== true'" quick fix for TYPE_MISMATCH
...
#KT-39930 Fixed
2020-07-02 19:31:43 +07:00
Dmitriy Novozhilov
5bf18c09bb
Advance bootstrap to 1.4.20-dev-1530
2020-07-02 15:19:24 +03:00
Natalia Selezneva
a73dac75d4
Optimize KotlinScriptDependenciesClassFinder
...
Do not call processDirectories for all package prefixes checking inner classes
^KT-39796 Fixed
2020-07-02 15:14:02 +03:00
Mikhail Glukhikh
f46970219f
[FIR2IR] Simplify elvis conversion
2020-07-02 15:10:52 +03:00
Mikhail Glukhikh
68b84722c4
[FIR2IR] Simplify generateWhen
2020-07-02 15:10:52 +03:00
Mikhail Glukhikh
24c8eb43a2
[FIR2IR] Don't build stub FirWhen for converting elvis expression
2020-07-02 15:10:52 +03:00
Mikhail Glukhikh
6229d2e215
[FIR2IR] Extract generateWhen & toIrWhenBranch
2020-07-02 15:10:52 +03:00
Mikhail Glukhikh
31765a4abc
[FIR2IR] Move visitElvis & visitWhen close to one another
2020-07-02 15:10:52 +03:00
Dmitriy Novozhilov
f4d5070a7b
[FIR-TEST] Mute BB test due to KT-39659
2020-07-02 15:10:52 +03:00
Dmitriy Novozhilov
a7ed9c7dc5
[FIR] Add conversion of FirElvisCall to backend IR
2020-07-02 15:10:52 +03:00
Dmitriy Novozhilov
102c9c08d0
[FIR] Resolve elvis call as special synthetic call
...
Before that commit we desugared `a ?: b` as
when (val elvis = a) {
null -> b
else -> elvis
}
It was incorrect, because `a` should be resolved in dependent mode,
but when it was `elvis` initializer it was resolved in independent
mode, so we can't infer type for `a` in some complex cases
2020-07-02 15:10:51 +03:00
Dmitriy Novozhilov
b49b3245af
[FIR] Add special node for elvis call
...
#KT-39074
2020-07-02 15:10:51 +03:00
Dmitriy Novozhilov
648953085f
[FIR] Replace kotlin/Throwable with java/lang/Throwable in JvmMappedScope
...
#KT-39044 Fixed
2020-07-02 15:10:51 +03:00
Dmitriy Novozhilov
624b9306f0
[FIR] Resolve LHS of type operator call in independent context
...
#KT-39046 Fixed
2020-07-02 15:10:51 +03:00
Jinseong Jeon
c9e423bf64
FIR deserializer: fix parameter shift for constructor of inner classes and enums
...
#KT-39837 Fixed
2020-07-02 13:34:39 +03:00
Georgy Bronnikov
8e24256f95
JVM_IR: avoid descriptors when tracking inline properties
...
Preparing to use wrapped properties in InlineCodegen.
2020-07-02 12:46:58 +03:00
Georgy Bronnikov
385d522d27
JVM_IR: do not use descriptor in isCompiledToJvmDefault
2020-07-02 12:45:26 +03:00
Vsevolod Tolstopyatov
3270c7e016
Introduce CancellationException
...
#KT-39126 Fixed
2020-07-02 11:01:28 +03:00
Natalia Selezneva
5ec110c33f
*.gradle.kts: catch exceptions during GradleBuildRootManager initialization
...
^KT-39317 Fixed
2020-07-02 08:48:05 +03:00
Natalia Selezneva
c7c7ffb0e0
*.gradle.kts: get java home from build environment instead of execution settings
...
Note that getting GradleExecutionSettings may lead to write action
because it link javaHome with existing sdks
^KT-39317
2020-07-02 08:48:05 +03:00
Steven Schäfer
5cdf053c8e
Coroutines: Fix RedundantLocalsEliminationMethodTransformer
...
- Take control flow into account when collecting usage information
- Don't remove stores to local variables
2020-07-02 00:49:28 +02:00
Alexander Gorshenev
3113281e2d
Adapted fake override checker to inheritance from friend module internal interfaces
2020-07-01 20:29:48 +03:00
Mikhail Glukhikh
07feb2185b
Fix exception in FirExposedVisibilityChecker
2020-07-01 19:30:50 +03:00
Ilmir Usmanov
697c8637ee
For all int-like typed variables, use int as field type and coerce
...
it during spill-unspill.
Coerce int to boolean, otherwise, VerifyError is thrown on android
Completely rewrite SpilledVariableFieldTypesAnalysis... again,
but this time use BasicInterpreter
This way, the analysis both does not use SourceInterpreter and
is in line with the rest on analyses.
2020-07-01 17:26:47 +02:00
Alexander Udalov
e7f33ac051
IR: do not inherit IrFunctionReference from IrFunctionAccessExpression
...
To avoid the diamond hierarchy and to allow refactoring the IR element
hierarchy from interfaces to classes, improving performance of visitors
and transformers.
2020-07-01 13:03:56 +02:00
Alexander Udalov
d4605f5816
IR: add type parameter to IrMemberAccessExpression and some subclasses
...
This is needed to get rid of the diamond hierarchy:
IrMemberAccessExpression
/ \
/ \
IrFunctionAccessExpression IrCallableReference
\ /
\ /
IrFunctionReference
In the subsequent commit, IrFunctionReference no longer inherits from
IrFunctionAccessExpression; the more precise type of `val symbol:
IrFunctionSymbol` is now carried via the generic type argument.
This will help to refactor IR element hierarchy from interfaces to
classes, improving performance of visitors and transformers.
2020-07-01 13:03:56 +02:00
Alexander Udalov
d794c9dc4d
IR: remove non-supertype usages of abstract impl classes
...
Work with the corresponding base interfaces instead. This change will
help in moving the IR element hierarchy from interfaces to classes,
should the need arise.
There's a possible change in behavior in
`CallAndReferenceGenerator.applyCallArguments`, which however doesn't
seem to break anything: IrPropertyReferenceImpl can now also be handled
by this method.
2020-07-01 13:03:56 +02:00
Alexander Udalov
ccac23f5b2
IR: make mapOptimized non-inline, rename to transformIfNeeded
...
This seems to have no effect on performance, however it clearly shows
that this method is a hotspot now with regard to own CPU samples.
Furthermore, it somewhat decreases the bytecode size at call sites and
might actually allow the HotSpot to inline those methods earlier and
hopefully deoptimize less frequently.
2020-07-01 13:03:56 +02:00
Alexander Udalov
6a699c9384
IR: minor, remove accept from some interfaces
2020-07-01 13:03:56 +02:00
Jinseong Jeon
1e3019798a
FIR2IR: discard fake overrides for property accessors according to base visibility
2020-07-01 13:59:42 +03:00
Nikita Bobko
6985c5fd2a
202: Fix KotlinJpsBuildTest tests
...
Test failure was caused by "replace custom source root types to a special
'unknown' type and back on plugin unload/load (IDEA-235292)" in intellij.
We override `getModuleSourceRootPropertiesSerializers` in `KotlinModelSerializerService`
by inheriting from `KotlinCommonJpsModelSerializerExtension`
2020-07-01 11:31:23 +03:00
Nikita Bobko
4e65b2fb9e
Refactoring: mark const strings with const keyword
2020-07-01 11:31:23 +03:00
Nikita Bobko
31e45d4f4c
202: Fix some ParameterInfoTestGenerated
...
Speaking strictly:
* `ParameterInfoTestGenerated$WithLib1.testUseJavaFromLib`
* `ParameterInfoTestGenerated$WithLib2.testUseJavaSAMFromLib`
* `ParameterInfoTestGenerated$WithLib3.testUseJavaSAMFromLib`
2020-07-01 11:31:23 +03:00
Nikita Bobko
cbc57351f5
202: Fix SlicerLeafGroupingTestGenerated tests
2020-07-01 11:31:22 +03:00
Nikolay Krasko
0d71b7ac2c
202: Add fastutil jar to tests dependencies
2020-07-01 11:31:22 +03:00
Nikolay Krasko
ca7169b84f
202: Disable ignored plugins check in compiler environment
...
Stacktrace:
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
at com.intellij.ide.plugins.PluginManagerCore.getBrokenPluginVersions(PluginManagerCore.java:207)
at com.intellij.ide.plugins.PluginManagerCore.createLoadingResult(PluginManagerCore.java:825)
at com.intellij.ide.plugins.DescriptorListLoadingContext.createSingleDescriptorContext(DescriptorListLoadingContext.java:61)
at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointAndExtensions(PluginManagerCore.java:1397)
at com.intellij.core.CoreApplicationEnvironment.registerExtensionPointAndExtensions(CoreApplicationEnvironment.java:266)
at org.jetbrains.kotlin.cli.jvm.compiler.CoreApplicationEnvironmentCompatKt.registerExtensionPointAndExtensionsEx(coreApplicationEnvironmentCompat.kt:17)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerApplicationExtensionPointsAndExtensionsFrom(KotlinCoreEnvironment.kt:534)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createApplicationEnvironment(KotlinCoreEnvironment.kt:505)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.getOrCreateApplicationEnvironmentForProduction(KotlinCoreEnvironment.kt:465)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:92)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:225)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:262)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
2020-07-01 11:31:22 +03:00
Nikita Bobko
ef562598ea
202: Fix MultiFileJvmBasicCompletionTestGenerated
...
It was broken by 4bef803e1b5994e9ea9731acfb5095a94b1b1383 in intellij
2020-07-01 11:31:21 +03:00
Nikita Bobko
3187bb2aa4
202: Fix KotlinMavenImporterTest#testJDKImport test
...
Test failure was caused by 8e1ab882641db695e3b70085d14a59e1e8e9f579 +
b79ca6e3a855b9d74dba129583d7ed25ecd2f552 in intellij
2020-07-01 11:31:21 +03:00
Nikita Bobko
5c95c48c90
202: Fix GradleFacetImportTest#testJDKImport test
...
Test failure was caused by 8e1ab882641db695e3b70085d14a59e1e8e9f579 +
b79ca6e3a855b9d74dba129583d7ed25ecd2f552 in intellij
2020-07-01 11:31:21 +03:00
Nikita Bobko
536c4bbab1
202: Fix KotlinEvaluateExpressionTestGenerated.SingleBreakpoint
...
Now `getTreeEvaluation` returns `CompletableFuture<PsiElement>` not `PsiElement` as it was in 201
2020-07-01 11:31:20 +03:00
Nikita Bobko
046030e301
202: Fix "Module 'foo': No SDK defined" in tests
...
Fixes several tests in 202:
* NewMultiplatformProjectImportingTest
* KaptImportingTest
* ...
This failure was caused by b79ca6e3a855b9d74dba129583d7ed25ecd2f552 in intellij
2020-07-01 11:31:20 +03:00
Nikita Bobko
8fb82c2cb7
202: Fix missing formatting in nJ2K tests
...
Formatting in nJ2K tests (actually it still works in IDE) was broken by
dee00ac38946b8a8a5165dffd083e67c85935723 in intellij
2020-07-01 11:31:20 +03:00
Nikita Bobko
264094861d
202: Fix null passed to @NotNull in PomModelImpl
...
Fixes `AdditionalResolveDescriptorRendererTestGenerated#testAnonymousObjectInClassParameterInitializer`
and others
2020-07-01 11:31:19 +03:00
Vladimir Dolzhenko
853503d75f
Force perform FULL analysis to avoid redundant analysis for the current open file
...
#KT-38687 Fixed
2020-07-01 08:22:58 +00:00
Sergey Rostov
1a82c94979
revert accidentally committed project.xml
2020-07-01 10:36:40 +03:00
Mikhail Zarechenskiy
d9fc71b8c0
Advance bootstrap to 1.4.20-dev-1515
2020-07-01 10:11:13 +03:00
Denis Zharkov
3ce980fd88
Fix incremental compilation for calls to inner classes from supertypes
...
The problem became actual after 8c2baf0704
2020-07-01 06:55:52 +03:00
Mikhail Zarechenskiy
6b81cc8b77
Update test data as stdlib now isn't pre-release
2020-06-30 22:59:23 +03:00
Mikhail Zarechenskiy
94dcff5bab
Advance bootstrap to 1.4.20-dev-1508
2020-06-30 21:48:30 +03:00
Mikhail Zarechenskiy
f37f89a151
Set KotlinCompilerVersion.IS_PRE_RELEASE = false
...
Since master is 1.4.20 now and branch 1.4.0 is 1.4-RC
#KT-39860 Fixed
2020-06-30 21:01:45 +03:00
Mikhail Bogdanov
b5b5c8aebc
Check target for -Xjvm-default modes
...
#KT-39925 Fixed
2020-06-30 19:47:06 +02:00
Dmitriy Dolovov
3e42b9d527
[Commonizer] Remove unused property from CirFunction
2020-07-01 00:12:03 +07:00
Nikolay Krasko
21fa2bf98c
Switch to 201 platform
2020-06-30 19:53:18 +03:00
Nikolay Krasko
50863b6985
Fix using swing ComboBox and wrong bunching
2020-06-30 19:53:17 +03:00
Nikolay Krasko
2c1b01fcf6
Setup standalone environment in BuiltInsSerializer
...
Main change is in calling setupIdeaStandaloneExecution()
2020-06-30 19:53:17 +03:00
Nikolay Krasko
3b2e1cfa39
Show TeamCity user for agent builds
2020-06-30 19:53:17 +03:00
Dmitry Gridin
86fe10ba44
AddDefaultConstructorFix: fix testData
...
#KT-20718
2020-06-30 23:22:08 +07:00
Toshiaki Kameyama
7be5410877
Add a quick fix for NO_CONSTRUCTOR error on 'expect' annotation entry
...
#KT-20718 Fixed
2020-06-30 23:22:08 +07:00
Mikhail Glukhikh
d846a22e33
[FIR] Introduce & use FirTypeRef.coneType
2020-06-30 18:49:06 +03:00
Toshiaki Kameyama
0392fe75fc
Convert to block body: specify non-nullable type when body expression is platform type and overriden method is non-nullable type
...
#KT-12222 Fixed
2020-06-30 22:47:13 +07:00
Dmitry Petrov
d37b616e1f
JVM_IR: Fix enum classes ABI
...
1. Enum entry fields don't have nullability annotations.
2. Enum class special methods (values, valueOf) are not 'final'
(although they probably should be, javac generates corresponding
methods without ACC_FINAL flag).
3. Enum class special methods don't have nullability annotations.
4. Don't generate synthetic accessor for enum entry class constructor.
KT-37019 KT-37020 KT-37021
2020-06-30 18:24:25 +03:00
Stanislav Erokhin
f753824429
Advance bootstrap version to 1.4.20-dev-1401
2020-06-30 17:56:11 +03:00
Ilmir Usmanov
7536da788c
Minor. Update test
2020-06-30 16:54:36 +02:00
Jinseong Jeon
34174d6e7d
FIR deserializer: load annotations for property and fields, along with use-site targets
2020-06-30 17:28:22 +03:00
Mikhail Bogdanov
3580c7c28c
Write proto flag about compatibility mode
...
There is no any special aim for this flag now.
But it could be useful in future in case of compatibility mode deprecation
2020-06-30 14:59:01 +02:00
Vladimir Dolzhenko
f372a0fe6c
Force full analysis even if incremental analysis is available but existed is erroneous
2020-06-30 12:53:34 +00:00
Konstantin Tskhovrebov
343e645282
Rename and refactor kmm plugin packages, task names, ids and etc.
2020-06-30 15:28:39 +03:00
Vladimir Dolzhenko
48a9226e1c
Fix copy-paste from KTS files
...
#KT-37517 Fixed
2020-06-30 12:24:31 +00:00
Toshiaki Kameyama
0a230905ae
Remove redundant spread operator: don't report if overloaded functions cannot be resolved
...
#KT-38282 Fixed
2020-06-30 19:16:22 +07:00
Ilya Kirillov
f179b39c70
Wizard: fix project template list size
2020-06-30 15:10:55 +03:00
Aleksei Cherepanov
b9b068ff63
Fix FirMultiModuleResolveTestGenerated tests
2020-06-30 14:16:52 +03:00
Sergey Igushkin
8ba131290a
Fixup for 1f5fa5eb7 – adjust error message
2020-06-30 13:14:03 +03:00
Sergey Igushkin
1f5fa5eb7c
Add back empty stub implementations of KotlinGradleSubplugin (KT-39809)
...
* If a KotlinGradleSubplugin implements
KotlinCompilerPluginSupportPlugin, don't apply it as a legacy plugin
* Add the legacy KotlinGradleSubplugin implementations back so that
when there's JAR hell with META-INF/services in the old artifacts
pointing to the classes, loading the plugins with ServiceLoader (legacy
implementation) from the new artifacts would not fail.
* There's a corner case for plugins not in kotlin-gradle-plugin
If a newer and older version of such a subplugin is used with an older
version of the Kotlin Gradle plugin, the latter will find the META-INF
entries and will try to load the subplugins from the new version. With
the original fix for KT-39809, this would result in silently ignored
empty stub implementations.
Given that the Kotlin Gradle plugin can now check if a subplugin
supports the new API, it's OK to keep the old entries and make the
stub implementations throw a build error when called, so that improper
plugin versions are not ignored and are clearly reported.
Note that this is only necessary for the subplugins not bundled in the
kotlin-gradle-plugin module, as those will always be in sync with the
Kotlin version.
Issue #KT-39809 Fixed
2020-06-30 12:51:51 +03:00
Sergey Igushkin
cb936dd82e
Fix internals with symlinked friend paths (KT-35341)
...
The friend paths converted to canonical paths didn't match absolute
paths in the compiler code in case of symlinked directories.
This fixes a regression.
Issue #KT-35341 Fixed
2020-06-30 12:51:50 +03:00
kvirolainen
5b1d019bb0
Added Incomplete destructuring inspection
...
#KT-21223 Fixed
2020-06-30 11:47:27 +02:00
Sergey Igushkin
e6bca819d4
Remove kotlin.native.linkFromSources, expose tasks' sources
...
* Drop the deprecated mode in the Kotlin/Native link
tasks using sources rather than the intermediate
compiled klib.
* Remove the `allSources` and `commonSources`
properties from the KotlinNativeCompilation, use the
tasks' properties instead.
2020-06-30 12:27:14 +03:00
Mads Ager
c3b5b21845
[JVM] Extend stepping tests with <clinit> stepping.
...
In addition, made the stepping information for constructor calls
consistent across JVM_IR and JVM. For JVM_IR that stepping behavior
is consistent for enum constructor calls in <clinit> for JVM it
is not.
2020-06-30 11:18:29 +02:00
Ilya Kirillov
2693664aa7
FIR IDE: unmute tests after introducing fake element kinds
2020-06-30 11:55:59 +03:00
Ilya Kirillov
9baced20c4
FIR IDE: find FIR element by PSI one only if FIR have a real source
...
Also, add a check that there is only one element with the same real source
2020-06-30 11:55:58 +03:00
Ilya Kirillov
5acdad29ec
FIR: change source of existing type refs in DataClassMembersGenerator to avoid sources clash
2020-06-30 11:55:57 +03:00
Ilya Kirillov
650f2dd713
FIR: consider source of FirSingleExpressionBlock as a fake one
2020-06-30 11:55:56 +03:00
Ilya Kirillov
1c564e1bd6
FIR: add ImplicitTypeRef to the control flow fir element sources
2020-06-30 11:55:56 +03:00
Ilya Kirillov
94967bcd00
FIR: introduce element kind for source elements
...
It is needed for FIR IDE to determine if FIR element was built by PSI
or it is generated one
2020-06-30 11:55:53 +03:00
Dmitriy Novozhilov
f6e653b242
[FIR] Fix compilation broken in 309050d9
2020-06-30 11:43:46 +03:00
Dmitriy Novozhilov
309050d956
[FIR] Add ExtensionFunctionType attribute
...
#KT-39034 Fixed
2020-06-30 11:30:19 +03:00
Dmitriy Novozhilov
1d3c0f56a9
[FIR] Save type attributes in substitution
2020-06-30 11:30:19 +03:00
Dmitriy Novozhilov
25fd5cd4ac
[FIR] Save type attributes in ConeKotlinType.withNullability
2020-06-30 11:30:19 +03:00
Dmitriy Novozhilov
840d3975cc
[FIR] Add computing type attributes for deserialized types
2020-06-30 11:30:19 +03:00
Dmitriy Novozhilov
cfa250957a
[FIR] Fix creating type attributes for intersection types
2020-06-30 11:30:18 +03:00
Jinseong Jeon
fab9ee47f9
FIR deserializer: proper annotation loading for value parameter of property setter
2020-06-30 11:01:03 +03:00
Toshiaki Kameyama
9308525d93
Add receiver of kotlin.text.toPattern to standard Kotlin injections
...
#KT-39231 Fixed
2020-06-30 14:26:37 +07:00
Vyacheslav Karpukhin
787d22c93e
Created bunch 203
2020-06-30 03:41:51 +02:00
Egor Zhdan
09a111239e
Stabilize ProjectTaskRunner registration order
2020-06-29 23:11:54 +02:00
Vyacheslav Karpukhin
866e5397d9
New ultimate modules
2020-06-29 23:11:54 +02:00
Ilmir Usmanov
ed80b431f0
Restore refined int-type analysis
2020-06-29 21:42:30 +02:00
Alexander Gorshenev
8920e68584
Muted .IncrementalJsKlibCompilerRunnerTestGenerated.ClassHierarchyAffected.testMethodRemoved
...
until we have full fledged fake override support in klib
2020-06-29 21:58:32 +03:00
Alexander Gorshenev
41a472693a
Updated extraHelp test data for the new flags
2020-06-29 21:58:32 +03:00
Alexander Gorshenev
bf419bc243
Compute correct signature for fake override properties with type parameters
2020-06-29 21:58:32 +03:00
Alexander Gorshenev
d90c383287
Fine tuned fake override validator for internals
2020-06-29 21:58:32 +03:00
Alexander Gorshenev
e08b800eb9
Treat internals as publics for fake override construction
2020-06-29 21:58:31 +03:00
Alexander Gorshenev
e61960f333
Fake override construction fallback mode
2020-06-29 21:58:31 +03:00
Alexander Gorshenev
de79e3bec3
Added -Xdisable-fake-override-validator
2020-06-29 21:58:31 +03:00
Ilmir Usmanov
f127a0f593
Add flag to disable new spilled variable type analysis
2020-06-29 20:50:43 +02:00
Mikhail Zarechenskiy
d7df6e1e0c
Avoid references to DeprecatedSinceKotlin to fix JPS build
2020-06-29 21:49:01 +03:00
Ilmir Usmanov
28e6028af4
Minor. Add test
2020-06-29 20:13:40 +02:00
Ilmir Usmanov
da12532669
Ignore fake inliner variables in merge operation
...
since they are not read and just markers.
#KT-39863 Fixed
2020-06-29 20:13:37 +02:00
Mikhail Zarechenskiy
b0b8d40b71
Update ApiTest.testIrStdlib for JS, an addition to 9be8c5b5
2020-06-29 21:09:19 +03:00
Dmitry Petrov
e4198466b8
JVM_IR: No nullability annotations on static lambda instances
2020-06-29 19:32:03 +03:00
Dmitry Petrov
eefa621c56
JVM_IR KT-37006: InlineOnly property accessors are private in bytecode
2020-06-29 19:08:58 +03:00
Alexander Udalov
b94a4d9fc3
Render more information on inner classes in bytecode listing tests
2020-06-29 17:33:39 +02:00
Vyacheslav Gerasimov
4bb670e667
Build: Use project kotlin-reflect in fir tree generator
...
To avoid unstable dependency substitution depending on local version
2020-06-29 18:17:09 +03:00
Vyacheslav Gerasimov
1ef68dfffd
Build: Fix kotlin-test-js-ir:commonMainSources to copy only sources
...
Copying previous build result with sources leads to unstable task inputs
2020-06-29 18:17:08 +03:00
Vyacheslav Gerasimov
5198020c29
Build: Fix kotlin-stdlib related errors during jps build import
2020-06-29 18:17:08 +03:00
Vyacheslav Gerasimov
63b7350046
Build: Use sources from kotlin mpp source set in sourcesJar helper
2020-06-29 18:17:08 +03:00
Vyacheslav Gerasimov
77a8cf4e66
Build: Use attributes to resolve test dependencies in jps build mode
2020-06-29 18:17:08 +03:00
Igor Yakovlev
a32f901ab9
Make property initializer modification is OutOfBlock change
...
Fixed #KT-38762
2020-06-29 18:05:05 +03:00
Mikhail Zarechenskiy
507a718632
Update tests for completion after adding DeprecatedSinceKotlin
2020-06-29 17:41:05 +03:00
Mikhail Zarechenskiy
87014f816c
Update ApiTest.testStdlib for JS, an addition to 9be8c5b5
2020-06-29 17:04:42 +03:00
Mikhail Glukhikh
d798071e06
IrConstTransformer: drop unnecessary argument existence check
2020-06-29 16:31:24 +03:00
Jinseong Jeon
c3fc524c0d
FIR: handle named arguments in annotations properly
2020-06-29 16:23:03 +03:00
Mikhail Glukhikh
4f36697737
[FIR2IR] Mute 2 BB tests failing due to signature clashing
2020-06-29 16:08:26 +03:00
Mikhail Glukhikh
6cb3687d5d
[FIR2IR] Replace 'throw AssertionError()' with error() / assert() {...}
2020-06-29 16:08:15 +03:00
Mikhail Glukhikh
69ec8f2d89
[FIR2IR] Allow to get cached symbols in fake override generator
2020-06-29 16:08:14 +03:00
Mikhail Glukhikh
c4d41f48a3
[IR] Allow Fir2Ir symbols in function factory
2020-06-29 16:08:12 +03:00
Mikhail Glukhikh
a6234eb261
[FIR2IR] Don't compose signatures for private declarations
2020-06-29 16:08:11 +03:00
Mikhail Glukhikh
19d115778b
[IR] Allow fast reference path in SymbolTable for wrapped descriptors
2020-06-29 16:08:10 +03:00
Mikhail Glukhikh
90f9b9c1c9
[FIR2IR] Unmute 6 fixed BB tests
2020-06-29 16:08:09 +03:00
Mikhail Glukhikh
2d5e6bb90b
[FIR2IR] Introduce lazy properties
2020-06-29 16:08:08 +03:00
Mikhail Glukhikh
efd614194b
[FIR2IR] Make Fir2IrBindableSymbol public API
2020-06-29 16:08:06 +03:00
Mikhail Glukhikh
ca5e560f1f
[FIR2IR] Introduce lazy constructors
2020-06-29 16:08:05 +03:00
Mikhail Glukhikh
fcabd02fe8
[FIR] Take class expect flag into account in its substitution scope
2020-06-29 16:08:00 +03:00
Mikhail Glukhikh
c1609ed490
[FIR] Make expect class members also expect
2020-06-29 16:07:50 +03:00
Mikhail Glukhikh
2fefa682b7
[FIR2IR] Do not compose signature for local class members
2020-06-29 16:07:49 +03:00
Mikhail Glukhikh
9a0e763761
[FIR2IR] Require classId from parent class for fake overrides
2020-06-29 16:07:48 +03:00
Mikhail Glukhikh
34a2196295
FirClassSubstitutionScope: extract SubstitutedData & reorder functions
2020-06-29 16:07:43 +03:00
Mikhail Glukhikh
bf009a4949
[FIR2IR] Handle delegating constructor call type arguments properly
2020-06-29 16:07:30 +03:00
Mikhail Glukhikh
2cffbadbd5
[FIR2IR] Use overridden symbol when handling delegating constructor call
2020-06-29 16:07:29 +03:00
Mikhail Glukhikh
456508a332
IR SymbolTable: don't allow unbound symbols in declare by signature only
2020-06-29 16:07:27 +03:00
Mikhail Glukhikh
7243d04f58
[FIR2IR] Simplification of property building in lazy class
2020-06-29 16:07:26 +03:00
Mikhail Glukhikh
a8db7b3ba6
[FIR2IR] Simplification of function building in lazy class
2020-06-29 16:07:25 +03:00
Mikhail Glukhikh
f7be373711
Add extra parent checks in Fir2IrLazyClass
2020-06-29 16:07:24 +03:00
Ivan Kylchik
13f7b6a22e
Create separate constructor for ir interpreter with only ir builtins
...
By introducing this constructor, ir interpreter will no longer find ir
exceptions in module and so interpreter is creating faster for fir2ir
goals
2020-06-29 15:27:26 +03:00
Ivan Kylchik
de2b20482a
Allow IrConstTransformer to visit and evaluate vararg elements
2020-06-29 15:27:25 +03:00
Ivan Kylchik
6fa03297f9
Allow IrConstTransformer to visit annotations of all declarations
2020-06-29 15:27:25 +03:00
Ivan Kylchik
c87b12ec2f
Speed up fir2ir constant evaluation
...
This fix extract IrConstTransformer object to a common variable and all
files then use it
2020-06-29 15:27:24 +03:00
Mikhail Zarechenskiy
032fdd63d9
Ignore codegen test for Android
...
There is no such method as java.util.List.stream
2020-06-29 15:26:20 +03:00
Leonid Startsev
6ea0c37e52
Update test data with new package name after 901d8f3e7a
2020-06-29 15:09:30 +03:00
Mikhail Zarechenskiy
6efa7a51c6
Fix priority for "add import" action wrt DeprecatedSinceKotlin
2020-06-29 14:25:09 +03:00
Mikhail Zarechenskiy
beca7fca30
Fix completion order & presentation wrt to DeprecatedSinceKotlin
2020-06-29 14:25:09 +03:00
Mikhail Zarechenskiy
bcaa635a4e
Fix parameter info presentation with regard to DeprecatedSinceKotlin
2020-06-29 14:25:09 +03:00
Mikhail Zarechenskiy
9be8c5b527
Update test data about built-ins
2020-06-29 14:25:09 +03:00
Mikhail Zarechenskiy
b7df9ec05a
Implement equals/hashCode as this class previously was a data one
...
Fixes duplicated diagnostics in tests
2020-06-29 14:25:08 +03:00
Mikhail Zarechenskiy
a2da00eb49
Prohibit using DeprecatedSinceKotlin outside kotlin subpackage
2020-06-29 14:25:08 +03:00
Mikhail Zarechenskiy
790433984b
Prohibit using DeprecatedSinceKotlin annotation without arguments
2020-06-29 14:25:08 +03:00
Mikhail Zarechenskiy
67100d5ebe
Reject values of DeprecatedSince.. that are not parseable as a version
2020-06-29 14:25:07 +03:00
Mikhail Zarechenskiy
5d88058928
Place DeprecatedSinceKotlin annotation under 1.4 version
2020-06-29 14:25:06 +03:00
Mikhail Zarechenskiy
2f55a3fa0d
Add various test for DeprecatedSinceKotlin annotation
2020-06-29 14:23:26 +03:00
Mikhail Zarechenskiy
0f2c96c64d
Don't perform additional lookups for DeprecatedSinceKotlin annotation
...
There is no need to check it as `DeprecatedSinceKotlin` can be used
only along with `Deprecated` annotation
2020-06-29 14:23:22 +03:00
Mikhail Zarechenskiy
158013ef3a
Remove message and replaceWith parameters from DeprecatedSinceKotlin
2020-06-29 14:22:33 +03:00
Mikhail Zarechenskiy
60c51476f2
Introduce declaration checker for DeprecatedSinceKotlin annotation
...
- DeprecatedSinceKotlin annotation should only be applicable when
there's `@Deprecated` annotation on the same declaration
- Deprecation level shouldn't be specified in the relevant
`@Deprecated` annotation
- Check that warningSince <= errorSince <= hiddenSince
2020-06-29 14:22:32 +03:00
Alexander Udalov
0aaf29c045
Introduce DeprecatedSinceKotlin annotation
...
This annotation will be used in the standard library to prevent the new
compiler from reporting deprecation diagnostics in case an older API
version is used (where the declaration was not deprecated yet).
#KT-23575 Fixed
2020-06-29 14:22:29 +03:00
Dmitriy Dolovov
b2022144e6
[Commonizer] Fast-pass for library fragments absent for some targets
...
^KT-39897
2020-06-29 16:40:59 +07:00
Dmitriy Novozhilov
ee22488ab2
[FIR] Cleanup FIR modules. Part 8 (types package)
2020-06-29 12:19:06 +03:00
Dmitriy Novozhilov
2c3fe8b8ec
[FIR] Cleanup FIR modules. Part 7 (scopes package)
2020-06-29 12:19:06 +03:00
Dmitriy Novozhilov
c6124f6d56
[FIR] Cleanup FIR modules. Part 6 (transformers package)
2020-06-29 12:19:05 +03:00
Dmitriy Novozhilov
e817f919c2
[FIR] Cleanup FIR modules. Part 5 (body.resolve package)
2020-06-29 12:19:05 +03:00
Dmitriy Novozhilov
285b6d28af
[FIR] Cleanup FIR modules. Part 4 (providers and resolve packages)
2020-06-29 12:19:05 +03:00
Dmitriy Novozhilov
1d90302848
[FIR] Cleanup FIR modules. Part 3 (inference package)
2020-06-29 12:19:05 +03:00
Dmitriy Novozhilov
1766c22f6f
[FIR] Cleanup FIR modules. Part 2 (dfa package)
2020-06-29 12:19:04 +03:00
Dmitriy Novozhilov
604c68b3a0
[FIR] Cleanup FIR modules. Part 1 (calls package)
2020-06-29 12:19:04 +03:00
Dmitriy Novozhilov
1ac0e8449b
[FIR] Move FirJavaTypeRef to fir.jvm module
2020-06-29 12:19:04 +03:00
Dmitriy Novozhilov
fd1de9b298
[FIR] Fix typo in FirCloneableSymbolProvider
2020-06-29 12:19:03 +03:00
Dmitriy Novozhilov
57b9baac53
[FIR] Get rid of FirSession.inferenceContext
...
Leave only FirSession.typeContext
2020-06-29 12:19:03 +03:00
Dmitriy Novozhilov
43bb60addb
[FIR] Remove workaround for KT-39659
2020-06-29 12:19:03 +03:00
Dmitriy Novozhilov
7834284bec
[FIR] Support deserialization of value parameter annotations
...
There are still some problems, see KT-39837
2020-06-29 12:19:03 +03:00
Dmitriy Novozhilov
2b2f9b3386
[FIR] Remove delegate specific methods from abstract inference session
2020-06-29 12:19:02 +03:00
Dmitriy Novozhilov
9c6ed2ea02
[FIR] Complete delegate calls in default inference session
2020-06-29 12:19:02 +03:00
Dmitriy Novozhilov
dbbb999952
[FIR] Support builder (coroutine) inference
...
#KT-37431 Fixed
2020-06-29 12:19:02 +03:00
Dmitriy Novozhilov
6a9504f26a
[FIR-TEST] Add coroutines diagnostic tests from old FE to FIR test suite
2020-06-29 12:19:02 +03:00
Dmitriy Novozhilov
d0affc6c6a
[FIR] Rename ResolverParts.kt to ResolutionStages.kt
2020-06-29 12:19:01 +03:00
Dmitriy Novozhilov
de1b5cd056
[FIR] Add extracting @Exact and @NoInfer attributes from annotations
...
(cherry picked from commit e4c8c14e3e )
2020-06-29 12:19:01 +03:00
Dmitriy Novozhilov
7ab3dd04a0
[FIR] Add attributes for @Exact and @NoInfer
...
(cherry picked from commit e43932f147 )
2020-06-29 12:19:01 +03:00
Dmitriy Novozhilov
ac51e5dbd1
[FIR] Add workaround for KT-19306
2020-06-29 12:19:00 +03:00
Dmitriy Novozhilov
3f5db6b86e
[FIR] Add ConeAttributes to ConeKotlinType
...
(cherry picked from commit f76befa84e )
2020-06-29 12:19:00 +03:00
Dmitriy Novozhilov
e76f3f93f6
[FIR] Move ArrayMap to cones module
...
(cherry picked from commit 407d1365bd )
2020-06-29 12:19:00 +03:00
Abduqodiri Qurbonzoda
d3fb9cc5f3
Deprecate with error mixed Int/FP contains operator for ranges KT-22423
2020-06-29 12:18:19 +03:00
Vladimir Dolzhenko
ab20b3e083
Add InterruptedException handler to CancellableSimpleLock
...
#EA-220650 Fixed
2020-06-29 08:47:53 +00:00
Vladimir Dolzhenko
a9444c386d
Use actual import list on PlainTextPaste
...
#EA-225256 Fixed
2020-06-29 08:47:52 +00:00
Dmitry Gridin
30f98e6730
Inline refactoring: shouldn't lose return type information
...
#KT-26705 Fixed
2020-06-29 07:55:21 +00:00
Dmitry Gridin
c3b726f10a
Inline refactoring: should add explicit type argument for parameters
...
#KT-17402 Fixed
2020-06-29 07:55:20 +00:00
Dmitry Gridin
45234c9784
Inline refactoring: fix case with introduction of variable to return
...
#KT-39818 Fixed
2020-06-29 07:55:20 +00:00
Andrey Uskov
f4e9acb233
Escape arguments when Gradle plugin launches out of process compilation
...
#KT-39755 Fixed
2020-06-28 11:38:04 +03:00
Yunir Salimzyanov
90dae320c3
Specify full name of parametrized flaky test to synchronize it on TeamCity
...
KTI-239
2020-06-27 13:29:18 +03:00
Yunir Salimzyanov
b795e50e61
Add logic to synchronize muted tests on teamcity with database flaky tests
...
KTI-239
2020-06-27 13:29:18 +03:00
Yunir Salimzyanov
a382bef144
Extract classes and related functions of muteWithDatabase to separate module
2020-06-27 13:29:18 +03:00
Yunir Salimzyanov
4474077963
Create separate module for muting tests logic
2020-06-27 13:29:17 +03:00
Georgy Bronnikov
5e115c48b3
Unmute FIR test
2020-06-27 00:25:34 +03:00
Shagen Ogandzhanian
8a393ec041
Update dukat dependency to 0.5.4
2020-06-26 21:05:21 +02:00
Leonid Startsev
901d8f3e7a
Rename several core entities as a part of kx.serialization abi change
2020-06-26 20:31:23 +03:00
Leonid Startsev
5208bbcd21
Support new ContextSerializer signature
2020-06-26 20:31:22 +03:00
Toshiaki Kameyama
7ea1700b78
Convert lambda to reference: support generic function call
...
#KT-14578 Fixed
#KT-14395 Fixed
2020-06-26 20:30:39 +03:00
Dmitry Petrov
2137a4b1e5
JVM, JVM_IR: no nullability annotations on private and synthetic methods
...
NB it looks like it doesn't cover all cases, e.g., some synthetic
methods generated for suspend functions.
2020-06-26 18:51:35 +03:00
Georgy Bronnikov
5684e694b5
JVM_IR: handle diamond inheritance for Java fields
2020-06-26 18:46:41 +03:00
Anton Bannykh
da79f93c61
JS IR: per-module .js generation support
2020-06-26 17:55:33 +03:00
Anton Bannykh
deb5dc1057
Don't merge files into a single module
2020-06-26 17:55:33 +03:00
Anton Bannykh
5239ab477c
Lowerings apply to a list of modules
2020-06-26 17:55:33 +03:00
Anton Bannykh
9a1d9814de
Simpify phase building
2020-06-26 17:55:33 +03:00
Anton Bannykh
2e68526b44
Merge ES6 pipeline
2020-06-26 17:55:32 +03:00
Anton Bannykh
a1c9ee1013
Mute failing ES6 phases
2020-06-26 17:55:32 +03:00
Alexey Trilis
955087868a
KT-39843 Update project wizard templates after replacing kotlin.browser with kotlinx.browser
...
#KT-39843 Fixed
2020-06-26 17:54:02 +03:00
Denis Zharkov
66e53305bf
FIR: Leave only one composite-like scope implementation
2020-06-26 16:52:10 +03:00
Denis Zharkov
09bb755088
FIR: Pass scope to FirSpecificTypeResolverTransformer as data
2020-06-26 16:52:10 +03:00
Denis Zharkov
cea38771f1
FIR: Unbound TypeResolver from IterableScope
2020-06-26 16:52:10 +03:00
Denis Zharkov
b607cecc2b
FIR: Clear JavaTypeParameterStack
...
- Remove unused method
- Rename method to make it findable through "Find usages"
2020-06-26 16:52:10 +03:00
Denis Zharkov
f3e4e9b162
FIR: Make qualifier have only one static scope
...
It's more correct as that's how it works in FE 1.0
2020-06-26 16:52:10 +03:00
Denis Zharkov
a017109d7d
FIR: Use static scope for importing from non-object classes
2020-06-26 16:52:10 +03:00
Denis Zharkov
396c6377f8
FIR: Do not check statics in MemberScopeTowerLevel
...
Type scopes should not contain them anymore
2020-06-26 16:52:10 +03:00
Denis Zharkov
9668a60151
FIR: Explicitlty separate static and member scopes
...
For Java, they have rather different semantics considering "overrides"
and obtaining functions/properties from supertypes
See the Java statics implementation
2020-06-26 16:52:10 +03:00
Denis Zharkov
e058c578a8
FIR: Minor. Make method private
2020-06-26 16:52:10 +03:00
Denis Zharkov
24d7d208a0
FIR: Extract Java class rendering in tests
2020-06-26 16:52:10 +03:00
Denis Zharkov
9b5b882dcb
Add "*.jar binary" to .gitattributes
2020-06-26 16:52:10 +03:00
Ilya Goncharov
be2d6b99f6
[Gradle, JS] Add test on changing of default value for generating externals
2020-06-26 16:26:13 +03:00
Ilya Goncharov
4bfcb4b041
[Gradle, JS] Use common projectName fun
2020-06-26 16:26:13 +03:00
Ilya Goncharov
89c1af4feb
[Gradle, JS] Add tests on changing generating externals for npm deps
2020-06-26 16:26:13 +03:00
Ilya Goncharov
891071e074
[Gradle, JS] Add assertSingleFileExists
2020-06-26 16:26:13 +03:00
Ilya Goncharov
405412f6c1
[Gradle, JS] Use generateExternalsIntegrated instead of full build
2020-06-26 16:26:13 +03:00
Ilya Goncharov
f584fb1576
[Gradle, JS] Add test on integrated dukat task
2020-06-26 16:26:13 +03:00
Ilya Goncharov
1a9f236a60
[Gradle, JS] Add tests on Separate Dukat integration
2020-06-26 16:26:12 +03:00
Ilya Goncharov
007970ded8
[Gradle, JS] Add independent peer npm dependency to test
...
^KT-39842 fixed
2020-06-26 16:20:45 +03:00
Ilya Goncharov
bd05b447c0
[Gradle, JS] Ignore peer dependencies in yarn resolution
...
^KT-39842 fixed
2020-06-26 16:20:35 +03:00
Dmitry Petrov
9468670980
Minor: update testData with nullability annotations
2020-06-26 15:17:23 +03:00
Dmitry Petrov
64e47265e1
JVM, JVM_IR: no nullability annotations on lateinit backing fields
2020-06-26 15:08:23 +03:00
Toshiaki Kameyama
e822e871f5
KT-39532 Support intention to convert reference to lambda and vice versa for adapted references ( #3495 )
...
* Convert lambda to reference: support a function which has default parameters/unit return type/suspendability
#KT-39532 Fixed
2020-06-26 14:21:17 +03:00
Mikhail Zarechenskiy
a87b25d10e
Don't silently ignore argument mismatch for provide delegate
...
#KT-39816 Fixed
2020-06-26 14:03:49 +03:00
Mikhail Zarechenskiy
ea5fef76d1
Fix ambiguity on reference inside blocks of special functions
...
#KT-37058 Fixed
2020-06-26 14:03:49 +03:00
Mikhail Zarechenskiy
c2c139ef4f
Fix adaptation for references with default values after varargs
...
After vararg argument it's possible to pass values only by name, so
here we modulate this behavior
#KT-37721 Fixed
2020-06-26 14:03:48 +03:00
Mikhail Zarechenskiy
c5a2ab2512
Callable reference adaptation should have dependency on API version 1.4
...
#KT-38069 Fixed
2020-06-26 14:03:47 +03:00
Mikhail Zarechenskiy
bc40669598
Prohibit functional interface constructor references
...
#KT-36706 Fixed
2020-06-26 14:03:47 +03:00
Ilya Gorbunov
e3050cd997
Minor tweaks in js api dump run configuration
...
- parallel build
- clean test results before running tests again
2020-06-26 13:53:49 +03:00
Ilya Gorbunov
94ab50a21a
Fixup stdlib-js api dump
...
Some strange effect related to loading types from kotlin.reflect.
2020-06-26 13:52:05 +03:00
Ilya Kirillov
366a75e222
Wizard: update versions of used libraries for 1.4-M3
...
#KT-39503 fixed
#KT-39503 fixed
2020-06-26 12:19:35 +03:00
Ilya Kirillov
35d5936829
Wizard: add info about used Kotlin version to project test importing failure
2020-06-26 12:19:34 +03:00
Dmitriy Novozhilov
7ea17f0d31
Revert "[FIR] Move ArrayMap to cones module"
...
This reverts commit 407d1365
2020-06-26 11:47:20 +03:00
Dmitriy Novozhilov
0b29a3e5c1
Revert "[FIR] Add ConeAttributes to ConeKotlinType"
...
This reverts commit f76befa8
2020-06-26 11:47:08 +03:00
Dmitriy Novozhilov
76550d3c5d
Revert "[FIR] Add attributes for @Exact and @NoInfer"
...
This reverts commit e43932f1
2020-06-26 11:46:59 +03:00
Dmitriy Novozhilov
c0634217e1
Revert "[FIR] Add extracting @Exact and @NoInfer attributes from annotations"
...
This reverts commit e4c8c14e
2020-06-26 11:46:50 +03:00
Pavel Kirpichenkov
59e63f549b
Add completion highlighting tests for heavy Kotlin files
...
#KT-37219 In Progress
2020-06-26 11:13:07 +03:00
Pavel Kirpichenkov
5c70f973a5
Force resolution of file annotations before element analysis
...
^KT-37219 In Progress
2020-06-26 11:13:07 +03:00
Dmitriy Novozhilov
e4c8c14e3e
[FIR] Add extracting @Exact and @NoInfer attributes from annotations
2020-06-26 10:54:51 +03:00
Dmitriy Novozhilov
e43932f147
[FIR] Add attributes for @Exact and @NoInfer
2020-06-26 10:54:51 +03:00
Dmitriy Novozhilov
f76befa84e
[FIR] Add ConeAttributes to ConeKotlinType
2020-06-26 10:54:51 +03:00
Dmitriy Novozhilov
407d1365bd
[FIR] Move ArrayMap to cones module
2020-06-26 10:54:50 +03:00
Matts966
36102504a1
Update ReadMe.md
2020-06-26 09:41:57 +02:00
Matts966
20ed42dd38
Update deprecated doc about mac build environment requirements
2020-06-26 09:41:57 +02:00
Toshiaki Kameyama
2fd3af73eb
Convert reference to lambda: fix it works correctly when referenced function has default argument
...
#KT-17222 Fixed
#KT-24138 Fixed
#KT-39532
2020-06-26 10:20:29 +03:00
Mikhail Zarechenskiy
bc34f7f7f5
Add test for obsolete issue
...
#KT-26345 Obsolete
2020-06-26 07:45:25 +03:00
Abduqodiri Qurbonzoda
a04f70fb36
Fix min/maxByOrNull function samples
2020-06-26 07:16:01 +03:00
Mikhail Zarechenskiy
684ca5029f
Add tests for obsolete issues
...
#KT-37734 Obsolete
#KT-39824 Obsolete
2020-06-26 06:24:59 +03:00
shiraji
9844607d0f
Make string literals clickable
...
#KT-35732 Fixed
#KT-32403 Fixed
2020-06-25 22:40:39 +02:00
Igor Yakovlev
f06e116bf7
Improved equals for light decompiled declarations
2020-06-25 23:19:54 +03:00
Igor Yakovlev
27c139926c
LightClass improved isInheritor check for cases when resolve is failed
...
Fixed #KT-37210
2020-06-25 23:17:09 +03:00
Guillaume Darmont
e72a06bdf4
Add specific highlight for Enum class
...
#KT-39844 Fixed
2020-06-25 21:53:19 +02:00
Dmitry Petrov
3f266aafb4
JVM: no nullability annotations on private and synthetic fields
2020-06-25 22:31:12 +03:00
Victor Petukhov
cbd8b58d5c
Commit trace for callable reference's LHS with reserved syntax like foo?::bar?::bar to avoid the lack of diagnostics reporting
...
^KT-35075 Fixed
2020-06-25 20:44:58 +03:00
Ilmir Usmanov
1ee8e615fc
Reuse value is ISTORE if expected type is the same, otherwise, create
...
new value
2020-06-25 18:51:15 +02:00
Ilmir Usmanov
c21820c615
Revert "Revert "Fix merging two reference values""
...
This reverts commit 1cccceabb9 .
2020-06-25 18:51:13 +02:00
Ilmir Usmanov
a6f14c206b
Revert "Revert "Revert "Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline""""
...
This reverts commit 447308dcfc .
2020-06-25 18:51:11 +02:00
Kristoffer Andersen
b95d3e711e
[JVM IR] KT-36985: $default respects @Deprecated
...
$default dispatch methods gains @Deprecated if the original function
with default arguments has it.
2020-06-25 18:43:45 +03:00
Ilya Gorbunov
034623f82a
Fix top level import quick fix test for JS
...
There's no longer any JS-only top level function that is not imported
by default, so I used a common non-imported top level function.
2020-06-25 18:36:04 +03:00
Ilya Gorbunov
448e0ceae1
Drop quickfix tests that relied on removed native annotation
2020-06-25 18:36:04 +03:00
Ilya Gorbunov
8dfcebf542
Expose KTypeProjection.STAR constant in a field
...
#KT-30083
2020-06-25 18:25:24 +03:00
Ilya Gorbunov
53cbcfac5a
Validate arguments of KTypeProjection constructor
...
#KT-34596 Fixed
2020-06-25 18:25:24 +03:00
Ilya Gorbunov
d41e8ed4ad
Annotate KTypeProjection factory methods with JvmStatic
...
#KT-30084 Fixed
2020-06-25 18:25:24 +03:00
Ilya Chernikov
e8659d4b37
Fix initializer error arizing on scripting annotation creation
...
also fixes tests in main-kts
2020-06-25 17:21:38 +02:00
Vladimir Dolzhenko
3585f80c67
Fix 201 compilation
...
Relates to #KT-17926
2020-06-25 17:15:13 +02:00
Toshiaki Kameyama
12cd3785b0
Move statement: move parameters/arguments with a comment correctly
...
#KT-34705 Fixed
#KT-34707 Fixed
#KT-34587 Fixed
2020-06-25 15:45:25 +02:00
Raluca Sauciuc
9c8904f165
Restore KotlinExplicitMovementProvider in as40
2020-06-25 15:06:27 +02:00
Norbert Nogacki
990903e4e2
Show documentation for a class if the constructor has no docs
...
#KT-17926 Fixed
2020-06-25 14:42:03 +02:00
Mikhail Glukhikh
699829ccb3
Make FIR multi-module tests from IDE regular FIR compiler resolve tests
2020-06-25 12:35:25 +03:00
Ivan Kylchik
79691feb8f
Fix fir load compiled kotlin tests after introducing const deserializer
2020-06-25 12:30:24 +03:00
Ivan Kylchik
027d177c15
Remove IGNORE_FIR from tests that are using unsigned constants
2020-06-25 12:30:23 +03:00
Ivan Kylchik
c80cf0f34c
Remove IGNORE_FIR from ranges tests
2020-06-25 12:30:21 +03:00
Ivan Kylchik
70f0f357fa
Remove IGNORE_FIR from stepped ranges tests
2020-06-25 12:30:19 +03:00
Ivan Kylchik
6c6b7c8b84
Implement constant deserializer for fir
...
This deserializer is uniform loader, that is responsible for loading
all constants. For example, Math.E, UInt.MAX_VALUE or Float.MIN_VALUE.
2020-06-25 12:30:19 +03:00
Kirill Shmakov
b62e22cb01
Fix Android app in template project
2020-06-25 11:54:23 +03:00
Ivan Kylchik
895c32e21c
Create separate source set for interpreter map generator
...
A separate source set is needed so that the generator no longer depends
on the generated code
2020-06-25 10:45:19 +03:00
Ilya Gorbunov
643d339496
Advance bootstrap to 1.4.20-dev-1080
2020-06-25 02:37:39 +03:00
Vladimir Ilmov
d6483ace94
(UltraLightClasses) fix for processing stubs for Deprecation.HIDDEN annotation fast-path
2020-06-25 00:39:34 +02:00
Mikhail Zarechenskiy
a5ae1b38b0
Don't skip constraints from equations with the kind equal
...
The problem was that we didn't incorporate T == Foo into K <: Inv<out T>.
It happened because of optimisation that isn't applicable here as we
already have projection in the initial type
#KT-39777 Fixed
2020-06-24 23:36:59 +03:00
Toshiaki Kameyama
ab34f8c738
Add indent before accessor for extension property (KT-33131)
...
#KT-33131 Fixed
2020-06-24 21:42:02 +02:00
Alexander Udalov
c6a481190a
JVM: optimize type mapping for primitive types
2020-06-24 19:26:59 +02:00
Alexander Udalov
64f7c3f498
IR: do not use descriptors in IrTypeSystemContext.getPrimitiveType
...
Also optimize getPrimitiveType and getPrimitiveArrayType. Convert
PrimitiveType to Kotlin to leverage the switch over string optimization,
which is not possible in Java 6 (which is used to compile
'descriptors').
2020-06-24 19:26:59 +02:00
Alexander Udalov
7013becda5
IR: remove IrBuiltInOperator, use IrFunctionImpl instead
...
It seems that this is no longer needed. This change in particular helps
to avoid megamorphic interface call on IrValueParameter.accept, which
happens a lot because there are usually many value parameters.
2020-06-24 19:26:55 +02:00
Alexander Udalov
988226a90e
IR: optimize FqNameEqualityChecker.checkViaDeclarations
2020-06-24 19:16:12 +02:00
Alexander Udalov
014d855449
IR: minor, make all overrides in IrElementTransformerVoid final
2020-06-24 19:16:11 +02:00
Alexander Udalov
3c90e25cb4
IR: optimize IrType.isNullable, do not use DFS
...
DFS is not justified for type usages. In contrast to type hierarchies,
traversing the type usage naively with recursion has linear, not
exponential, complexity.
2020-06-24 19:16:11 +02:00
pavlospt
597bc061e2
Add Kotlin Data Class, Sealed Class and Annotation file templates
...
#KT-20775 Fixed
2020-06-24 16:25:51 +02:00
Toshiaki Kameyama
2162c39ab3
Quick doc: show default parameter value
...
#KT-19069 Fixed
2020-06-24 16:20:21 +02:00
Ilya Gorbunov
33150a0809
KT-38817 capitalize uses title case for the first char where available
...
This unifies its behavior with new capitalize overload with Locale.
Co-authored-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2020-06-24 16:45:09 +03:00
Ilya Gorbunov
9e2f95233c
Promote capitalize/decapitalize with Locale to stable
...
Relates to KT-28933
2020-06-24 16:45:08 +03:00
Ivan Kylchik
e34246faec
Fix fir2ir text tests after introducing const evaluator
2020-06-24 16:13:02 +03:00
Ivan Kylchik
8044b47984
Create internalName extension method that returns fqName as jvm internal
2020-06-24 16:13:02 +03:00
Ivan Kylchik
ddd03373cc
Allow to interpret toString method from Any class for ONLY_BUILTINS mode
...
This change aims to support string concatenation operation with const
properties
2020-06-24 16:13:02 +03:00
Ivan Kylchik
6f4f7dd090
Remove coroutines from ir interpreter
2020-06-24 16:13:01 +03:00
Ivan Kylchik
f028d6c898
Move interpreter files to separate module
2020-06-24 16:13:01 +03:00
Ivan Kylchik
64aa0ec5c8
Add new module for ir interpreter
2020-06-24 16:13:01 +03:00
Ivan Kylchik
49124709b8
Remove all usages of descriptors from interpreter
2020-06-24 16:13:01 +03:00
Ivan Kylchik
e4f88e83fe
Get rid of compile time check in generator for ir builtins map
...
These checks are unnecessary because we use all methods from given
classes
2020-06-24 16:13:01 +03:00
Ivan Kylchik
2534b15553
Remove descriptors.jvm dependency from common backend module
...
Common backend should not depend on JVM parts
2020-06-24 16:13:00 +03:00
Ivan Kylchik
8f6a1b418d
Add method to evaluate constant expressions in ir module for fir2ir
2020-06-24 16:13:00 +03:00
Ivan Kylchik
fa221af1b1
Move IrConstTransformer.kt to evaluate package
2020-06-24 16:13:00 +03:00
Ivan Kylchik
932ce71093
Rename method checkForError to replaceIfError
...
This name better reflects the point of this method.
a.replaceIfError(b) will return b instead of a in case a is an error
expression
2020-06-24 16:13:00 +03:00
Ivan Kylchik
b71c74c6ef
Remove descriptor usages in Primitive.kt
2020-06-24 16:13:00 +03:00
Ivan Kylchik
0c6d485c9c
Rename ReturnLabel.NEXT to ReturnLabel.REGULAR
...
This name better describe that this label mean: execution was finished
regular and there is no need to make special processing
2020-06-24 16:13:00 +03:00
Ivan Kylchik
9377d274a8
Drop ExecutionResult class implementations and make it regular class
...
There was 2 implementations that I managed to combine
2020-06-24 16:12:59 +03:00
Ivan Kylchik
c386cbeb54
Move checkNullability function in State.kt file
2020-06-24 16:12:59 +03:00
Ivan Kylchik
e57de9a08f
Mark most of classes and functions from interpreter package as internal
...
Main goal is to avoid ambiguity because some names, that are used by
interpreter, can be found in other modules
2020-06-24 16:12:59 +03:00
Ivan Kylchik
27c52f54ca
Remove IGNORE_FIR from tests that are passing after constant folding
2020-06-24 16:12:59 +03:00
Ivan Kylchik
f20e878d35
Add constant folding after FIR2IR processing
2020-06-24 16:12:59 +03:00
Ivan Kylchik
f2045b857b
Add fix for interpretation const val
...
After FIR2IR processing getter doesn't has body, but has initializer.
On the other hand common IR has body for const val getter
2020-06-24 16:12:59 +03:00
Ivan Kylchik
af6ed5ca43
Change toIrConst extension function logic
...
For now this function check not value, but type. By ir type it create
right ir const
2020-06-24 16:12:59 +03:00
Ivan Kylchik
3155f56d8a
Change the way of receiving fields
...
Before that, interpreted values for fields were taken by backing
field's symbol. For now, they will be taken by property's symbol.
It was done because not all properties contain backing field. For
example, Throwable class in FIR2IR.
2020-06-24 16:12:58 +03:00
Ivan Kylchik
8644c48b28
Prevent interpretation of call expression with continue/break statement
...
Example: foo("" + continue)
2020-06-24 16:12:58 +03:00
Ivan Kylchik
d90aba60cc
Implement correct type checks and casts taking into account erased types
2020-06-24 16:12:58 +03:00
Ivan Kylchik
7a19906705
Change all usages of descriptors in interpreter to usages of ir symbols
2020-06-24 16:12:58 +03:00
Ivan Kylchik
db5046af85
Add support in interpreter for jvm static fields in primitive classes
2020-06-24 16:12:58 +03:00
Ivan Kylchik
a3c77eca08
Make interpreter maps of enum and object declarations non static
...
Instead of this just create interpreter once per module handling
2020-06-24 16:12:58 +03:00
Ivan Kylchik
ff830cc744
Make state property mutable in Variable class
...
This change allow to remove copy method from State interface
2020-06-24 16:12:57 +03:00
Ivan Kylchik
848ca70de1
Change keys in static maps of enums and objects from String to IrSymbol
2020-06-24 16:12:57 +03:00
Ivan Kylchik
224d56ec15
Allow compile time calculations inside object declaration
2020-06-24 16:12:57 +03:00
Ivan Kylchik
1c498660dc
Create ir compile time checker
...
This checker is suppose to return true if ir node can be computed
in compile time
2020-06-24 16:12:57 +03:00
Ivan Kylchik
19495e40f7
Remove unnecessary getAllTypeArguments method from Stack class
2020-06-24 16:12:57 +03:00
Ivan Kylchik
99d823da8a
Remove unnecessary getThisAsReceiver function from Utils.kt file
2020-06-24 16:12:57 +03:00
Ivan Kylchik
c6240face0
Add test for generation builtins map for interpreter
2020-06-24 16:12:57 +03:00
Ivan Kylchik
1103de4bd5
Prepare ir interpreter for receiving ir bodies in separate map
...
This change will be useful when starts work with jvm klib
2020-06-24 16:12:56 +03:00
Ivan Kylchik
9542eb36ec
Support interpretation of String's plus method and its extension version
2020-06-24 16:12:56 +03:00
Ivan Kylchik
94e36411fa
Support interpretation for inner class
2020-06-24 16:12:56 +03:00
Ivan Kylchik
0c1f2edbf2
Get rid of abstract and fake override checks in ir call interpretation
...
For now interpreter will find necessary method for interpretation in
one step instead of checking is this method abstract or fake override
2020-06-24 16:12:56 +03:00
Ivan Kylchik
80d83f8703
Change check for Wrapper method
...
For now method is wrapper if its receiver is Wrapper and
method itself isn't inline only
2020-06-24 16:12:56 +03:00
Ivan Kylchik
38822c3bf8
Implement correct interpretation of toList function
2020-06-24 16:12:56 +03:00
Ivan Kylchik
ba8147cd47
Allow lambda to be used in built in calculation
...
Primary use case to allow lambda null check
2020-06-24 16:12:55 +03:00
Ivan Kylchik
5f61f6f3a5
Simplify interpretation for java methods with names other in kotlin
2020-06-24 16:12:55 +03:00
Ivan Kylchik
2e0d4c9af1
Add correct interpretation for unsigned arrays in vararg method handler
2020-06-24 16:12:55 +03:00
Ivan Kylchik
30f2affb93
Add support for local function that are declared and called immediately
2020-06-24 16:12:55 +03:00
Ivan Kylchik
296f343cab
Change conditions for saving type arguments into stack
...
For now all type arguments are saved. This is necessary for several
reason:
1. ir type operator call need to get right type argument class
2. if class is local then information about type argument cannot be lost
2020-06-24 16:12:55 +03:00
Ivan Kylchik
a095309e10
Allow local declaration interpretation
...
By local declaration is meant local functions and local objects
2020-06-24 16:12:55 +03:00
Ivan Kylchik
2c93c46b84
Implement do while loop
2020-06-24 16:12:55 +03:00
Ivan Kylchik
1e82975a7c
Replace explicit returnLabel call to check call inside try interpreter
2020-06-24 16:12:54 +03:00
Ivan Kylchik
a14e8e4c28
Implement cache for enum entries and objects
2020-06-24 16:12:54 +03:00
Ivan Kylchik
0b0550f562
Remove useless Intrinsic interface
...
Moved all its methods inside sealed class
2020-06-24 16:12:54 +03:00
Ivan Kylchik
eb3ac74c3f
Move out intrinsic evaluation from interpreter class
2020-06-24 16:12:54 +03:00
Ivan Kylchik
6eae77572a
Move stack trace inside Stack class
2020-06-24 16:12:54 +03:00
Ivan Kylchik
e00dc76645
Simplify constructor interpretation
...
Unified case with secondary and primary constructors
2020-06-24 16:12:53 +03:00
Ivan Kylchik
cf63a5f52b
Replace some casts to Primitive with corresponding extension calls
2020-06-24 16:12:53 +03:00
Ivan Kylchik
5791ecd4f7
Remove redundant suspend modifiers
2020-06-24 16:12:53 +03:00
Ivan Kylchik
cb0eb008f8
Implement correct access to stack
...
Rewrote work with data and implement Stack class that work over Frame
2020-06-24 16:12:53 +03:00
Ivan Kylchik
06e6c7cdf5
Implement interpretation for object with overridden methods
2020-06-24 16:12:53 +03:00
Ivan Kylchik
fe7abb7132
Remove unnecessary code about handling KotlinNullPointerException
...
This part of code was necessary because jvm threw
KotlinNullPointerException, but js expected NullPointerException.
2020-06-24 16:12:53 +03:00
Ivan Kylchik
2f41eef797
Replace throw of interpreter errors by throw of InterpreterException
2020-06-24 16:12:53 +03:00
Ivan Kylchik
aed78f3c9b
Bound commands limit and throw interpreter exception upon exceeding
2020-06-24 16:12:52 +03:00
Ivan Kylchik
be42ae470d
Simplify extraction logic of receiver in ir call interpreter
2020-06-24 16:12:52 +03:00
Ivan Kylchik
2189fe5796
Add suspend modifier to getNextLabel method in Label interface
2020-06-24 16:12:52 +03:00
Ivan Kylchik
fd51a9a085
Change signature in getArgsForMethodInvocation method
2020-06-24 16:12:52 +03:00
Ivan Kylchik
30e352ea27
Move Variable data class to separate file
2020-06-24 16:12:52 +03:00
Ivan Kylchik
ef4e4881b7
Implement spread operator interpretation
2020-06-24 16:12:52 +03:00
Ivan Kylchik
c9e5b6a234
Unify value arguments interpretation
2020-06-24 16:12:52 +03:00
Ivan Kylchik
520f2455b3
Create and implement ExecutionResult interface to use as return status
...
This is replacement for Code enum class that was returned from
methods of interpreter earlier
2020-06-24 16:12:51 +03:00
Ivan Kylchik
77978637a8
Move all classes from State.kt into separate files
2020-06-24 16:12:51 +03:00
Ivan Kylchik
530252eea8
Move State.kt in separate package
2020-06-24 16:12:51 +03:00
Ivan Kylchik
7e7a5fe736
Add reference to sub class in Complex class
...
This is replacement for instance field
2020-06-24 16:12:51 +03:00
Ivan Kylchik
ad7055b8a0
Move additional stack filling in ExceptionState class
2020-06-24 16:12:51 +03:00
Ivan Kylchik
900e78b39b
Add hashCode, equals and toString methods from String in builtin map
2020-06-24 16:12:51 +03:00
Ivan Kylchik
82acf7deb6
Change getting function receiver for method with multiple overridden
2020-06-24 16:12:50 +03:00
Ivan Kylchik
0400a62014
Improve receivers search in data pool
2020-06-24 16:12:50 +03:00
Ivan Kylchik
b6cf17af1b
Save context of inline and local functions
2020-06-24 16:12:50 +03:00
Ivan Kylchik
28d6752315
Change usages of IrFunctionImpl to more common IrSimpleFunction
2020-06-24 16:12:50 +03:00
Ivan Kylchik
c45993b2b1
Implement interpretation for return statements with labels
2020-06-24 16:12:50 +03:00
Ivan Kylchik
5c845da18a
Implement interpretation for unsigned numbers
2020-06-24 16:12:50 +03:00
Ivan Kylchik
b175f46315
Implement interpretation of Char and Long classes from js stdlib
2020-06-24 16:12:50 +03:00
Ivan Kylchik
2310a04e4e
Add toString, hashCode and equals primitives methods in ir builtin map
2020-06-24 16:12:49 +03:00
Ivan Kylchik
00366197f8
Implement interpretation of Enum class hashCode method
2020-06-24 16:12:49 +03:00
Ivan Kylchik
6a9f4cf8b7
Change interpretCall to be able to interpret data class copy method
2020-06-24 16:12:49 +03:00
Ivan Kylchik
bab4407c0a
Implement interpretation for destructing declaration
2020-06-24 16:12:49 +03:00
Ivan Kylchik
ff6e06aa14
Implement regular expression interpretation
2020-06-24 16:12:49 +03:00
Ivan Kylchik
4d80d17b23
Implement interpretation for expect enum class
2020-06-24 16:12:49 +03:00
Ivan Kylchik
731fb9bc70
Make ir interpreter to work with minimal dependence on ir lowerings
2020-06-24 16:12:48 +03:00
Ivan Kylchik
4c1727b82e
Move intrinsic handling inside IrInterpreter class
2020-06-24 16:12:48 +03:00
Ivan Kylchik
27e2faa778
Implement enum interpretation
2020-06-24 16:12:48 +03:00
Ivan Kylchik
d6a45dfe75
Implement instance of check in compile time
2020-06-24 16:12:48 +03:00
Ivan Kylchik
0a70277240
Make stack trace from exceptions more precise
...
Additional information is retrieved from original stack trace when
exception happened during wrapper invocation.
2020-06-24 16:12:48 +03:00
Ivan Kylchik
18d29f7d98
Make possible to create arrays with their constructors
2020-06-24 16:12:47 +03:00
Ivan Kylchik
aca889a95b
Add inc, dec methods in ir builtins map and remove toString and equals
2020-06-24 16:12:47 +03:00
Ivan Kylchik
169a2f361c
Add support for cause field in exceptions
2020-06-24 16:12:47 +03:00
Ivan Kylchik
6af47ad7b3
Implement basic stack trace reporting if unhandled exception appear
2020-06-24 16:12:47 +03:00
Ivan Kylchik
66dbd1af34
Mark all IrInterpreter methods as suspend
...
This change is used to get rid of unhandled StackOverflowError and
to be able to manually throw it.
2020-06-24 16:12:47 +03:00
Ivan Kylchik
2985e8bcd3
Clean up code of ir builtins map generator
2020-06-24 16:12:47 +03:00
Ivan Kylchik
cbc9c19faf
Add methods for message and clause from Throwable in ir builtins map
2020-06-24 16:12:46 +03:00
Ivan Kylchik
d9279bff73
Introduce ExceptionState class responsible for all kind of exceptions
2020-06-24 16:12:46 +03:00
Ivan Kylchik
be3eb98fbd
Introduce new Common state that represent common object
...
This is a replacement for Complex, that are now an abstract class.
2020-06-24 16:12:46 +03:00
Ivan Kylchik
4345294ac1
Add all methods from Any class in ir builtins map
2020-06-24 16:12:46 +03:00
Ivan Kylchik
d03937cdb6
Pop return value after implicit coercion to unit
2020-06-24 16:12:46 +03:00
Ivan Kylchik
792ae8d272
Get rid of dynamic cast interpretation
2020-06-24 16:12:46 +03:00
Ivan Kylchik
3ccf542b38
Rework object and companion object interpretation
...
For now object value or fun can be interpreter only if they are
marked explicitly. Annotation for all object is restricted and if
whole class is marked with CompileTimeAnnotation this doesn't
mean that companion object is computable.
2020-06-24 16:12:46 +03:00
Ivan Kylchik
0ef34dcf53
Implement class cast interpretation
2020-06-24 16:12:45 +03:00
Ivan Kylchik
a25896bf6a
Implement string concatenation interpretation
2020-06-24 16:12:45 +03:00
Ivan Kylchik
0839e7afdc
Describe default behaviour for Any class methods
...
We are talking about such methods as equals, hashCode and toString.
2020-06-24 16:12:45 +03:00
Ivan Kylchik
a6cc7cdc23
Rewrite exception handler to catch null pointer exception in js ir
...
For now null check works as !! operator called in jvm.
So it throw KotlinNullPointerException, but js ir require
NullPointerException
2020-06-24 16:12:45 +03:00
Ivan Kylchik
5209f4a9c0
Add not null (!!) operator in ir builtins map
2020-06-24 16:12:45 +03:00
Ivan Kylchik
bb119280be
Interpret basic interpretation for try catch block
2020-06-24 16:12:45 +03:00
Ivan Kylchik
b5778e6de5
Implement interpretation for lambdas and anonymous functions
2020-06-24 16:12:45 +03:00
Ivan Kylchik
4fdfdb9b4c
Implement StringBuilder interpretation
2020-06-24 16:12:44 +03:00
Ivan Kylchik
06ee4ac21f
Implement List and MutableList interpretation
2020-06-24 16:12:44 +03:00
Ivan Kylchik
9555497d5d
Implement arrayOf symbols interpretation
2020-06-24 16:12:44 +03:00
Ivan Kylchik
4dc1e587b4
Implement vararg interpretation
2020-06-24 16:12:44 +03:00
Ivan Kylchik
45555d681d
Add methods from arrays classes in ir builtins map
2020-06-24 16:12:44 +03:00
Ivan Kylchik
3ab7c263d0
Implement continue statement interpretation
2020-06-24 16:12:44 +03:00
Ivan Kylchik
c4cc858b84
Extract ir function interpretation in separate method
...
This modification will be used to get exception stack trace
2020-06-24 16:12:44 +03:00
Ivan Kylchik
f99829ce5e
Implement trim function interpretation in compile time
2020-06-24 16:12:43 +03:00
Ivan Kylchik
178b2a07ae
Move all interpreter methods inside IrInterpreter class
2020-06-24 16:12:43 +03:00
Ivan Kylchik
f8cb637712
Change IrInterpreter to modify tree structure into the flat one
...
This modification is necessary to implement right control flow
2020-06-24 16:12:43 +03:00
Ivan Kylchik
0a76da99cf
Implement equalTo function for descriptors
2020-06-24 16:12:43 +03:00
Ivan Kylchik
dd93deddd7
Add while loop support in interpreter
2020-06-24 16:12:43 +03:00
Ivan Kylchik
c2a70b4e57
Add rangeTo entry in builtins map
2020-06-24 16:12:43 +03:00
Ivan Kylchik
34a59f5b85
Add abstract classes and interfaces support in interpreter
2020-06-24 16:12:42 +03:00
Ivan Kylchik
b1dc403182
Add branches support in interpreter
2020-06-24 16:12:42 +03:00
Ivan Kylchik
dcd8a4a4c7
Add variables support in interpreter
2020-06-24 16:12:42 +03:00
Ivan Kylchik
aca7a49214
Add some sort of correct calculation with const modifier
2020-06-24 16:12:42 +03:00
Ivan Kylchik
a20269bcdd
Extract some methods to utils
2020-06-24 16:12:42 +03:00
Ivan Kylchik
11e808715b
Rethink main goal of stack frame
2020-06-24 16:12:42 +03:00
Ivan Kylchik
c3600ba114
Implement interpreter that can evaluate simple fun
...
For now working cases are: create simple object using primary
constructor, invoke its method, invoke superclass method,
load/save fields. Return values from compile time function can be
only primitives for now.
2020-06-24 16:12:42 +03:00
Ivan Kylchik
a582d88cf4
Create simple stack model for interpreter
2020-06-24 16:12:41 +03:00
Ivan Kylchik
f6373a647e
Create simple interpreter that evaluate constant values
2020-06-24 16:12:41 +03:00
Ivan Kylchik
a27a07ce81
Create generator for map with builtin operations
2020-06-24 16:12:41 +03:00
Dmitry Petrov
e9570d6efd
Minor: update testData
2020-06-24 16:04:38 +03:00
Toshiaki Kameyama
6b2c87020b
Replace explicit parameter with 'it': do not suggest when lambda is directly under "when" or "if"
...
Relates to #KT-35320
2020-06-24 14:55:30 +02:00
Georgy Bronnikov
daab07ea38
JVM_IR: use MetadataSource for local delegated properties
2020-06-24 14:41:01 +03:00
Alexey Trilis
593684ecb6
Fix testdata after changing API of kotlin.browser and kotlin.dom
2020-06-24 13:38:29 +03:00
Toshiaki Kameyama
e6edab1c82
Quick doc: do not show nullability annotations
...
#KT-37132 Fixed
2020-06-24 10:45:57 +02:00
Toshiaki Kameyama
e8aa14a283
Method sepatators: show separator between companion object and function
...
#KT-24352 Fixed
2020-06-24 10:05:27 +02:00
Ilya Chernikov
5942446274
[minor] clean up main-kts-dependencies
2020-06-23 21:56:04 +02:00
Ilya Chernikov
4c34e9dd03
Move main-kts cache test to out-of-process compilation
...
to avoid clashes with coroutine debugger when running
tests from IntelliJ
2020-06-23 21:56:04 +02:00
Ilya Chernikov
879e22f274
Fix coroutines core shading in main-kts
2020-06-23 21:56:04 +02:00
Gia Thuan Lam
83b52bb109
Enable Input Redirection for KotlinRunConfiguration
...
#KT-28854 Fixed
(cherry picked from commit 6e55010767b1c1a7c8d23d337bdbd5824dfa2906)
2020-06-23 21:04:09 +02:00
Ilya Goncharov
69e8abfe3c
Fix test data for new project wizard in Project Templates
2020-06-23 21:07:35 +03:00
Dmitry Petrov
4e92c79bc4
JVM_IR: don't generate nullability annotations on synthetic declarations
...
Fixes KT-36993 and some other related issues.
2020-06-23 20:51:48 +03:00
Dmitry Petrov
d477d9eb43
JVM_IR KT-37005: no delegates for @InlineOnly funs in multifile facades
2020-06-23 20:22:41 +03:00
Dmitry Petrov
5bfec7f6bc
JVM: don't generate nullability annotations on property delegate fields
...
Such fields are private, so these annotations are redundant.
They were incorrect, anyway (property type was used instead of delegate
type).
2020-06-23 20:18:42 +03:00
Mikhail Bogdanov
af3bda51ec
Fix compilation on mixed hierarchies in compatibility mode
2020-06-23 18:59:04 +02:00
Mikhail Bogdanov
41511898a1
Deprecate DefaultImpl methods in compatibility mode
2020-06-23 18:59:04 +02:00
Mikhail Glukhikh
39740ce440
[FIR2IR] Drop decl. parent set in lazy class (it should be set before)
2020-06-23 19:06:08 +03:00
Mikhail Glukhikh
d08f91bf35
[FIR2IR] Introduce & use lazy function for external class functions
2020-06-23 19:06:08 +03:00
Mikhail Glukhikh
6d07af63cf
[FIR2IR] Count IrErrorTypes as not equal for purpose of overriding
...
This prevents possible type checking exceptions
2020-06-23 19:06:08 +03:00
Mikhail Glukhikh
d02d423d45
[FIR2IR] Introduce additional built-in symbols prepared in advance
...
This commit allow to avoid possible conflicts between descriptor-based
and signature-based symbols,
because BE sometimes (e.g. in DeclarationStubGenerator)
creates descriptor-based symbol without checking signature-based
2020-06-23 19:06:07 +03:00
Mikhail Glukhikh
a791a38538
FIR mangler: support definitely not-null types (for Java)
2020-06-23 19:06:07 +03:00
Mikhail Glukhikh
987cf5ef5f
Drop unused Fir2IrVisitor.fakeOverrideMode
2020-06-23 19:06:07 +03:00
Mikhail Glukhikh
0622be14a5
[FIR2IR] Introduce creation of Fir2Ir lazy classes
2020-06-23 19:06:07 +03:00
Ilya Goncharov
5e9291bd8a
Fix test data for new project wizard
2020-06-23 18:56:16 +03:00
Ilya Goncharov
e6539eade5
Fix new project wizard css support for karma
2020-06-23 18:26:51 +03:00
Dmitry Gridin
b657d60bd6
Suggest Create Class before Create File
...
#KT-37528 Fixed
2020-06-23 13:29:09 +00:00
Natalia Selezneva
bcd3921bae
Fix freeze during loading script configurations through legacy scripting API
...
Do not wrap the whole configuration loading process into readAction
^KT-39771 Fixed
2020-06-23 16:04:24 +03:00
Alexander Udalov
05e8546bdb
Skip unresolved JvmStatic/JvmField annotations in builtins
...
This is needed to implement KT-30084 and KT-30083 after bootstrap.
2020-06-23 13:55:08 +02:00
Dmitry Gridin
abfc74c8b2
Add regression test
...
#KT-30131 Fixed
2020-06-23 18:05:17 +07:00
Dmitriy Dolovov
d8fa617bfd
Minor. Fix typo in text printed to users
2020-06-23 17:27:14 +07:00
Dmitry Gridin
99f958c8c4
Inline refactoring: should remove redundant Unit
...
#KT-19443 Fixed
2020-06-23 10:25:54 +00:00
Dmitry Gridin
af24ce5e03
RedundantUnitExpressionInspection: support lambdas
...
#KT-39772 Fixed
2020-06-23 10:25:53 +00:00
Dmitry Gridin
4ac7dc0744
RedundantUnitExpressionInspection: make isRedundantUnit public
2020-06-23 10:25:53 +00:00
Dmitry Gridin
360a5bf348
Inline refactoring: improve resolve
...
#KT-39705 Fixed
#KT-19459 Fixed
2020-06-23 10:25:52 +00:00
Dmitry Gridin
5ad94daaa5
ImportOptimizer: cleanup code
...
#KT-31331
2020-06-23 09:48:07 +00:00
Dmitry Gridin
2610dedcbd
KotlinUnusedImportInspection: support unresolved references
...
#KT-31331 Fixed
2020-06-23 09:48:07 +00:00
Dmitry Gridin
10c62b8d77
ImportOptimizer: add cases for unresolved references
...
Part of #KT-31331
2020-06-23 09:48:06 +00:00
Dmitry Gridin
4de582564c
ImportOptimizer: basic support for removing unresolved imports
...
#KT-32409 Fixed
Part of #KT-31331
2020-06-23 09:48:05 +00:00
Dmitry Gridin
8faced9192
KotlinImportOptimizer: replace LinkedHashMap with HashMap and BodyResolveMode.FULL with BodyResolveMode.PARTIAL
2020-06-23 09:48:05 +00:00
Dmitry Gridin
383fa2d111
ImportOptimizer: cleanup code
2020-06-23 09:48:04 +00:00
Mikhail Zarechenskiy
e7cee9c6e1
Fix coercion to Unit with equal Nothing constraint
...
#KT-39669 Fixed
2020-06-23 11:47:39 +03:00
Mikhail Zarechenskiy
a06c8786df
Fix overload ambiguity after smartcast to nullable Nothing
...
#KT-39544 Fixed
2020-06-23 11:34:19 +03:00
Dmitry Gridin
9313073971
LineIndentProvider: temporarily disable before elvis operator
...
#KT-39716 Fixed
2020-06-23 15:17:47 +07:00
Ilya Goncharov
793ada08a9
cssSettings -> cssSupport
2020-06-23 11:08:30 +03:00
Ilya Goncharov
538cf8af56
Fix test with css case
2020-06-23 11:08:30 +03:00
Ilya Goncharov
4ad95dbe0c
Fix browser settings for webpack tasks
2020-06-23 11:08:30 +03:00
Jinseong Jeon
856ac76c8f
FIR2IR: handle type alias inside GetClassCall
2020-06-23 09:46:47 +03:00
Ilya Gorbunov
29d3d07636
Remove stdlib-js-ir and kotlin-test-js-ir from coreLibs projects
...
They do not produce their own deployable artifacts,
their output is merged into stdlib-js and kotlin-test-js.
Remove coreLibsDist task, because now projects can't be dist'ed
selectively.
2020-06-23 01:52:38 +03:00
Ilya Gorbunov
b2e70f9c21
Fix stdlib-js-ir-for-tests build
...
Exclude kotlinx.browser and kotlinx.dom packages
2020-06-23 01:52:36 +03:00
Georgy Bronnikov
4ecb228d50
IR: handle enhanced nullability in TypeTranslator
2020-06-22 22:06:01 +03:00
Igor Yakovlev
b21cabe671
Separate decompiled declarations light representations from LightClasses
...
Fixed #KT-39457
2020-06-22 21:17:12 +03:00
Vladimir Ilmov
40ec794c66
(UltraLightClasses) fast-path for Deprecated.HIDDEN annotation
2020-06-22 15:58:25 +02:00
Ilya Goncharov
852e860743
Update test data
...
#KT-39770 fixed
2020-06-22 16:45:00 +03:00
Ilya Goncharov
c2e97a7287
Kind and css support to single platform JS
...
#KT-39770 fixed
2020-06-22 16:45:00 +03:00
Ilya Goncharov
5676d31a1c
Add CSS support to new project wizard
...
#KT-39770 fixed
2020-06-22 16:45:00 +03:00
Ilya Goncharov
b8aff0660c
Refactor aligning for css support
...
#KT-39770 fixed
2020-06-22 16:44:59 +03:00
Ilya Goncharov
c9c20bb34c
Add enabling css into wizard
...
#KT-39770 fixed
2020-06-22 16:44:59 +03:00
Dmitry Petrov
e9231b5624
JVM: Generate object and companion object INSTANCE fields as @NotNull
2020-06-22 16:28:00 +03:00
Andrei Klunnyi
558dfc6d9a
KT-36801 IDE: Unsupported language version values
2020-06-22 13:01:42 +00:00
Alexander Gorshenev
2b2fce5949
Fix for KT-37761. Don't use mmap. It causes more troubles than it produce benefits
2020-06-22 14:53:25 +03:00
Dmitriy Novozhilov
be2ac3bb4f
[FIR] Fix completing bodies of property setters with delegates
2020-06-22 12:29:26 +03:00
Dmitriy Novozhilov
8ce28cb509
[FIR] Add transformBody to FirFunction
2020-06-22 12:29:26 +03:00
Ilya Gorbunov
23dc75fb87
Remove kotlin.coroutines.experimental package descriptions
2020-06-22 12:29:26 +03:00
Ilya Gorbunov
9d111b9451
Update API dumps
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
6c8ff25e5d
Drop deprecated jsClass top level and extension functions
...
Introduce internal toplevel jsClass in js-ir source set instead.
It is needed for JS-IR backend.
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
696701d377
Drop deprecated MutableMap property delegation operator
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
7632910ffd
Drop deprecated CollectionAssertions.kt
...
Remove incorrect import from callByWithEmptyVarArg test
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
5550dc93a1
Remove hidden Random.Companion
...
It was never released as stable since 1.3. Was provided for binary
compatibility with 1.3 prereleases.
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
b55729957e
Drop previously deprecated API
...
- common and JS org.junit.Test from kotlin.test
- kotlin.Synchronized/Volatile from K/JS
- JS 'native' annotation
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
e9c4f531eb
Increase deprecation level for previously deprecated API
...
- unsupported common exceptions
- common 'synchronized'
- jquery API
- experimental kotlin.time API
- js Math object
- DefaultAsserter constructor-like fun
2020-06-22 12:29:24 +03:00
Jinseong Jeon
67044f22ed
FIR serializer: regard property accessors with modifiers as non-default
2020-06-22 12:25:47 +03:00
Svyatoslav Kuzmich
bbfc1a10ad
[JS] Fix stack trace capturing from secondary constructors KT-37563
2020-06-22 12:03:59 +03:00
Svyatoslav Kuzmich
6792779281
[JS IR] Fix stack trace capturing in secondary constructors (KT-37563)
...
Call captureStack in primary constructors and generated factories
2020-06-22 11:50:14 +03:00
Svyatoslav Kuzmich
dfdc1e9c4f
[IR] Add IrRawFunctionReference
2020-06-22 11:50:14 +03:00
Roman Artemev
2c3d8feb26
[KLIB IC] Fix dirty declaration detector
...
- make kjs-stdlib be compiled correctly in IC mode
2020-06-22 11:30:40 +03:00
Roman Artemev
cc818025df
[KLIB IC] Add test about incremental kotlin-js-stdlib-klib recompliation
2020-06-22 11:30:40 +03:00
Dmitry Petrov
a493b21c7c
JVM_IR: Deprecation cycle for companion object instance visibility
2020-06-19 20:41:54 +03:00
Vladimir Ilmov
230f2f5ce0
(CoroutineDebugger) fix for debugger agent for 1.3.6 version and up
2020-06-19 18:58:46 +02:00
Yaroslav Chernyshev
c638043aee
[Gradle, CocoaPods] Improved CocoaPods Integration features with tests
2020-06-19 18:36:46 +03:00
Ilya Gorbunov
130987fa1e
Provide flatMapIndexed operation
...
- similar to flatMap, but transform function takes index and element
#KT-36894
2020-06-19 17:55:15 +03:00
Abduqodiri Qurbonzoda
db93462bcf
Initial template for flatMapIndexed operation
...
#KT-36894
2020-06-19 17:54:47 +03:00
Sergey Igushkin
d9fea52344
Fix compilation of DukatCompilationResolverPlugin after rebase
2020-06-19 17:48:22 +03:00
Sergey Igushkin
f7b660b573
(minor) Fixes for review KT-MR-1290
2020-06-19 17:31:51 +03:00
Sergey Igushkin
10cae9bc5d
Fixes for task configuration avoidance in Gradle Kotlin/JS support
2020-06-19 17:31:45 +03:00
Sergey Igushkin
0b7d8c51cb
Move kotlinOptions out of the tasks
2020-06-19 17:30:12 +03:00
Sergey Igushkin
19ac036ec5
Rework ScriptingGradleSubplugin for the new subplugins API
2020-06-19 17:30:11 +03:00
Sergey Igushkin
cb5aa64a95
Rework AndroidSubplugin for the new subplugins API
2020-06-19 17:30:10 +03:00
Sergey Igushkin
48153c53ca
Rework SamWithReceiverSubplugin for the new subplugins API
2020-06-19 17:30:10 +03:00
Sergey Igushkin
120f77416b
(minor) Suppress a warning about property initialized with ctor param
2020-06-19 17:30:09 +03:00
Sergey Igushkin
66a59df7de
Rework ExampleSubplugin for the new subplugins API
2020-06-19 17:30:09 +03:00
Sergey Igushkin
a2e4b52747
Rework SerializationSubplugin for the new subplugins API
2020-06-19 17:30:08 +03:00
Sergey Igushkin
98fc4ab2e1
Rework NoArgSubplugin for the new subplugins API
2020-06-19 17:30:07 +03:00
Sergey Igushkin
f2bc391bdd
Rework AllOpenSubplugin for the new subplugins API
2020-06-19 17:30:07 +03:00
Sergey Igushkin
e8a303650c
Rework Gradle subplugins application in Kotlin/Native
2020-06-19 17:30:06 +03:00
Sergey Igushkin
06a3376368
Refactor the Kotlin Android plugin to make it compliant with TCA
...
Also simplify some of the APIs and move some others which are only used
by kapt to the kapt's codebase.
2020-06-19 17:30:06 +03:00
Sergey Igushkin
4dbc6803ba
Refactor the kapt Gradle plugin to use the new plugins API and TCA
2020-06-19 17:30:05 +03:00
Sergey Igushkin
96ed30a449
Introduce new API for Kotlin compiler support Gradle plugins
...
The old API was too specific for the Kotlin internal use cases and
leaked some abstractions due to the missing target-compilation project
model. One of such leaking abstractions was the Gradle tasks being
exposed to the subplugin, which required the tasks to instantiate
in order for the subplugin to apply. This violated task configuration
avoidance, so the old API could never work in compliance with TCA.
Introduce the new KotlinCompilerPluginSupportPlugin API that uses the
compilations instead of the tasks and is TCA-compliant.
2020-06-19 17:30:05 +03:00
Sergey Igushkin
0b2d96c1ef
Refactor Kotlin classes registration for java-library plugin
2020-06-19 17:30:04 +03:00
Sergey Igushkin
58dd0fa3d2
Use TCA-compliant Gradle APIs in the JS part of the Kotlin Gradle plugin
2020-06-19 17:29:59 +03:00
Sergey Igushkin
58e9b3ae0e
Use TCA-compliant Gradle APIs in the Kotlin Gradle plugin
2020-06-19 17:28:40 +03:00
Sergey Igushkin
84287d77ca
Add Java tasks to relevant compilation APIs
2020-06-19 17:28:39 +03:00
Sergey Igushkin
1749cb9129
(minor) Initialize compilations with the precise target type
2020-06-19 17:28:39 +03:00
Sergey Igushkin
f4e4baa253
Add TaskProvider property for Kotlin compile tasks in compilations
2020-06-19 17:28:37 +03:00
Pavel Kirpichenkov
1ebb116056
Revert "Invalidate library caches on OOCBM with enabled resolution anchors"
...
This reverts commit 91b371789e .
^KT-39734 Open
2020-06-19 17:18:45 +03:00
Denis Zharkov
f1955c84aa
FIR: Remove ignoreFrontendIR from GenerateInRangeExpressionTestData
...
It's unnecessary anymore since all tests are fixed
2020-06-19 17:15:56 +03:00
Sergey Rostov
6e9efefd2a
gradle scripts: fix isFirstLoadActual and notification typos
2020-06-19 17:04:01 +03:00
Sergey Rostov
9f4569e5a1
gradle scripts: custom notification wording gradle with default scripting support (gradle older then 6.0)
2020-06-19 16:37:59 +03:00
Sergey Rostov
37fbc75008
gradle scripts: "link project" action implementation
2020-06-19 16:37:21 +03:00
Sergey Rostov
d6fc830c24
gradle scripts: temporary disable irrelevant actions when script configuration was not received during import
2020-06-19 16:37:21 +03:00
Dmitriy Novozhilov
a7675c16d5
[FIR] Fix problems with renaming invocationKind and field in FirAnonymousFunction
2020-06-19 16:28:07 +03:00
Mikhail Zarechenskiy
9c8e979308
Fix compatibility resolve for references with multiple outer candidates
...
#KT-39533 Fixed
2020-06-19 16:21:24 +03:00
Mikhail Bogdanov
58183b774d
Fix test data
2020-06-19 15:07:36 +02:00
Alexey Trilis
99d844dcfb
Deprecate kotlin.browser and kotlin.dom packages and provide
...
replacements in packages kotlinx.dom and kotlinx.browser
KT-39330 Fixed
2020-06-19 16:01:40 +03:00
Ilya Chernikov
16100843b2
Add classpaths from all plugin classloaders to the console scripts
2020-06-19 14:56:00 +02:00
Ilya Chernikov
b5ecab31f5
Load script configuration under read action - avoid possible exception
2020-06-19 14:56:00 +02:00
Dmitriy Novozhilov
bd8eaad885
[FIR-TEST] Update cfg dumps in some tests
...
One of previous commit changed order for those graphs, but i didn't
find which one
2020-06-19 15:53:11 +03:00
Dmitriy Novozhilov
d01817ce14
Rename InvocationKind to EventOccurrencesRange
2020-06-19 15:53:11 +03:00
Dmitriy Novozhilov
1dfccf1416
[FIR] Rename edge kinds of control flow graph
2020-06-19 15:53:10 +03:00
Dmitriy Novozhilov
f0cc3a32d9
[FIR-TEST] Update testdata due to KT-39711
2020-06-19 15:53:10 +03:00
Dmitriy Novozhilov
64c9a83862
[FIR-TEST] Update testdata due to KT-39709
2020-06-19 15:53:10 +03:00
Dmitriy Novozhilov
a317c8a803
[FIR-TEST] Update testdata due to unresolved KT-36056
2020-06-19 15:53:09 +03:00
Dmitriy Novozhilov
26458875d5
[FIR] Add checker for uninitialized properties
2020-06-19 15:53:09 +03:00
Dmitriy Novozhilov
25621d699b
Add methods for combine InvocationKind's
...
There is two methods added -- `or` and `and`
`or` is used by CFA for combining two kinds that came from different
edges of control flow graph
`and` is analog of `+` operator for invocation kinds
2020-06-19 15:53:08 +03:00
Dmitriy Novozhilov
4078b4b6f9
[FIR] Prepare ControlFlowAnalysisDiagnosticComponent
2020-06-19 15:53:07 +03:00
Dmitriy Novozhilov
c9bc5884dd
[FIR] Add more utils for traversing control flow graph
2020-06-19 15:53:07 +03:00
Dmitriy Novozhilov
faa0f07d09
[FIR] Add utility flags to EdgeKind
2020-06-19 15:53:07 +03:00
Dmitriy Novozhilov
5ecbf8b7cd
[FIR] Add CFGNodeWithCfgOwner to detect subgraphs in CFA
2020-06-19 15:53:06 +03:00
Dmitriy Novozhilov
05ee436db0
[FIR] Introduce FirControlFlowGraphOwner node
2020-06-19 15:53:06 +03:00
Dmitriy Novozhilov
8a81a09fd0
[FIR] Assume that when without branches is not exhaustive. KT-39621
2020-06-19 15:53:05 +03:00
Dmitriy Novozhilov
4e2e05e689
[FIR-TEST] Check control flow graph in old frontend diagnostic tests
2020-06-19 15:53:05 +03:00
Dmitriy Novozhilov
12ed8c3bb4
[FIR-TEST] Update CFG dumps according to new nodes order
2020-06-19 15:53:04 +03:00
Dmitriy Novozhilov
4e6542a646
[FIR] Add Stub kind for CFG
...
Edges of stub graphs shouldn't be completed
2020-06-19 15:53:04 +03:00
Dmitriy Novozhilov
1a0df97961
[FIR] Pop and complete graph only after adding last edge to it
2020-06-19 15:53:03 +03:00
Dmitriy Novozhilov
3765c5119f
[FIR] Cache nodes in sorted order in CFG
2020-06-19 15:53:02 +03:00
Dmitriy Novozhilov
b5cceb8995
[FIR-TEST] Add validation of control flow graph nodes order
2020-06-19 15:53:02 +03:00
Dmitriy Novozhilov
2f8e95dace
[FIR-TEST] Add validation for completed graph in diagnostic tests
2020-06-19 15:53:01 +03:00
Dmitriy Novozhilov
9f55d4f3cd
[FIR-TEST] Mute test failing due to KT-39614
2020-06-19 15:53:01 +03:00
Dmitriy Novozhilov
87859b0faa
[FIR] Introduce new algorithm for building CFG for declarations
2020-06-19 15:53:00 +03:00
Dmitriy Novozhilov
950bbfe3a5
[FIR] Add kind for back edges in CFG
2020-06-19 15:53:00 +03:00
Dmitriy Novozhilov
34be9e3569
[FIR] Add controlFlowGraph references to value parameters
2020-06-19 15:52:59 +03:00
Dmitriy Novozhilov
65fae3bb0c
[FIR] Fix problem with local classes in anonymous objects
2020-06-19 15:52:58 +03:00
Dmitriy Novozhilov
5b64c0cfe2
[FIR] Add different states for CFG and some assertions for graph modification
2020-06-19 15:52:57 +03:00
Dmitriy Novozhilov
1261f62afb
[FIR] Extract CFGNode and it's inheritors to separate file
2020-06-19 15:52:56 +03:00
Dmitriy Novozhilov
3a4f53682f
[FIR] Don't convert non-local functions without name as FirAnonymousFunction
2020-06-19 15:52:56 +03:00
Natalia Selezneva
44f6a5adcd
Filter only valid roots in KotlinScriptDependenciesClassFinder
...
ClassFinder should return only valid roots,
but in allScriptsDependenciesClassFiles may contain old roots
because they are persistently saved in the storage.
This may cause exception after IDE restart
2020-06-19 15:43:07 +03:00
Natalia Selezneva
d119298232
Add registry key to hide new Load Script Configurations action
2020-06-19 15:43:07 +03:00
Natalia Selezneva
b43014a097
Do not start gradle import if it is already in progress
2020-06-19 15:43:07 +03:00
Natalia Selezneva
66e23c9767
Floating notification shouldn't be shown during import
...
It depends on up to date check that is correct only after all caches are updated after import
2020-06-19 15:43:06 +03:00
Dmitriy Dolovov
59183a8142
[Commonizer] Replace j.u.HashMap by g.t.THashMap to reduce memory usage
2020-06-19 19:36:06 +07:00
Dmitriy Dolovov
70ea53315d
[Commonizer] Intern duplicated CirContainingClassDetails instances
2020-06-19 19:18:13 +07:00
Dmitriy Dolovov
63d549dfa1
[Commonizer] Intern duplicated CirFunctionModifiers instances
2020-06-19 19:18:07 +07:00
Dmitriy Dolovov
68e1acd2cb
[Commonizer] More detailed progress logging
2020-06-19 19:18:01 +07:00
Dmitriy Dolovov
6410aed1b4
Minor. Replace computeIfAbsent() by getOrPut()
2020-06-19 19:17:55 +07:00
Dmitriy Dolovov
6393667dda
[Commonizer] Rework preparation of CIR cache in TypeCommonizerTest
2020-06-19 19:17:49 +07:00
Dmitriy Dolovov
5cad8a793c
[Commonizer] Rework CommonizedGroup API to make it more usable
2020-06-19 19:17:43 +07:00
Dmitriy Dolovov
63575582c4
[Commonizer] Reduce memory consumption during approximation phase
...
^KT-39320
2020-06-19 19:17:33 +07:00
Ilya Chernikov
d5ffc7416d
Clean-up and improve sam-with-receiver test with scripts
2020-06-19 14:08:19 +02:00
Ilya Chernikov
0ade8140f7
Add serialization plugin test with main-kts
2020-06-19 14:08:19 +02:00
Ilya Chernikov
dbb47cf48e
Implement non-transitive dependencies resolving in main-kts
2020-06-19 14:08:19 +02:00
Ilya Chernikov
cd1bf563cd
Add error reporting on the options parsing errors in scripting
...
also report standard parsing warnings
also fix language version test, since it is not possible anymore
to use version 1.0
2020-06-19 13:20:58 +02:00
Mathias Quintero
f0bc52222d
Fix annotation construction with array literals
...
Turns out the issue happens to be that ArrayValue uses a list of values which needs to be translated to an array of the percise type before it is used by callBy
This also addresses handling of arguments after a vararg in an annotation
2020-06-19 13:20:57 +02:00
Efeturi Money
8cb4f59114
Explicitly handle array annotation args in scripting pre-processing
...
#KT-35411 fixed
2020-06-19 13:20:57 +02:00
Ilya Muradyan
743abea690
Don't create default importing scopes for REPL snippets
...
Default scopes should be created only once, for the first snippet.
All following snippets should not create new default importing scopes.
#KT-35651 fixed
2020-06-19 13:03:25 +02:00
Ilya Muradyan
c3cbfe34c4
Allow not to create default importing scopes
2020-06-19 13:03:24 +02:00
Ilya Muradyan
53b31a20ca
Refactor REPL IDE services testing configuration and add new tests
2020-06-19 13:03:24 +02:00
Ilya Muradyan
94de114894
Support selective filtering of implicits for extensions resolution in REPL
2020-06-19 13:03:23 +02:00
Ilya Muradyan
017f640f26
Allow skipping extensions resolution for implicit receivers
2020-06-19 13:03:23 +02:00
Mikhail Bogdanov
e93bcc55ae
Revert "Deprecate DefaultImpl methods in compatibility mode"
...
This reverts commit 6c9c2a28
2020-06-19 12:58:46 +02:00
Mikhail Bogdanov
8bc4407be0
Fix compilation
2020-06-19 12:54:19 +02:00
Mikhail Bogdanov
6c9c2a287d
Deprecate DefaultImpl methods in compatibility mode
2020-06-19 12:23:05 +02:00
Mikhail Bogdanov
9c0b96af71
Report error on missed specialization in compatibility mode
...
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
a150e7b6e5
Don't forget about extension parameter in methodSignatureMapping.kt
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
929bb0e8d1
Move common logic from CodegenTestCase to KotlinBaseTest
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
9d48ecfac3
Make proper check for defaults on delegation to DefaultImpls
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
b8f0ad2111
Generate nullability annotations on this receiver in DefaultImpls. Don't generate nullability annotations in private methods
...
#KT-36969 Fixed
2020-06-19 11:57:35 +02:00
Mikhail Bogdanov
5bdf3d5757
Don't generate compatibility stubs for @JvmDefaultWithoutCompatibility
2020-06-19 11:57:35 +02:00
Mikhail Bogdanov
477cca3c99
Add JvmDefaultWithoutCompatibility annotation
2020-06-19 11:57:35 +02:00
Dmitriy Novozhilov
a98ad79d86
[FIR-TEST] Add option to run modularized tests with checkers
2020-06-19 12:40:02 +03:00
Dmitriy Novozhilov
7a8908a75b
[FIR-TEST] Change main module of [JPS] Fast FIR tests task
...
It's needed to correctly run FIR spec tests
2020-06-19 12:40:01 +03:00
Roman Artemev
a0cccdf75c
[JS IR] Make backend work with new shared boxes
2020-06-19 12:23:15 +03:00
Roman Artemev
596c3d1af8
[JS IR] Implement shared box intrinsics translator
2020-06-19 12:23:15 +03:00
Roman Artemev
4c878c27a9
[JS IR] Introduce intrinsics to create shared boxes
2020-06-19 12:23:15 +03:00
Dmitry Savvinov
5b48845dfa
Check for native-shared source-sets properly during facet import
...
Otherwise they are detected as common source-sets, thus getting
K2MetadataCompilerArguments (instead of FakeK2NativeCompilerArguments),
and the 'applyCompilerArgumentsToFacets' will fail due to check on
javaClass equality
^KT-39657 Fixed
2020-06-19 12:15:50 +03:00
Ilya Goncharov
ce553f1211
[Gradle, JS] Add webpackConfig for karma
...
#KT-39654 fixed
2020-06-19 11:38:51 +03:00
Ilya Goncharov
48a4e08d60
[Gradle, JS] Disable css support by default
...
#KT-39654 fixed
2020-06-19 11:38:31 +03:00
Denis Zharkov
efee0dae94
FIR: Simplify JvmBinaryAnnotationDeserializer
...
Currently, it's anyway created one per class
2020-06-19 10:21:09 +03:00
Denis Zharkov
0bc2642634
FIR: Add clarification to the workaround for KT-39659
2020-06-19 10:21:09 +03:00
Denis Zharkov
429b2a9705
FIR: Optimize deserialized annotations loading
2020-06-19 10:21:09 +03:00
Denis Zharkov
260e2d0dc3
FIR: Add dependency for :core:descriptors.runtime to modularized tests
...
Otherwise NoClassDefFoundError happens on JPS
2020-06-19 10:21:09 +03:00
Jinseong Jeon
6a28558d43
FIR deserializer: rename a callable kind that represents all "others"
2020-06-19 10:21:09 +03:00
Jinseong Jeon
12181e55c0
FIR deserializer: signature-aware annotation loading for constructors
2020-06-19 10:21:09 +03:00
Jinseong Jeon
955c7a1e5b
FIR2IR: handle deserialized class reference inside GetClassCall
2020-06-19 10:21:09 +03:00
Jinseong Jeon
781bfa20e8
FIR deserializer: fix conversion of class literal inside annotation array value.
2020-06-19 10:21:09 +03:00
Jinseong Jeon
b076bec07f
FIR deserializer: signature-aware annotation loading for functions
2020-06-19 10:21:09 +03:00
Ilya Kirillov
11a680d7d8
Wizard: group project templates into the categories on the first step
...
#KT-39700 fixed
2020-06-19 09:29:41 +03:00
Ilya Kirillov
bfedeed2c1
Wizard: use new icons in UI
2020-06-19 09:29:40 +03:00
Ilya Kirillov
7df0dd5032
Wizard: fix ui constants
2020-06-19 09:29:39 +03:00
Abduqodiri Qurbonzoda
6e5b94f695
Update js public api dump
2020-06-19 08:39:48 +03:00
Abduqodiri Qurbonzoda
c923b2e139
Deprecate contains, indexOf, lastIndexOf functions of Float/DoubleArray #KT-28753
2020-06-19 08:39:47 +03:00
Abduqodiri Qurbonzoda
97c688057d
Compare floating point values asList elements in total order #KT-28753
2020-06-19 08:39:47 +03:00
Toshiaki Kameyama
ba5e643cb2
Redundant qualifier name: fix false positive with same name variable
...
#KT-39200 Fixed
2020-06-19 12:08:36 +07:00
Abduqodiri Qurbonzoda
bf26d87ee9
Update js public api dump
2020-06-19 04:53:54 +03:00
Abduqodiri Qurbonzoda
16b62b8e65
Introduce minWithOrNull and maxWithOrNull extension functions #KT-38854
2020-06-19 04:53:53 +03:00
Abduqodiri Qurbonzoda
194791a168
Introduce minByOrNull and maxByOrNull extension functions #KT-38854
2020-06-19 04:53:51 +03:00
Abduqodiri Qurbonzoda
846a7823ad
Introduce minOrNull and maxOrNull extension functions #KT-39064
2020-06-19 04:53:49 +03:00
simon.ogorodnik
a8cd8ad8f8
[FIR] Fix testData after changing anonymous object name
2020-06-19 01:52:02 +03:00
Vladimir Ilmov
b100fd526f
(CoroutineDebugger)(Test) local variable removed from generated code
2020-06-19 00:32:19 +02:00
Vyacheslav Gerasimov
5724c47bcf
Build: Fix uri parsing on windows in publication repo configuration
2020-06-19 00:35:55 +03:00
Ilmir Usmanov
542f1b8709
Minor. Update tests
2020-06-18 17:53:47 +02:00
Ilya Goncharov
932cf21776
[Gradle, JS] Allow to change destDir only for separate task and name it destinationDir
...
#KT-38331 fixed
2020-06-18 18:51:30 +03:00
Ilya Goncharov
7386408e94
[Gradle, JS] AbstractDukatTask -> DukatTask
...
#KT-38331 fixed
2020-06-18 18:51:08 +03:00
Ilya Goncharov
49dd839131
[Gradle, JS] DukatTask -> IntegratedDukatTask
...
#KT-38331 fixed
2020-06-18 18:50:53 +03:00
Ilya Goncharov
46be588f27
[Gradle, JS] Add task for separate usage of Dukat with project npm dependencies
...
#KT-38331 fixed
2020-06-18 18:50:36 +03:00
Ilya Gorbunov
606fad64ad
Leave StringBuilder.append/insert with non-nullable String parameter
...
Leave these methods as hidden in order to preserve binary compatibility.
#KT-39504
2020-06-18 18:45:43 +03:00
Pavel Kirpichenkov
91b371789e
Invalidate library caches on OOCBM with enabled resolution anchors
...
Without forced clean stale references to declarations from source-dependent libraries
can be accessed after invalidation, i.e. resolved references can point to incorrect PSI.
TBD: more granular invalidation.
KT-24309
2020-06-18 18:27:28 +03:00
Alexander Udalov
204871a7ab
Update bootstrap to 1.4.20-dev-772
2020-06-18 16:18:59 +02:00
Ilya Matveev
754a74ac4a
[Gradle, native] Allow parallel in-process compiler execution
...
This commit allows parallel in-process execution of the K/N compiler
that was prohibited by 254a978a06 .
Issue #KT-38991 fixed
2020-06-18 14:18:00 +00:00
Ilya Matveev
03bb9138ad
[klib] Create ZipFileSystem from a Path instead of an URI
...
Calling FileSystems.newFileSystem(URI, ...) throws a
FileSystemAlreadyExistsException if a ZipFileSystem for this
URI is already created. We still can use a single instance
of ZipFileSystem by calling FileSystems.getFileSystem. In
this case we use reference counting to determine when this
instance can be safely closed.
But we cannot count references if the same ZipFileSystem is used
from different class loaders. This patch fixes this issue by
creating a file system from Path instead of an URI. Contract of
FileSystemProvider.newFileSystem(Path, ...) doesn't imply throwing
FileSystemAlreadyExistsException.
Issue #KT-37443 fixed
2020-06-18 14:17:59 +00:00
Natalia Selezneva
bf1ad44af9
Run partial import only for specified build root
2020-06-18 17:14:47 +03:00
Natalia Selezneva
5fe47ffbec
Workaround for bug in GradleInstallationManager.resolveGradleVersion()
...
Wrong gradle version when wrapper is used
fixed in 201
2020-06-18 17:14:47 +03:00
Natalia Selezneva
7a47994498
Get gradle version and gradle home from corresponding BuildModel after import
...
GradleProjectSettings that were used, are updated after KotlinDslListener is called,
so it isn't correct to check if kotlinDslModels are supported using it.
Also GradleScriptDefinitionsContributor should use gradle home from BuildModel, not from settings for the same reasons.
^KT-39104 Fixed
2020-06-18 17:14:46 +03:00
Victor Petukhov
ece61915de
NI: clean calls in coroutine inference before the second analysis of += only for right side
...
^KT-39660 Fixed
2020-06-18 17:09:59 +03:00
Vyacheslav Gerasimov
1f66049a1e
Build: Fix plugin marker publication to a remote repository
2020-06-18 16:57:39 +03:00
Igor Chevdar
2fd657b768
[box-tests] Fixed test for K/N
2020-06-18 18:44:11 +05:00
Yan Zhulanow
8b5f2f9474
Fix duplicate stepping filter adding on plugin start-up (KT-38628)
...
Review KT-CR-1301.
2020-06-18 22:32:34 +09:00
Yan Zhulanow
235b9b9269
Add kotlin-stdlib-js and kotlin-test-js to IDE artifact dependencies
2020-06-18 22:32:34 +09:00
Pavel Kirpichenkov
470fef94fb
Use bound resolution facade in DeprecationResolver usages
...
Resolution facade should be used consistently with direct usages of frontend components.
Otherwise they can start processing descriptors from foreign resolvers which leads to memory leaks.
Plain resolution API with provided facade is not suitable as-is for compiled declarations in KotlinIndicesHelper though.
Resolution facade for module sources contained in helper can't handle decompiled
sources from PSI indices (leads to "ModuleInfo not contained in resolver" errors).
That's why "hacked" resolve via import references should be used there.
#KT-39642 Fixed
2020-06-18 14:24:17 +03:00
Jinseong Jeon
82ef6bf96c
FIR2IR: honor user-contributed members in data class if any
2020-06-18 14:23:52 +03:00
Mikhail Glukhikh
b839a91050
Mute 3 FIR BB tests due to LowPriorityInOverloadResolution in reflect
...
Recently second javaType function appeared in reflect and
now FIR can't correctly resolve the code :(.
Will be fixed after annotation deserialization full support
2020-06-18 13:39:48 +03:00
Mikhail Glukhikh
d009c90e3a
Revert "Mute two FIR BB tests due to LowPriorityInOverloadResolution in reflect"
...
This reverts commit 3768af4f
2020-06-18 13:24:38 +03:00
Mikhail Glukhikh
3768af4f92
Mute two FIR BB tests due to LowPriorityInOverloadResolution in reflect
...
Recently second javaType function appeared in reflect and
now FIR can't correctly resolve the code :(.
Will be fixed after annotation deserialization full support
2020-06-18 13:21:35 +03:00
Mikhail Zarechenskiy
d44a7ff8f9
Add test for obsolete issue
...
The issue was fixed in df1595e
#KT-39630 Fixed
2020-06-18 13:05:42 +03:00
Yan Zhulanow
559561ca6b
Add missing intellij-core dependency for sam-with-receiver tests
2020-06-18 19:01:44 +09:00
Yan Zhulanow
713a305f45
Update change data for IrTextTestCaseGenerated
...
Reason of changes: 098469eb85
2020-06-18 19:01:06 +09:00
Ilya Gorbunov
ec5a04a6c7
Update public jvm API dump after introduction of javaType
...
See 9e37b62f62
2020-06-18 12:44:23 +03:00
Mikhail Zarechenskiy
a067d138e9
Enable test for new inference after df1595e4
...
Follow up KT-37149
2020-06-18 12:41:27 +03:00
Mikhail Zarechenskiy
df1595e4bc
Fix SAM conversions for derived classes
...
#KT-39535 Fixed
#KT-37149 Fixed
2020-06-18 12:36:30 +03:00
Georgy Bronnikov
ee6d432ced
Add forgotten test files
2020-06-18 12:22:53 +03:00
Igor Chevdar
cf6eb138ce
[box-tests] Turned on a test for JS_IR
2020-06-18 13:17:38 +05:00
Igor Chevdar
2bf73ccfe5
[IR] Supported extension receivers in SAM conversions
2020-06-18 13:17:38 +05:00
Ilya Muradyan
8c2baf0704
Add missing definitelyDoesNotContainName methods
2020-06-18 09:51:16 +02:00
Ilya Muradyan
573c60ed6b
Add missing recordLookup implementations
2020-06-18 09:51:16 +02:00
Ilya Muradyan
7526ff9484
Compare lookups without respect to their order
2020-06-18 09:51:16 +02:00
Igor Chevdar
3634ad2d54
Added a test
2020-06-18 12:44:48 +05:00
Igor Chevdar
ecf9727568
[IR] Supported IrEnumEntry
...
Fixes https://youtrack.jetbrains.com/issue/KT-38996
2020-06-18 12:44:48 +05:00