Commit Graph

55027 Commits

Author SHA1 Message Date
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
Ilya Chernikov 61c1312f1a Add another method for fetching classpath from classloader, refactor 2019-05-25 10:10:27 +02:00
Alexander Udalov 55f4c067e2 Fix compilation of uast-kotlin-idea for 182
Caused by 4e15b95d17
2019-05-24 18:06:57 +02:00
Alexander Udalov 0fb33b82ff Fix compilation of uast-kotlin for 182
Caused by 4e15b95d17
2019-05-24 17:02:28 +02:00
Alexander Udalov 5812d28b80 Update ReadMe of kotilnx-metadata-jvm
- remove the requirement to use Bintray repo; kotlinx-metadata-jvm is
  published to Maven Central now
- remove the note about kotlin.Metadata being internal; it's public
  since 1.3
2019-05-24 14:42:26 +02:00
Alexander Udalov 15bfbf59a7 Minor, unmute MetadataSmokeTest.lambdaVersionRequirement 2019-05-24 14:42:26 +02:00
Alexander Udalov 3564f4ae40 Make KmExtensionType.klass private, add KmExtensionVisitor.type
Since the only use case of KmExtensionType in user code is checking if
it equals some other KmExtensionType instance, we'd like to hide as much
of its implementation details as possible, in case we want to change it
in the future
2019-05-24 14:42:26 +02:00
Alexander Udalov fd00999771 Render contracts in kotlinp, fix minor bug in kotlinx-metadata-jvm 2019-05-24 14:42:25 +02:00
Alexander Udalov 2a3786e3f8 Retain "is moved from interface companion" property flag in kotlinx-metadata-jvm
#KT-31338 Fixed
2019-05-24 14:42:25 +02:00
Alexander Udalov cfa3509860 Add loadJava/compiledKotlinWithStdlib tests to KotlinpCompilerTestDataTest 2019-05-24 14:42:25 +02:00
Alexander Udalov fe52f5fc7c Rename "desc" parameters in kotlinx-metadata-jvm to "signature" 2019-05-24 14:42:25 +02:00
Alexander Udalov 4e15b95d17 Minor, inline JvmAbi.DEFAULT_MODULE_NAME 2019-05-24 14:42:25 +02:00
Alexander Udalov 9e2733915b Add module name JVM extensions to class/package in kotlinx-metadata-jvm
#KT-31308 Fixed
2019-05-24 14:42:25 +02:00
Alexander Udalov 8ec466c2cc Fix compilation error in FlattenStringConcatenationLowering
See cf13293363 and 8dc34ae7b9, which were merged independently
2019-05-24 14:38:08 +02:00
Alexander Udalov 8dc34ae7b9 IR: rename {name,fqName}Safe -> {name,fqName}ForIrSerialization
These properties have a very specific detail in their behavior, in that
the constructor's name is set to be "<init>". While this is OK for the
IR serialization, this may not always be expected in other cases, and
their rather common names (`name`, `fqNameSafe`) suggested that these
properties could be used in generic contexts.

Change all usages outside IR serialization to use
`IrDeclarationWithName.name` and nullable
`IrDeclarationWithName.fqNameWhenAvailable` instead
2019-05-24 14:09:09 +02:00
Alexander Udalov 4e1effd065 Restore behavior in mapDefaultMethod for non-IR backend
Although the intention of the change 9894c216c1 (#2341) was sensible, it
unfortunately caused the type mapper to map a default method incorrectly
under certain _undiscovered_ circumstances, which leads to incorrect
bytecode being generated. Specifically, this led to an exception:

java.lang.NoSuchMethodError : org.jetbrains.kotlin.idea.debugger.evaluate.KotlinDebuggerCaches$Companion.compileCodeFragmentCacheAware$default(Lorg/jetbrains/kotlin/psi/KtCodeFragment;Lcom/intellij/debugger/SourcePosition;Lkotlin/jvm/functions/Function0;ZILjava/lang/Object;)Lkotlin/Pair;

in a developer branch where this class was refactored and moved to
another module. I was not able to determine the exact reason of this
error, so I'm workarounding it by limiting this change to the IR backend
only (where it's needed), and postponing the investigation of the
failure above for now.
2019-05-24 11:40:58 +02:00
Sergey Bogolepov cc26fd143e Shiny new shared version. 2019-05-24 12:39:55 +03:00