Commit Graph

328 Commits

Author SHA1 Message Date
Mikhail Bogdanov 7d54027f41 Minor. Rename new proto property, JvmFlags.getClassFlags method
Compiler requires this new flag to know where actual interface method body is generated to emit proper method calls
2020-04-09 07:37:33 +02:00
Mikhael Bogdanov ff8eac29a0 New flag in proto 2020-04-09 07:37:31 +02:00
Alexander Udalov fe5104b865 Move package org.jetbrains.kotlin.incremental.js to 'js.config'
This allows to replace dependency on 'js.frontend' with 'js.config', in
'kotlin-build-common' and 'daemon-common'. Also simplify some other
dependencies.
2020-03-28 21:30:05 +01:00
Roman Artemev 6a37955a36 [KLIB] Implement new linker based on IdSignature
- Remove klib dependency on metadata and uniqID
 - Refactored proto format to make it more effective and compact
  -- Use special encoding for some types of data (coordinates, flags, types)
  -- Remove symbols table
  -- Use packed proto list if it is possible
 - Remove extension from metadata
 - Remove special ids for function interfaces
 - Fix klib IO
 - Fix incremental cache
 - General code clean up
2020-02-14 18:22:16 +03:00
Mikhail Zarechenskiy c1db9b6d40 [NI] Fix incremental compilation for SAM adapters
This commit fixes test:
 - JavaUsedInKotlin.SamConversions#testMethodAddedSamAdapter
2020-02-13 11:16:00 +03:00
Nikolay Krasko 9d3d59fccb 201: Remove JpsPersistentHashMap (bunched) 2020-02-11 20:28:00 +03:00
Nikolay Krasko 162c2f3dc9 201: openapi.jar is removed 2020-02-11 20:27:59 +03:00
Alexander Udalov d4170bca6e Regenerate generated files after updating copyright year 2020-01-30 12:41:42 +01:00
Andrey Uskov e1d03e1f3a Open files leak on incremental compilation fixed
#KT-25206 Fixed
2020-01-23 20:47:18 +03:00
Alexey Tsvetkov 2d598d50d7 Expand compilation scope for IC before backend is run
Sometimes IC raises compilation errors when rebuild succeeds.
This happens because IC uses serialized decriptors
for non-dirty files. Serialized descriptors can be different
from source file descriptors. For example, a source file
may contain an implicit return type or an implicit visibility
for overridden methods, but serialized descriptors always
contain explicit return types & methods' visibilities.

These problems can be solved by expanding a scope of incremental compilation
just after the analysis, but before error reporting & code generation.
In other words, we need to compare descriptors before error reporting and code generation.
If there are new dirty files, current round of IC must be aborted,
next round must be performed with new dirty files.

This commit implements IC scope expansion for JS Klib compiler

    #KT-13677
    #KT-28233
2020-01-21 16:36:36 +03:00
Mikhail Zarechenskiy f7ce1c669b FIC: Introduce isFun property for descriptors and proto 2020-01-17 19:35:06 +03:00
Roman Artemev b11d69b719 [IC] Temporary restore removed method to fix proto comparison tests 2019-11-08 14:14:59 +03:00
Alexey Tsvetkov eb5e954e2a Minor: adjust formatting 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov d776e92111 Use Klib JS serializer protocol for IC 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov 6e9cd85b54 Exclude some proto messages from proto comparison in IC 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov ac9b7fa268 Exclude some proto fields from proto comparison in IC 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov 28e6219b0b Fix proto comparison for fields mapped to type table 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov c694752b4f Generate Klib JS extensions for proto comparison 2019-11-08 14:14:58 +03:00
Anton Bannykh ead8379c50 JS: add -Xmetadata-only flag for JS common code modules (KT-33142 fixed) 2019-09-27 19:12:03 +03:00
Nikolay Krasko edb700b898 Switch to 192 platform 2019-09-06 11:28:25 +03:00
Roman Artemev 3753b75609 [JS KLIB IC] Implement incremental cache for IR 2019-09-03 14:21:32 +03:00
Alexey Tsvetkov 8e6a80bed7 Add test logs specific for IC with JS IR
Incremental inline will be handled during lowerings,
after all klibs are generated
2019-08-15 15:11:52 +03:00
Alexander Udalov b970a57adb Generate version requirement on inline functions since API version 1.4
The old compiler will crash if it tries to inline a function that's
passing a lambda parameter into the new parameter null check method
`Intrinsics.checkNotNullParameter` because that usage is not considered as
inlinable by the old compiler (it only knows about
`Intrinsics.checkParameterIsNotNull`). Therefore we require that these
functions can only be read by compilers of version 1.3.50 or greater.

 #KT-22275 Fixed
2019-08-12 16:09:23 +02:00
Mikhail Mazurkevich 45644c224e JPS: Add temporary non caching jps storage for 192
This storage available under separate flag. Temporary non caching storage
should be removed after Intellij SDK version update.
2019-07-26 04:57:05 +03:00
Alexey Tsvetkov 4b9a852745 Sort source to output mapping before writing to caches
#KT-32902 Fixed
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov a4c62d156f Make lookup storage addAll order independent
Lookup storage output files could differ for projects
with different absolute paths.
This happened because, paths for lookups were
relativized only before writing to the underlying storage.
Storing absolute paths in a hash table could
result in different order of adding files to the lookup storage.
This commit fixes the issue by sorting lookups and files in
LookupStorage#addAll

    #KT-32674 Fixed
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov 57caca4b0e Improve exception message for directories comparison in tests
It was unclear what dirs were compared (e.g when rebuilding and
comparing caches dirs, it's not obvious which dir is "expected" and
which is "actual"). To improve this, compare resulting strings
with the placeholder for a root dir first. If the comparison fails,
then replace the placeholder with an actual directory and call
assertEquals.
2019-07-25 20:30:56 +03:00
Ilya Chernikov c08b88281c Remove accidetial usages of the internal jdk classes 2019-07-11 15:50:27 +02:00
Anton Bannykh e996705b45 JS: simplify package metadata cache invalidation 2019-06-03 15:53:00 +03:00
Anton Bannykh c3170d1908 JS: cache metadata, grouped by package FQN 2019-05-28 23:33:17 +03:00
Anton Bannykh 56915d1c07 JS: optimize JSON parser 2019-05-28 23:33:17 +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
Vadim Brilyantov 01a05a5495 Move daemon jar from compiler 2019-05-17 15:51:52 +03:00
Vadim Brilyantov ced973b707 Introduce new Kotlin Daemon without RMI abstraction 2019-05-17 15:51:51 +03:00
Alexey Tsvetkov 209a5d8464 Do not expose paths with placeholders in JS IC caches
#KT-31310 Fixed
2019-05-16 04:01:26 +03:00
Sergey Igushkin d456ae58b6 Remove usages of com.intellij.* utils from kotlin-build-common, KT-31106
As Gradle may under certain conditions reorder the buildscript
classpath artifacts, we need to ensure that the `kotlin-build-common`
module, which duplicates some of the classes that are shaded and packed
into `kotlin-compiler-embeddable`, does not call `com.intellij.*`
classes.

Replace the `com.intellij.*` utils that were called on the execution
path with our own implementations.

Issue #KT-31106 Fixed
2019-04-24 15:51:13 +03:00
nikita.movshin deb416484c Update copyright. Fix 2 lines comments after rebase
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
2019-04-23 20:15:03 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Alexey Tsvetkov 77d74a261d Rename SourceFileToPathConverter->FileToPathConverter 2019-04-22 15:27:58 +03:00
Alexey Tsvetkov a7df7e2f9f Sort files when performing GC in lookup storage 2019-04-22 15:27:56 +03:00
Alexey Tsvetkov 00de7b6c44 Allow customizing source file path conversion in lookup storage 2019-04-22 15:26:34 +03:00
Alexey Tsvetkov 79337a6b96 Allow customizing source file path conversion in local IC caches 2019-04-22 15:26:34 +03:00
Alexey Tsvetkov 146eebdc7e Print lookup storage as is in tests
This way it is easier to debug when
cache's content is different after rebuild
2019-04-22 15:26:34 +03:00
Mikhael Bogdanov dde28ddc52 Parallelize compiler tests 2019-04-18 13:24:58 +02:00
Dmitry Gridin 3bed360c98 Fix "Should be replaced with Kotlin function" warnings 2019-04-18 15:28:52 +07:00
Alexander Udalov 584137121b Do not write version requirements in metadata for lambdas
#KT-29790 Fixed
2019-03-12 18:53:08 +01:00
Alexander Udalov 59fda8d7ce Support JvmPackageName with JvmMultifileClass
This is an internal feature of our standard library needed to compile
new API for unsigned types
2019-03-06 15:34:23 +01:00
Roman Artemev a19bdd0c18 [JS IR BE] Refactored klibs proto files 2019-03-04 23:24:16 +03:00
Roman Artemev 52baf90518 Drop DebugJsAstProtoBuf 2019-03-04 23:24:15 +03:00
Vyacheslav Gerasimov a42f607ecf Build: Fix artifacts signing for maven central
With gradle > 5.0 `publish()` helper call should be done before
`noDefaultJar()` or any other artifact hacks, otherwise singing plugin doesn't sign any jars
2019-02-27 13:21:17 +03:00