Commit Graph

57462 Commits

Author SHA1 Message Date
Igor Yakovlev 2b7dee6f8d Add CodegenApplicabilityCheckerExtension and use it to fallback to Heavy LigthClasses
+ Fixed #KT-33584
2019-09-11 15:29:12 +03:00
Nikolay Krasko f3b7d2fca9 Fix exception of getting parent for the root package (EA-210820) 2019-09-11 12:51:55 +03:00
Nikolay Krasko d3f03cc607 Remove deprecated usage of BulkFileListener.Adapter 2019-09-11 12:40:26 +03:00
Nikolay Krasko 7f8774f68e Fix NPE in KotlinIndicesHelper (EA-209799) 2019-09-11 12:40:26 +03:00
Nikolay Krasko 90511c734d Fix NPE in JavaToKotlinAction (EA-210821) 2019-09-11 12:40:26 +03:00
Alexander Udalov 77399a175e Cleanup compiler warnings in compiler tests 2019-09-11 10:47:34 +02:00
Mads Ager 90a37617a4 [JVM_IR, IR] Remove more needless temporary variables.
Avoid using a separate origin for temporary variables introduced
for for loops. That doesn't add anything and gives one more case
for optimizations to deal with.

Extend the JVM specific optimizations to remove temporary
variables to deal with more cases encountered in for loops
lowering.
2019-09-11 10:07:45 +02:00
Roman Artemev e5a1040dbd [KLIB] Fix references to private top-level typealias via type abbreviation 2019-09-10 19:59:01 +03:00
Dmitriy Novozhilov 40ebe4063c [FIR] Refactor collecting statistics in modularized tests
Also add printing statistics of best pass at the end of build log
2019-09-10 18:34:03 +03:00
Dmitriy Novozhilov 6a75a9072c [FIR] Remove redundant resolution stage from resolution of synthetic function calls 2019-09-10 18:34:02 +03:00
Dmitriy Novozhilov ef5ac7df93 [FIR] Don't create member function for each when and try expression
Use one function (per session) instead
2019-09-10 18:34:02 +03:00
Yan Zhulanow 996d9a5d90 Pill: Enable Pill for FIR visualizer modules 2019-09-10 21:38:38 +09:00
Vladimir Dolzhenko d1285d9dbf Fix performanceTests for 192; Add perfCounters 2019-09-10 14:02:56 +02:00
Igor Yakovlev 8fa67f0478 Add correct modification tracking on UltraLight classes
Fixed #KT-32820
2019-09-10 14:38:10 +03:00
Ilya Kirillov b2002d56bd New J2K: move type calculation to expression node 2019-09-10 14:09:31 +03:00
Ilya Kirillov be94eb5405 New J2K: remove extra interfaces in AST structure & split AST definitions to proper files 2019-09-10 14:09:30 +03:00
Ilya Kirillov fd85c2bb43 New J2K: use mutable lists for storing comments 2019-09-10 14:09:30 +03:00
Ilya Kirillov 5d99419e9c New J2K: check call name before resolving in post-processing 2019-09-10 14:09:29 +03:00
Ilya Kirillov dca0dc1933 New J2K: do not recalculate types for binary & unary expressions and rewrite assignment expressions conversion
#KT-33679 fixed
2019-09-10 14:09:29 +03:00
Ilya Kirillov c93d810685 New J2K: introduce TypeFactory for creating J2K types 2019-09-10 14:09:28 +03:00
Ilya Kirillov 047bb07727 New J2K: store reference to conversionContext & symbolProvider in conversion 2019-09-10 14:09:27 +03:00
Ilya Kirillov eb690f451e New J2K: do not recreate typeElement on updating type 2019-09-10 14:09:26 +03:00
Ilya Kirillov f61bb5aa39 New J2K: implement mutability inference in post-processing
#KT-24293 fixed
#KT-19603 fixed
2019-09-10 14:09:26 +03:00
Ilya Kirillov c28515be59 New J2K: use nullable type for unknown for public declarations & prepare for mutability inference
#KT-32518 fixed
2019-09-10 14:09:25 +03:00
Simon Ogorodnik 0040490daf [FIR] Fix FIR modularized tests after switch to 192 2019-09-10 12:33:00 +03:00
Ilya Goncharov fc4bcfb536 Add test on yarn downloading non-default version
- Previously we skipped yarn setup, if yarn folder exists, not paying attention on what concrete yarn version installed
2019-09-10 10:44:30 +03:00
Ilya Goncharov 8a6ee66f81 Yarn manipulation in build script
- Remove yarn folder in task inside build script to not import GradleUserHomeLookup
- Check yarn folder existence in task inside build script
2019-09-10 10:44:30 +03:00
Ilya Goncharov 48c06aeeba Add test for yarn setup by kotlinYarnSetup task 2019-09-10 10:44:30 +03:00
Ilya Goncharov f609e21c82 Remove asserts, that failed build
- TeamCity cannot run browser tests yet, so disable such assertions related with browser tests checking

#KT-32075 fixed
2019-09-10 10:39:11 +03:00
Ilya Goncharov 49391e64d6 Add testing for karma use puppeteer for downloading chrome 2019-09-10 10:35:31 +03:00
Ilya Goncharov 18f2ba889e Make envJsCollector as map 2019-09-10 10:35:30 +03:00
Ilya Goncharov 3bfb980a39 Collect env variables to separate collector 2019-09-10 10:35:30 +03:00
Ilya Goncharov 613391d00b Add puppeteer for Chrome browsers 2019-09-10 10:35:30 +03:00
Ilya Goncharov df646233ef Fix KarmaConfig file name 2019-09-10 10:35:30 +03:00
Vasily Levchenko 89d49479ab [util-io][properties] close file stream after save property operation ends.
(cherry picked from commit f0ae971f9304ecd7a2ba134ab77b511a0569ed5f)
2019-09-09 21:14:19 +03:00
Sebastian Schuberth cc40387788 YarnSetupTask: Remove a too coarse "onlyIf" in the "init" block
"installationDir" is the non-version specific top-level Yarn
installation directory simply called "yarn". Checking for its existence
is not sufficient to be able to skip the task, as another version than
the requested one could be installed below the "yarn" directory.

Instead of taking the version into account in this check, simply remove
it as the version-specific installation directory at "env.home" is
already marked as an "OutputDirectory", so Gradle itself already takes
care of skipping task execution if the output files were created before.
2019-09-09 17:03:17 +03:00
Mikhail Zarechenskiy 85ff979bd4 Use PARTIAL mode in analyzer to provide lambda return value hints
It only uses `isUsedAsResultOfLambda` (so, CFA) and don't have to
 resolve bodies fully
2019-09-09 15:22:41 +03:00
Nikolay Krasko d253cd5032 Ignore external annotations in AbstractResolveByStubTest (KT-33732)
In IDE with have descriptors with additional annotations obtained from
external annotations manager. They are probably only java overrides so
shouldn't be present in stubs, thus must be ignored in this test.

Tests with enums started to fail after upgrading to 192 platform because
of additional NotNull annotation on `getDeclaringClass()` method.

 #KT-33732 Fixed
2019-09-09 14:35:58 +03:00
Nikolay Krasko 80b5c76d98 Minor: fix warnings in AbstractResolveByStubTest 2019-09-09 14:35:58 +03:00
Kristoffer Andersen e7d0909979 JVM_IR: Fix null-constant comparison with primitive types. 2019-09-09 10:23:11 +02:00
Mikhail Zarechenskiy e21da3a61a Avoid resolving array-set method several times
While origin problem was in NI, it's also nice to have this change in OI
 in order to slightly improve performance

 #KT-33125 Fixed
2019-09-09 11:04:18 +03:00
Mikhail Zarechenskiy f8449bf15a [NI] Clear partially resolved calls after resolve of top-level call
#KT-32433 Fixed
2019-09-09 11:04:17 +03:00
Mikhail Zarechenskiy f305475e3f Make "nothing to inline" diagnostic shorter
#KT-33421 Fixed
2019-09-09 11:04:17 +03:00
Mikhail Zarechenskiy dc25f7b7ac [NI] Minor, remove unneeded computation of constant evaluator 2019-09-09 11:04:16 +03:00
Denis Zharkov 3569eaabcf Rename FirJavaElementFinder.kt.as34 to FirJavaElementFinder.kt.183 2019-09-09 10:14:19 +03:00
Steven Schäfer 62a1ea643a Add additional tests for bound receivers in callable references 2019-09-06 15:11:59 +02:00
Steven Schäfer d89d68e3df JVM IR: Cache SAM wrappers in top-level classes and use proper naming scheme 2019-09-06 15:11:59 +02:00
Steven Schäfer 2be4abe9a6 Refactoring: Consistently use Symbols in JvmSymbols 2019-09-06 15:11:59 +02:00
Steven Schäfer c77fa1ecd6 JVM IR: Fixes in SAM lowering 2019-09-06 15:11:59 +02:00
Denis Zharkov 829102b3e3 FIR: Fix exception in inference
Default SimpleTypeMarker::withNullability from ConeTypeContext
doesn't take into account inference-related type kinds like type variables

These cases are properly handled in
org.jetbrains.kotlin.fir.resolve.ResolveUtilsKt#withNullability

Original exception trace:
	at org.jetbrains.kotlin.fir.types.ConeTypeContext$DefaultImpls.withNullability(ConeTypeContext.kt:142)
	at org.jetbrains.kotlin.fir.resolve.calls.ConeInferenceContext$DefaultImpls.withNullability(ConeInferenceContext.kt)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirBodyResolveTransformerKt$inferenceComponents$1.withNullability(FirBodyResolveTransformer.kt:943)
	at org.jetbrains.kotlin.fir.resolve.calls.ConeInferenceContext$DefaultImpls.makeSimpleTypeDefinitelyNotNullOrNotNull(ConeInferenceContext.kt:195)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirBodyResolveTransformerKt$inferenceComponents$1.makeSimpleTypeDefinitelyNotNullOrNotNull(FirBodyResolveTransformer.kt:943)
	at org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl.makeSimpleTypeDefinitelyNotNullOrNotNull(NewConstraintSystemImpl.kt)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector$TypeCheckerContext.makeSimpleTypeDefinitelyNotNullOrNotNull(ConstraintInjector.kt)
	at org.jetbrains.kotlin.resolve.calls.inference.components.AbstractTypeCheckerContextForConstraintSystem.simplifyLowerConstraint(AbstractTypeCheckerContextForConstraintSystem.kt:163)
	at org.jetbrains.kotlin.resolve.calls.inference.components.AbstractTypeCheckerContextForConstraintSystem.internalAddSubtypeConstraint(AbstractTypeCheckerContextForConstraintSystem.kt:71)
	at org.jetbrains.kotlin.resolve.calls.inference.components.AbstractTypeCheckerContextForConstraintSystem.addSubtypeConstraint(AbstractTypeCheckerContextForConstraintSystem.kt:50)
	at org.jetbrains.kotlin.types.AbstractTypeChecker.completeIsSubTypeOf(AbstractTypeChecker.kt:193)
	at org.jetbrains.kotlin.types.AbstractTypeChecker.isSubtypeOf(AbstractTypeChecker.kt:164)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector$TypeCheckerContext.runIsSubtypeOf(ConstraintInjector.kt:153)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector.addSubTypeConstraintAndIncorporateIt(ConstraintInjector.kt:77)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector.addInitialSubtypeConstraint(ConstraintInjector.kt:55)
	at org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl.addSubtypeConstraint(NewConstraintSystemImpl.kt:84)
	at org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderKt$addSubtypeConstraintIfCompatible$1.invoke(ConstraintSystemBuilder.kt:61)
	at org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderKt$addSubtypeConstraintIfCompatible$1.invoke(ConstraintSystemBuilder.kt)
	at org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl.runTransaction(NewConstraintSystemImpl.kt:130)
	at org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderKt.addSubtypeConstraintIfCompatible(ConstraintSystemBuilder.kt:60)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.checkApplicabilityForArgumentType(Arguments.kt:170)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolvePlainArgumentType(Arguments.kt:158)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolveSubCallArgument(Arguments.kt:123)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolveArgumentExpression(Arguments.kt:42)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolveArgument(Arguments.kt:196)
	at org.jetbrains.kotlin.fir.resolve.calls.CheckArguments.check(ResolverParts.kt:145)
	at org.jetbrains.kotlin.fir.resolve.calls.CheckArguments$check$1.invokeSuspend(ResolverParts.kt)
2019-09-06 13:45:28 +03:00