Commit Graph

55065 Commits

Author SHA1 Message Date
Mikhail Glukhikh 806d2d628c FIR Java: correctly handle overridden Kotlin properties in use-site scope 2019-05-28 10:20:41 +03:00
Mikhail Glukhikh 56435fa283 FIR Java: add default constructors 2019-05-28 10:20:40 +03:00
Mikhail Glukhikh d0404b2c2a FIR resolve: check number of parameters when handling Java accessors 2019-05-28 10:20:38 +03:00
Mikhail Glukhikh eaf7e46da3 FIR resolve bench: count implicit built-in type refs as resolved 2019-05-28 10:20:37 +03:00
Mikhail Glukhikh 459dcb4f57 FIR resolve: set implicit Unit type for block without result expression
This fixes most of "implicit error types"
2019-05-28 10:20:36 +03:00
Mikhail Glukhikh d2bdbd8978 FIR resolve: record & check implicit extension receiver type properly 2019-05-28 10:20:35 +03:00
Mikhail Glukhikh d9d582b226 FIR tower resolve: add level with implicit extension receiver 2019-05-28 10:20:33 +03:00
Mikhail Glukhikh 45b0f5a0ca Add FIR resolve test (call extension from extension) 2019-05-28 10:20:32 +03:00
Mikhail Glukhikh bc336650ff More top-level FIR resolve tests (map, with) 2019-05-28 10:20:31 +03:00
Simon Ogorodnik 94dca1d467 Suspend resolution sequence on first inapplicability report 2019-05-28 10:20:29 +03:00
Mikhail Glukhikh cb76ea5d14 FIR resolve: do not launch overload conflict resolve for erroneous 2019-05-28 10:20:28 +03:00
Mikhail Glukhikh 4d145db9f7 FIR resolve (by semoro): support correct type inference for generic args
This commit includes additional test and fixes e.g.
resolve of listOf() + listOf()
2019-05-28 10:19:12 +03:00
Mikhail Glukhikh 3cede7e827 Make FIR cone flexible type data class to improve constraint comparison 2019-05-28 10:19:08 +03:00
Mikhail Glukhikh 0d35c68f88 Use abstract 'createErrorType' in TypeApproximator to fix FIR assertion
NB: each type system should use its own error types
2019-05-28 10:18:36 +03:00
Simon Ogorodnik 36ab325394 Abstract FIR modularized tests 2019-05-28 10:18:35 +03:00
Simon Ogorodnik 60a73ca13f Report percents in FirResolveBench 2019-05-28 10:18:34 +03:00
Simon Ogorodnik d3f00280e9 Disable data class copy function body in raw FIR
After this commit we require 'copy' body generation in FIR2IR converter
2019-05-28 10:18:00 +03:00
Simon Ogorodnik a849cc7da4 Store type for already resolved FIR references properly 2019-05-28 10:17:59 +03:00
Simon Ogorodnik 58873b2d7b FIR resolve: set setter value-parameter type properly 2019-05-28 10:17:57 +03:00
Simon Ogorodnik 38d3438101 [FIR] Support withNullability for captured type 2019-05-28 10:17:56 +03:00
Mikhail Glukhikh 05e4539019 Set resolved type for lambdas properly during FIR resolve
Partially done by semoro
2019-05-28 10:17:31 +03:00
Mikhail Glukhikh 963ed44ce1 FIR: fix exception in ConeKotlinType.returnType 2019-05-28 10:17:25 +03:00
Mikhail Glukhikh 5c96fa0844 Raw FIR: set enum entry types to kotlin.Enum to avoid their resolve 2019-05-28 10:17:23 +03:00
Mikhail Glukhikh 6589fbbfbb Raw FIR: set val setter to null instead of default one 2019-05-28 10:17:22 +03:00
Mikhail Glukhikh 0aaf8c7689 Fix FIR Java enhancement of java.util.Map & similar supertypes 2019-05-28 10:17:21 +03:00
Simon Ogorodnik cef108a5ae FIR: implement qualifier resolver 2019-05-28 10:17:05 +03:00
Jiaxiang Chen d3cc0e6ce9 JVM_IR: Optimize disjunction condition with intrinsic function call. 2019-05-28 08:48:43 +02:00
pyos 6d19eb1853 JVM_IR: sidestep defective getMethodAsmFlags when inlining lambdas
It uses isStaticMethod to determine whether to set ACC_STATIC, which is
not correct (see PR #2341). This results in using incorrectly typed
opcodes (as all arguments are shifted by 1) when modifying the inlined
lambda's bytecode. For example, in the test added by this commit, these
opcodes are inserted to spill the stack into locals before calling
another inline function.

Because getMethodAsmFlags is used by the non-IR backend (see PR #2341
again for why changing stuff might not be a good idea), the proposed
solution is to ditch it completely and override generateLambdaBody in
IrExpressionLambdaImpl to use FunctionCodegen's IR-based flag
computation logic.
2019-05-28 08:38:16 +02:00
Steven Schäfer 82e4985aa0 Fix dispatch receiver in JvmStaticAnnotationLowering 2019-05-28 08:10:45 +02:00
Steven Schäfer 0d31106738 Fix return type in ToArrayLowering 2019-05-28 08:10:45 +02:00
Steven Schäfer 64120e8220 Fix return type in SyntheticAccessorLowering 2019-05-28 08:10:45 +02:00
Steven Schäfer e6f65d4260 Fix return types in EnumClassLowering 2019-05-28 08:10:45 +02:00
Steven Schäfer 2da0315d2e Fix IR types in JVM_IR BridgeLowering
Properly implement the java erasure rules on IrTypes and fix the types
for dispatch and extension receivers.
2019-05-28 08:10:45 +02:00
Eduard Wolf c885cadde4 KT-31639: Fix Iterables.drop integer overflow 2019-05-27 23:07:14 +03:00
Leonid Startsev e5565b817b Create marker for Gradle Plugin Portal for kotlinx-serialization compiler plugin
#KT-27612 fixed
2019-05-27 19:59:13 +03:00
Sergey Igushkin a4069c031e Fix Android 3.3 Gradle integration tests running with low Gradle version 2019-05-27 18:12:17 +03:00
Mikhail Zarechenskiy 9f62920556 Fix compilation against bootstrap compiler 2019-05-27 17:32:25 +03:00
Mikhail Zarechenskiy c30e045b1b [NI] Don't consider Any!-constraint from upper bounds as more specific
#KT-31624 Fixed
2019-05-27 17:32:25 +03:00
Mikhail Zarechenskiy 8bef345f0f Duplicate test for NI and OI to avoid mismatch of diagnostics
There is a problem with different order of diagnostics for NI and OI,
 so, in order to fix this test, it was duplicated
2019-05-27 17:32:24 +03:00
Mikhail Zarechenskiy 95710f4087 [NI] Avoid forcing resolve for array access expression
#KT-31606 Fixed
 #EA-126523 Fixed
2019-05-27 17:32:24 +03:00
Mikhail Zarechenskiy fe5976d7f4 [NI] Don't apply SAM-conversion for type that is subtype of function
Plus, don't get synthetic candidates as all candidates are creating
 by conversion

 #KT-31503 Fixed
2019-05-27 17:32:23 +03:00
Svyatoslav Kuzmich ceaa64dfb1 [IR BE] Make lateinit fields and variables nullable 2019-05-27 16:24:22 +03:00
Kirill Shmakov 362e056b18 Expand acronym for K/N definitions file 2019-05-27 15:58:04 +03:00
Simon Ogorodnik 50a7d3f037 Adjust performanceTest jvm args 2019-05-27 15:00:46 +03:00
Alexander Udalov a3d8fdf30a Fix compilation of kotlin-maven-plugin
Also remove the remaining usage (in a comment) of
JvmAbi.DEFAULT_MODULE_NAME
2019-05-27 13:21:31 +02:00
Alexey Tsvetkov ad7de948f6 Update bootstrap
The new version fixes NSME from CoreJarFileSystem (KT-31574)
Also see 6addb24e4b
2019-05-27 13:08:34 +03:00
Mikhail Zarechenskiy af15e9b93f [NI] Fix assertion: KotlinTypeMarker -> KotlinType 2019-05-27 01:01:09 +03:00
Mikhail Zarechenskiy a0234241f5 [NI] Approximate components of raw types separately
This is needed as components can have different type arguments
2019-05-26 21:41:53 +03:00
Mikhail Zarechenskiy 8910859fd1 [NI] Implement various optimizations for incorporation algorithm
Mostly, these optimisations are picked from the old inference.
 Also, remove exponential complexity for flexible types in approximation,
 note that more correct fix for this would be to introduce new types
 that corresponds just to platform types to avoid nullability problems,
 but due to complexity it will be done later

 #KT-31415 Fixed
2019-05-26 21:32:46 +03:00
Mikhail Zarechenskiy bbec3bf001 Fix exception on star import from typealias
#KT-30983 Fixed
2019-05-26 21:32:07 +03:00