Commit Graph

55043 Commits

Author SHA1 Message Date
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
Ilya Chernikov 30c6147223 Get rid of UsefulTestCase to avoid dependencies, parallelize tests 2019-05-25 10:10:30 +02:00
Ilya Chernikov 8c7460451e [minor] fix some warnings 2019-05-25 10:10:30 +02:00
Ilya Chernikov 1dd197f201 Add missing scripting tests to the global task, make them parallel 2019-05-25 10:10:30 +02:00
Ilya Chernikov 29ba650c77 Fix main-kts script classpath calculation 2019-05-25 10:10:29 +02:00
Ilya Chernikov ea068e483c Implement JSR-223 functionality on top of the "new" REPL 2019-05-25 10:10:29 +02:00
Ilya Chernikov 46915df56f Implement "legacy" REPL wrappers on top of the "new" scripting infrastructure 2019-05-25 10:10:29 +02:00
Ilya Chernikov 010ae5326d Create core environment in test mode properly 2019-05-25 10:10:28 +02:00
Ilya Chernikov 89006f16cd Prepare scripting infrastructure for REPL:
- refactor script compiler to simplify extending it for repl
- add repl snippet compilation functions to the new scripting compiler
- extract util functions into appropriate files
- extract repl part into separate class
- extract bridge definition and related definitions into separate file
2019-05-25 10:10:28 +02:00
Ilya Chernikov a4c049d26e Replace message collector with reporting lambda
to simplify usages and slightly reduce dependencies
2019-05-25 10:10:28 +02:00