Commit Graph

44824 Commits

Author SHA1 Message Date
Alexander Udalov 13df75ef74 Minor, extract isInstanceType to protoTypeTableUtil 2018-03-26 17:21:08 +02:00
Alexander Udalov f7a3182982 Minor, add default value to contract expression flags 2018-03-26 17:21:07 +02:00
Alexander Udalov 46a1109910 Report warnings on usages of kotlin-stdlib-jre7/kotlin-stdlib-jre8
#KT-21347 Fixed
2018-03-26 17:19:35 +02:00
Alexander Udalov 71e9ee7437 Minor, rephrase diagnostic message on repeatable annotations 2018-03-26 16:35:17 +02:00
Alexander Udalov 7f1a468b2e Read virtual files safely in KotlinMetadataStubBuilder
Do not fail on an invalid file, or on a file pointing to a non-existent
.jar entry, exactly as this is done in KotlinMetadataDecompiler
2018-03-26 15:54:28 +02:00
Mikaël Peltier 3a50d0d78f KT-22063 Add intrinsics for javaObjectType and javaPrimitiveType
Fix of https://youtrack.jetbrains.com/issue/KT-22063
2018-03-26 15:52:19 +02:00
Alexey Tsvetkov d79a4fd9a0 Remove gradle/project-schema.json
It is not needed anymore.
Also since :ultimate project is included conditionally,
if "non-ultimate" developer regenerates
and commits gradle/project-schema.json,
then ultimate builds would fail.
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov b420671a1d Introduce jps-compatible-base plugin to create necessary configurations
To avoid generating static accessors (via kotlinDslAccessorsSnapshot),
we need to create all necessary configurations during 'plugins'
block evaluation.
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov 19a13b47ff Use java-gradle-plugin in buildSrc 2018-03-26 16:09:29 +03:00
ilmat192 9d15052688 Fix composite build with Kotlin/Native (#1588) 2018-03-26 16:04:41 +03:00
Mikhail Zarechenskiy 4ed5e2f35e [NI] Improve inference for lambdas that return lambdas 2018-03-26 14:59:52 +03:00
Mikhail Zarechenskiy b8c0910724 Add one more test on delegated properties to check NI 2018-03-26 14:37:32 +03:00
Mikhail Zarechenskiy 3ea0b9975f [NI] Use specialized type of integer value type for delegate receiver 2018-03-25 20:22:38 +03:00
Mikhail Zarechenskiy 3dde31729e [NI] Record information about delegated property as in old inference 2018-03-25 20:22:37 +03:00
Mikhail Zarechenskiy 7e982fed4f Add complex test on delegated properties 2018-03-25 20:22:37 +03:00
Mikhail Zarechenskiy bb4fb669a0 [NI] Refactoring: rename method 2018-03-25 20:22:36 +03:00
Mikhail Zarechenskiy bf92280f52 [NI] Update testdata about inference for delegated properties 2018-03-25 20:22:36 +03:00
Mikhail Zarechenskiy 53b434a3e3 [NI] Use getValue/setValue methods simultaneously to infer types
Rewrite inference for delegated properties with the new scheme
2018-03-25 20:22:36 +03:00
Mikhail Zarechenskiy 0f60965595 [NI] Introduce basic resolver for many candidates 2018-03-25 20:22:35 +03:00
Mikhail Zarechenskiy 3078e5a6ff [NI] Simplify creation of resolution callbacks 2018-03-25 20:22:35 +03:00
Mikhail Zarechenskiy ff10e97c28 [NI] Make CallResolutionResult more typed 2018-03-25 20:22:35 +03:00
Mikhail Zarechenskiy c8ef785010 [NI] Move method hasContradiction to constraints storage 2018-03-25 20:22:34 +03:00
Mikhail Zarechenskiy 663b417c5a [NI] Introduce method to add extra constraints before completion 2018-03-25 20:22:34 +03:00
Mikhail Zarechenskiy 50027225a1 [NI] Extract interface InferenceSession to a separate file 2018-03-25 20:22:34 +03:00
Mikhail Zarechenskiy 1a5282c4b7 [NI] Introduce methods to extend inference for several candidates 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy 01cdc08026 [NI] Refactor: extract method to run candidate completion out 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy 2235f5eb48 [NI] Refactor: create separate method for candidate preparation 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy 8c44d44e78 [NI] Propagate class to extend inference through resolution context 2018-03-25 20:22:33 +03:00
Mikhail Zarechenskiy 887a69b72e [NI] Extend constraint completer to work with several resolve atoms 2018-03-25 20:22:32 +03:00
Zalim Bashorov a47a916437 Restore hack for avoiding tracking declarations from JS stdlib 2018-03-24 20:09:11 +03:00
Nikolay Krasko ba662b7d56 Minor: another message fix (KT-23309)
#KT-23309 Fixed
2018-03-23 18:31:22 +03:00
Nikolay Krasko 982b768c69 Refactoring: collect callbacks for collecting module info in one place 2018-03-23 18:04:08 +03:00
Nikolay Krasko 0b0eb210b6 Refactoring: get module language settings in ResolverForProjectImpl 2018-03-23 18:04:06 +03:00
Nikolay Krasko 525d90540a Refactoring: enumerate used components in PerFileAnalysisCache.kt 2018-03-23 18:04:03 +03:00
Nikolay Krasko 586860e03a Refactoring: store correspondent module info in module content 2018-03-23 18:04:01 +03:00
Nikolay Krasko 3e313509e1 Refactoring: restrict callback in ResolverForProjectImpl 2018-03-23 18:03:59 +03:00
Nikolay Krasko 666d31bdc4 Refactoring: visibility restrictions 2018-03-23 18:03:57 +03:00
Nikolay Krasko 38a79086d3 Rename: ResolutionFacadeImpl -> ModuleResolutionFacadeImpl 2018-03-23 18:03:54 +03:00
Nikolay Krasko dced45d1bf Refactoring: rename AnalyzerFacade -> ResolverForModuleFactory 2018-03-23 18:03:52 +03:00
Nikolay Krasko c5e8374fa8 Minor: typo fix (KT-23309)
#KT-23309 Fixed
2018-03-23 17:58:12 +03:00
Nikolay Krasko 0f441760c2 Refactoring: remove usages of analyzeFully
Function isn't removed because it has usages from other plugins
2018-03-23 17:58:11 +03:00
Nikolay Krasko 059013a8d3 Rename: analyzeFullyAndGetResult -> analyzeWithAllCompilerChecks in ResolutionFacade 2018-03-23 17:58:11 +03:00
Nikolay Krasko f2b478f304 Rename: analyzeFullyAndGetResult -> analyzeWithAllCompilerChecks in resolutionApi.kt 2018-03-23 17:58:10 +03:00
Mikhail Glukhikh 804d340c5f Fix more broken QF tests 2018-03-23 15:26:21 +03:00
Mikhail Glukhikh e937a350fe Fix broken QF tests 2018-03-23 14:57:33 +03:00
Ilmir Usmanov 481dbee96a Do not ignore copy operations while finding source instructions
in redundant locals elimination.

Since IgnoringCopySourceInterpreter ignores ALOADs and ASTOREs,
the source instruction of ALOAD K in {ALOAD N, ASTORE K, ALOAD K}
sequence is not ASTORE K. In this case we cannot simply replace K
with N, since there can be multiple {ALOAD N, ASTORE K} sequences
in separate branches. After replacement we get different stack
frames.
This change resolves this.

However, in ReturnUnitMethodTransformer we want to ignore copies
of the same GETSTATIC kotlin/Unit.INSTANCE, since we do not mess
with local variables and just replace ASTORE with ARETURN to help
tail-call optimization.
 #KT-23373: Fixed
2018-03-23 14:32:48 +03:00
Mikhail Zarechenskiy 15b46cdda9 [NI] Don't perform useless computation for smartcasts 2018-03-23 14:18:32 +03:00
Toshiaki Kameyama e06c13732f Add intentions for specifying use-site targets for an annotation
So #KT-19871 Fixed
2018-03-23 13:03:00 +03:00
Denis Zharkov e162749366 Add a cache for PsiBasedClassResolver instances
The PsiBasedClassResolver constructor isn't very cheap to call
because it runs computation of conflicting names each time

Again, this is helpful for Spring-interop because PsiBasedClassResolver
is used very frequently there

 #KT-23380 Fixed
2018-03-23 12:36:15 +03:00