Commit Graph

59677 Commits

Author SHA1 Message Date
Roman Artemev ca0bff75cd [KLIB] Keep order of constant properties depending on backend
- Fix K/N performance regression
2019-12-03 16:20:52 +03:00
Vyacheslav Gerasimov 6ef3831f14 Build: Take parent directory as rootProject directory in case of buildSrc 2019-12-03 16:16:44 +03:00
Vyacheslav Gerasimov 462d6ac5b6 Build: Add remote build cache parameters for teamcity builds 2019-12-03 16:16:44 +03:00
Vyacheslav Gerasimov d3c1ef9251 Build: Use kotlin-build-gradle-plugin in buildSrc 2019-12-03 16:16:44 +03:00
Vyacheslav Gerasimov ab8542bbdb Build: Advance kotlin-build-gradle-plugin version to 0.0.2 2019-12-03 16:16:44 +03:00
Vyacheslav Gerasimov 46d77419a8 Build: Add build cache properties to kotlin-build-gradle-plugin 2019-12-03 16:16:44 +03:00
Vyacheslav Gerasimov ad79efeba3 Build: Use kotlin version embedded to gradle 2019-12-03 16:16:44 +03:00
Denis Zharkov fa7bd3dd2e FIR: Support SAM constructors for type aliases 2019-12-03 15:49:22 +03:00
Denis Zharkov ae01d050c9 FIR: Abstract parts for type alias constructors resolution
It's necessary to support combination of type aliases + SAM
2019-12-03 15:49:22 +03:00
Denis Zharkov fbe7db5471 FIR: Move constructor processing parts to a separate file 2019-12-03 15:49:22 +03:00
Denis Zharkov bf68e85a5c FIR: Support SAM conversion for interfaces containing Object methods 2019-12-03 15:49:22 +03:00
pyos 7cd55c85e6 JVM/JVM_IR: fix mapping of KClass in annotation classes
* JVM incorrectly mapped T<KClass<...>> to T<Class<...>> because the
   annotation-ness of the type mapping mode was inherited one level
   down into a generic signature independent of T

 * JVM_IR was even worse as it did not use VALUE_FOR_ANNOTATION at all,
   mapping T<T<KClass<...>> to T<T<Class<...>> as well.

The correct behavior is to map KClass to Class only at top level or as
an argument of Array.
2019-12-03 11:42:23 +01:00
Alexander Udalov f869be6a71 JVM IR: do not mangle synthetic methods with inline class parameters
For example, synthetic `$annotations` methods for properties were
previously mangled to `$annotations-...`, which breaks annotation
loader, and fails an assert in ClassCodegen.generateMethod.
2019-12-03 11:34:55 +01:00
Roman Golyshev 66ffdf1b2d KT-33979 KT-34150 Remove filtering overridden object members and nested objects
- ^KT-33979 Fixed
- ^KT-34150 Fixed
- Also, in extension completion check descriptor instance first
2019-12-03 13:29:30 +03:00
Alexander Udalov 2552540f71 IR: wrap exceptions and add file path in per-file lowerings
Also add file path to the wrapped exception in JVM IR codegen
2019-12-03 11:06:54 +01:00
Alexander Udalov fd627603a0 Refactor CompilationErrorHandler
It only had one implementation THROW_EXCEPTION, inline it everywhere
with a call to a static method
2019-12-03 10:48:34 +01:00
Dmitry Petrov 2435b8d9fa Update testData for enum constructor result type in IR 2019-12-03 11:54:41 +03:00
pyos 35c2573b33 PSI2IR: generate IrEnumConstructorCalls with correct return type
Normally, the fact that is was Unit was not visible as enum constructors
are lowered to normal class constructors anyway. The exception is when
the arguments are reordered, causing the incorrect return type to leak
into the block that holds temporary variables.
2019-12-03 11:54:41 +03:00
Denis Zharkov 145ad1a6fa FIR: Minor. Extract common parts in FirCallCompletionResultsWriterTransformer 2019-12-03 11:52:21 +03:00
Dmitriy Novozhilov 71bf8a14e8 [FIR] Make ConeTypeCheckerContext implements ConeInferenceContext 2019-12-03 11:36:34 +03:00
pyos 69033b7b15 JVM_IR: handle @JvmName on annotation getters 2019-12-03 10:53:49 +03:00
pyos ac7d9fa90d JVM_IR: implement -Xpolymorphic-signature 2019-12-03 08:31:46 +01:00
Mikhail Glukhikh fe6be0f436 Fix failed FIR multi-module test (forgotten test data update) 2019-12-03 10:25:53 +03:00
Igor Yakovlev 0ff77bd3c5 Add UL support for const fields initializers
Fixed #KT-34081
2019-12-02 20:41:47 +03:00
Victor Petukhov 775eb67219 NI: Add constraints which contain constraining type without projection
^KT-32243 Fixed
^KT-35172 Fixed
2019-12-02 19:42:18 +03:00
pyos 65cc0fa463 PSI2IR: have GeneratorExtensions implement StubGeneratorExtensions 2019-12-02 17:10:04 +01:00
pyos a950df3c80 PSI2IR: copy isPropertyWithPlatformField to GeneratorExtensions 2019-12-02 17:10:04 +01:00
Ilya Chernikov 3cae90dd26 [minor] fix source root creation from imported scripts:
make the usages of KotlinSourceRoot consistent everywhere
2019-12-02 16:46:55 +01:00
Ilya Chernikov f2a4a835e7 Improve script cli diagnostics 2019-12-02 16:46:55 +01:00
Ilya Chernikov 49de5e19fb Implement repl, script and expressions evaluation support in kotlin runner 2019-12-02 16:46:54 +01:00
Ilya Chernikov 531ff92791 Implement support for expression evaluation in jvm cli compiler 2019-12-02 16:46:54 +01:00
Ilya Chernikov 7bb9f97b11 Allow to separate top-level script declarations and statements with semicolon
This fix allows to write one-liner scripts like "val x = 3; println(x)", which
were previously rejected by the parser.
2019-12-02 16:46:54 +01:00
Ilya Chernikov b8034567ef Change script definition lookup key from File to ScriptSource
to make it more generic and allow easier implementation fo the
non-file based scripts.
2019-12-02 16:46:54 +01:00
Ilya Chernikov 615624802c Add kotlinx-html test
Among other things it tests the packagePartProvider fix above
2019-12-02 16:46:53 +01:00
Ilya Chernikov 4439582d23 Remove unnecessary update of the source roots, simplify interface accordingly
The update became unnecessary after the packagePartProvider fix above.
2019-12-02 16:46:53 +01:00
Ilya Chernikov 02a71d2cda Save updated roots before a packagePartProvider is created
Since the function createPackagePartProvider uses initialRoots for
creating packagePartsProvider, if the updateClasspath function
was called before createPackagePartProvider, the provider was created
with incomplete list of roots, that leaded to the unresolved top-level
functions.
Now if no providers are created yet, the initialRoots is updated.
This still may lead to the inconsistencies, when/if we'll have several
providers.
2019-12-02 16:46:53 +01:00
Ilya Chernikov a190ab260e Load main-kts jar automatically from scripting plugin, if available 2019-12-02 16:46:52 +01:00
Ilya Goncharov 22cb6fa836 [Gradle, JS] Fix case with null distribution 2019-12-02 17:44:26 +03:00
Ilya Goncharov c267357596 [Gradle, JS] Add distribution DSL 2019-12-02 17:44:26 +03:00
Ilya Goncharov fe9ddd9f22 [Gradle, JS] Check if resourcesDir exists and resourceDir is input directory 2019-12-02 17:44:26 +03:00
Ilya Goncharov 053469dcec [Gradle, JS] Copy index.html from resources to dist 2019-12-02 17:44:26 +03:00
Mikhael Bogdanov b9dee4e93a Remove assertion on sorted ranges: it could be empty if lambda doesn't contain any linenumber
#KT-35101 Fixed
2019-12-02 12:08:36 +01:00
Ilya Goncharov ae4a1e3cca [Gradle, JS] Fix check on Kotlin/JS modules from NPM in DCE
#KT-35198 fixed
2019-12-02 14:06:41 +03:00
Nikolay Krasko 0380380de4 More cleanups after tests execution 2019-12-02 13:29:37 +03:00
Nikolay Krasko 0cbb3a3956 Remove unused ProjectRootModificationTrackerFixer.kt 2019-12-02 13:29:37 +03:00
Nikolay Krasko c12599a045 Fix test data for testParamTypeLambdaMismatch in >= 192 2019-12-02 13:29:36 +03:00
Ilya Goncharov 408f958273 [Gradle, JS] Add idle run for debug node tests
Source maps can be loaded by NodeJS
2019-12-02 13:23:03 +03:00
Andrey Uskov 38de98429d Fix importing tests in bunch 183 2019-12-02 13:17:21 +03:00
Andrey Uskov 9643d5d28e Added import-resolve integration tests 2019-12-02 13:17:17 +03:00
Alexander Udalov e9946b21b5 JVM IR: do not hide constructor with inline class types and defaults
This corresponds to the ABI generated by the old backend. Moreover, when
compiling the module 'ir.tree' with JVM IR (could not reproduce on a
small sample), this led to a codegen crash when trying to reassign
parameter value to the default stub, which is an error expression and
can't be generated by ExpressionCodegen.
2019-12-02 10:19:55 +01:00