Commit Graph

57632 Commits

Author SHA1 Message Date
Kevin Bierhoff bc207ed8db fix for KT-29471
#KT-29471 Fixed
2019-09-18 14:42:09 +03:00
Nikolay Krasko 220a8f2872 Clear internal caches in PerModulePackageCacheService on dispose (KT-33802) 2019-09-18 11:30:02 +03:00
Nikolay Krasko 4387862d20 Remap android home directory to allow parallel test execution (KT-33870)
Using same directory for android (user home) leads to exception on Windows
because of file lock:

com.google.gson.JsonSyntaxException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at com.google.gson.Gson.fromJson(Gson.java:942)
at com.google.gson.Gson.fromJson(Gson.java:865)
at com.android.tools.analytics.AnalyticsSettings.loadSettingsData(AnalyticsSettings.kt:140)
at com.android.tools.analytics.AnalyticsSettings.initialize(AnalyticsSettings.kt:211)
at org.jetbrains.android.AndroidPlugin.initializeForNonStudio(AndroidPlugin.java:56)
at org.jetbrains.android.AndroidPlugin.initComponent(AndroidPlugin.java:30)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:503)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:411)
at com.intellij.idea.IdeaTestApplication.a(IdeaTestApplication.java:114)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:61)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:54)
at com.intellij.testFramework.LightPlatformTestCase.initApplication(LightPlatformTestCase.java:166)
at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:41)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.lambda$setUp$27(CodeInsightTestFixtureImpl.java:1142)
at com.intellij.testFramework.EdtTestUtil$Companion$runInEdtAndWait$1.invoke(EdtTestUtil.kt:18)
at com.intellij.testFramework.EdtTestUtil$Companion$runInEdtAndWait$1.invoke(EdtTestUtil.kt:13)
at com.intellij.testFramework.EdtTestUtilKt.runInEdtAndWait(EdtTestUtil.kt:63)
at com.intellij.testFramework.EdtTestUtil$Companion.runInEdtAndWait(EdtTestUtil.kt:18)
at com.intellij.testFramework.EdtTestUtil.runInEdtAndWait(EdtTestUtil.kt)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1141)
at com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase.setUp(LightJavaCodeInsightFixtureTestCase.java:96)
at org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase.setUp(KotlinLightCodeInsightFixtureTestCase.kt:66)
at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:388)
at com.intellij.testFramework.EdtTestUtil$Companion$runInEdtAndWait$1.invoke(EdtTestUtil.kt:18)
at com.intellij.testFramework.EdtTestUtil$Companion$runInEdtAndWait$1.invoke(EdtTestUtil.kt:13)
at com.intellij.testFramework.EdtTestUtilKt$runInEdtAndWait$3.run(EdtTestUtil.kt:67)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:433)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:61)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:159)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:1295)
at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1333)
at com.google.gson.stream.JsonReader.consumeNonExecutePrefix(JsonReader.java:1576)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:534)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425)
at com.google.gson.Gson.fromJson(Gson.java:923)
... 41 more

#KT-33870 Fixed
2019-09-18 11:30:02 +03:00
Anton Yalyshev dfde3b4076 Rename collector of debugger events 2019-09-18 10:06:45 +03:00
Anton Yalyshev 61eb9faecd Move status of evaluation from eventId to context for better data analytics 2019-09-18 10:06:45 +03:00
Denis Zharkov 2bdbed978b FIR: Support SAM constructors 2019-09-18 10:03:55 +07:00
Denis Zharkov b3e96a1fcf FIR: Merge FirTopLevelDeclaredMemberScope into FirSelfImportingScope
It's strange that those scopes have similar semantics but belong
to different level (that might change semantics a bit)
2019-09-18 10:03:55 +07:00
Denis Zharkov 391346ae46 FIR: Pass BodyResolveComponents to ScopeTowerLevel 2019-09-18 10:03:28 +07:00
Denis Zharkov fb4b6b8290 FIR: Move constructor processing from scopes to tower resolvers 2019-09-18 10:03:28 +07:00
Denis Zharkov 08a8a9fa61 FIR: Move SamResolver to BodyResolveComponents 2019-09-18 10:00:04 +07:00
Denis Zharkov 5ebde93eb9 FIR: Provide BodyResolveComponents instead of InferenceComponents to resolution
It seems to be more reasonable to store SamResolver, ScopeSession
and other per-transformer/per-thread components there
2019-09-18 10:00:04 +07:00
Denis Zharkov 5567620563 FIR: Support SAM conversion 2019-09-18 10:00:04 +07:00
Denis Zharkov f501730d86 Minor. Reformat Arguments.kt in fir 2019-09-18 10:00:04 +07:00
Denis Zharkov 9d517d914b Minor. Get rid of redundant elvis operand in AbstractConeSubstitutor::substituteOrNull 2019-09-18 10:00:04 +07:00
Denis Zharkov 6e51bed30c FIR: Support lambda inference from platform types 2019-09-18 10:00:04 +07:00
Denis Zharkov d787df3880 Minor. Reformat ConeKotlinType::isBuiltinFunctionalType 2019-09-18 10:00:04 +07:00
Mikhail Zarechenskiy 0431c21f9a [NI] Remove unneeded computation of possible types for return type
This call was needed at some point for smartcasts on qualified
 expressions but become obsolete (most likely after
 daa27016ca).

 Now `ComplexDataFlowBenchmark` has similar results for NI and OI
2019-09-18 00:19:21 +03:00
Mikhail Zarechenskiy d47fc85868 [NI] Minor, small improvements around KotlinCall creation 2019-09-18 00:13:10 +03:00
Mikhail Zarechenskiy 971b02494c [NI] Minor, simplify code a bit for sub calls preparation 2019-09-18 00:13:10 +03:00
Mikhail Zarechenskiy 7e8784dca1 [NI] Simplify code that capture types from expression 2019-09-18 00:13:10 +03:00
Vyacheslav Gerasimov 6327f657a5 193: Add bunches for 193 platform 2019-09-17 21:16:13 +03:00
Vyacheslav Gerasimov 381f6d8226 193: Inline removed parents method in UastLightIdentifier 2019-09-17 21:16:13 +03:00
Vyacheslav Gerasimov 7fe25e922c 193: Fix nullability in KotlinImportOptimizer 2019-09-17 21:16:12 +03:00
Vyacheslav Gerasimov c220ad4b00 Build: Add dsl constants for 193 platform 2019-09-17 21:16:12 +03:00
Svyatoslav Scherbina df570ec2a2 Add CompilerOutputKind.DYNAMIC_CACHE and .STATIC_CACHE for Native BE 2019-09-17 20:28:01 +03:00
Ilmir Usmanov 0e3f0c98e5 JVM_IR: Support inline suspend lambdas 2019-09-17 19:19:27 +03:00
Dmitriy Novozhilov 61ae98df40 [FIR] Add default visitors and transformers with useful part of visited hierarchy 2019-09-17 18:09:18 +03:00
Dmitriy Novozhilov e70c1d6959 [FIR] Remove default visited hierarchy 2019-09-17 18:09:18 +03:00
Nikolay Krasko 9b32bd7138 Do special insert even for custom trimIndent() function to avoid using resolve (KT-31810) 2019-09-17 17:16:30 +03:00
Toshiaki Kameyama 147f805c56 Paste inside indented .trimIndent() raw string: respect indentation (KT-31810)
#KT-31810 Fixed
2019-09-17 17:16:30 +03:00
Ilya Chernikov d3b826c71d Improve class name generation for scripts and REPL snippets
- allow to override default name/scheme
- implement host/engine specific names for jsr223 to avoid classloading
  clashes (also fix "eval in eval" test)
2019-09-17 16:05:38 +02:00
Ilya Chernikov 6de05bb2c7 Drop hardcoded extraction of the snippet id from script name
rely on the userdate instead
2019-09-17 16:05:38 +02:00
Ilya Chernikov dd953e0f66 Deduplicating classloaders and classpath entries on constructing script classloader 2019-09-17 16:05:37 +02:00
Simon Ogorodnik df3fbaf417 Add various configuration parameters to Non Fir modularized tests 2019-09-17 16:10:37 +03:00
Simon Ogorodnik f3a0632b9a [FIR] Fix dump html for each pass 2019-09-17 16:10:32 +03:00
Dmitry Petrov 0531bd4fe6 KT-29229 Intrinsify 'in' operator for unsigned integer ranges
Support mixed type case, e.g., '[UByte] in [UIntRange]'.
2019-09-17 15:50:47 +03:00
Ilya Chernikov 5426071102 Add dependency classloader to the evaluation classloader:
allows to use dependencies from classloader in the scenario with
evaluation in the isolated environment
2019-09-17 12:43:18 +02:00
Ilya Chernikov 61d517fb31 Implement script dependencies resolution directly from classloader
#KT-27956 fixed
2019-09-17 12:43:18 +02:00
Ilya Chernikov f8db150a2b [minor] Drop some usages of kotlin reflection in scripting compiler plugin 2019-09-17 12:43:16 +02:00
Ilya Chernikov 689a5cbdf5 Add descriptors.runtime to the compiler...
move it into appropriate package and ensure that it gets relocated
properly in kotlin-reflect.jar
This change is needed to use the functionality that provides descriptors
from classloaders for scripts compilation.
2019-09-17 12:43:15 +02:00
Ilya Kirillov 8dce22c335 New J2K: use proper resolution facade when getting class reference in inference post-processing 2019-09-17 11:56:07 +03:00
Ilya Kirillov cfd476ca7e New J2K: correctly convert main method with varargs argument
#KT-33756 fixed
2019-09-17 11:56:06 +03:00
Ilya Kirillov 5d6cf34045 New J2K: consider that type argument may be null in inference post-processing 2019-09-17 11:56:06 +03:00
Ilya Kirillov 934d491c1c New J2K: use Any? instead of star projection for raw supertypes
#KT-33863 fixed
2019-09-17 11:56:06 +03:00
Ilya Kirillov c6e0356a59 Do not search for getter usages for every "may be const" quickfix invocation
It is a rather expensive operation which is critical for j2k

relates to #KT-33854
2019-09-17 11:56:05 +03:00
Ilya Kirillov 1b3c5f5d37 New J2K: use proper progress indicator for showing progress
#KT-33854 fixed
2019-09-17 11:56:05 +03:00
Ilya Kirillov 2916be6a53 Remove duplicating interface in J2K
#KT-33445 fixed
2019-09-17 11:56:05 +03:00
Ilya Kirillov 1cf348baba Do not commit document on non-kotlin files when trying to perform j2k conversion
#KT-33725 fixed
2019-09-17 11:56:04 +03:00
Mikhail Glukhikh 13b16cfe75 Refactoring: get rid of firSafeNullable, enhance getSymbolByLookupTag 2019-09-17 10:10:07 +03:00
Mikhail Glukhikh 0493432723 Remove some usages of FirBasedSymbol 2019-09-17 10:10:06 +03:00