Commit Graph

55052 Commits

Author SHA1 Message Date
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
Mikhail Zarechenskiy b84b890250 Add tests to preserve current behavior for upcoming changes
##KT-30983 In Progress
2019-05-26 21:32:03 +03:00
Mikhail Zarechenskiy 5173d5e359 [NI] More accurate handle of capture types from subtyping
#KT-31520 Fixed
2019-05-26 21:31:59 +03:00
Mikhail Zarechenskiy cc29ca02f8 [NI] Don't loose inference session during property resolve
#KT-31620 Fixed
2019-05-26 21:31:54 +03:00
Ilya Chernikov e7c99cd494 Fix scripting-compiler tests, add them to the global scriptingTest task 2019-05-25 10:10:34 +02:00
Ilya Chernikov deb74acc88 [minor] fixes after review 2019-05-25 10:10:34 +02:00
Ilya Chernikov b97813f2b0 Implement test run on embeddable jars for jsr223 and scripting host tests...
also:
- add missing tests to the global scriptingTests task
- extract jsr223 tests into separate project
- fix dependency in jsr223 embeddable jar
2019-05-25 10:10:33 +02:00
Ilya Chernikov a3d1fe312e Refactor default JSR-223 engine implementation:
- rename classes for clarity
- sort out dependencies
- move common pars to jvm-host jar
- switch to configurations only customization
2019-05-25 10:10:33 +02:00
Ilya Chernikov 8cd5b11da5 Add evaluation context passing to the evaluation config refiners 2019-05-25 10:10:33 +02:00
Ilya Chernikov 5d8c2ae429 Fix dependencies to compiler in scripting modules 2019-05-25 10:10:32 +02:00
Ilya Chernikov 37d859c122 Move scripting jvm host tests to a separate project...
to solve problems with testing with direct dependency on proguarded compiler
2019-05-25 10:10:32 +02:00
Ilya Chernikov 1527ef7640 Drop dependencies to script-util from new scripting infrastructure 2019-05-25 10:10:32 +02:00
Ilya Chernikov 59dc546a54 Convert JvmGetScriptingClass to object to simplify (de)serialization 2019-05-25 10:10:31 +02:00
Ilya Chernikov 7ae2054cba Add a link to hostConfiguration from compilation and evaluation ones
also add possibility to supply functional defaults for keys in PropertiesCollection
2019-05-25 10:10:31 +02:00