Commit Graph

89 Commits

Author SHA1 Message Date
Roman Artemev d6bb1f2d4e [KLIB] Make KotlinLibraryImpl printable 2021-02-02 12:05:34 +03:00
Roman Artemev 8bc7866f01 [KLIB] Fix klib IO when accessing parent file 2021-01-27 09:48:57 +03:00
Roman Artemev 75016bf54d [Gradle, JS] Fix bridge between Gradle and Js IR CLI 2021-01-26 19:23:25 +03:00
Roman Artemev 37c7f60ae7 [KLIB] Fix issues between directory and .klib modes
- use .klib extension explicitly
 - fix issue with `module.klib.klib` names
2021-01-26 19:23:23 +03:00
Roman Artemev 697d4675a2 [KLIB] Improve klib debugging implementing KotlinLibrary.toString() 2021-01-26 19:23:23 +03:00
Igor Chevdar 03693e3d5a [klib] Optimized away some Files.exists() 2020-12-17 13:57:16 +05:00
Alexander Gorshenev eea5a9102c Bump klib abi version to 1.4.2 to reflect absence of serialized fake overrides 2020-11-09 16:02:14 +03:00
Alexander Gorshenev 5f2a963006 Better wording and comments for klib compatibility code 2020-11-06 16:19:43 +03:00
Alexander Gorshenev 891a4c4621 Dropped outdated klib version compatibility mechanisms 2020-11-06 16:19:43 +03:00
Alexander Gorshenev 8b2b36d61f Enabled klib abi version compatibility 2020-11-06 16:19:42 +03:00
LepilkinaElena ee8db2f760 Escape resolving same library several times in K/N (#3880) 2020-11-03 15:57:48 +03:00
Roman Artemev a4945878aa [KLIB] Pass containsErrorCode flag from library/IC cache into deserializer
- Make deserializer track whether error node are allowed.
2020-10-15 13:55:05 +03:00
Roman Artemev 28c6d17ab4 [KLIB] Mark klib that contains error with special flag 2020-10-15 13:55:05 +03:00
Alexander Udalov a810dbb41b IR: fix compiler warnings 2020-08-18 10:33:25 +02:00
Roman Artemev add0ad6733 [KLIB] Change KLIB IO API
- Use ReadBuffer instead of native java buffer
 - Use Weak buffers for File IO
 - fix klib memory leak for KT-40345
2020-08-03 19:22:06 +03:00
Alexander Gorshenev 2b2fce5949 Fix for KT-37761. Don't use mmap. It causes more troubles than it produce benefits 2020-06-22 14:53:25 +03:00
Ilya Matveev 03bb9138ad [klib] Create ZipFileSystem from a Path instead of an URI
Calling FileSystems.newFileSystem(URI, ...) throws a
FileSystemAlreadyExistsException if a ZipFileSystem for this
URI is already created. We still can use a single instance
of ZipFileSystem by calling FileSystems.getFileSystem. In
this case we use reference counting to determine when this
instance can be safely closed.

But we cannot count references if the same ZipFileSystem is used
from different class loaders. This patch fixes this issue by
creating a file system from Path instead of an URI. Contract of
FileSystemProvider.newFileSystem(Path, ...) doesn't imply throwing
FileSystemAlreadyExistsException.

Issue #KT-37443 fixed
2020-06-18 14:17:59 +00:00
Roman Artemev 44dfae53f0 [IR BE] Add runtime compilation benchmarks for IR JS compiler 2020-05-26 14:41:49 +03:00
Roman Artemev e6c855111e [KLIB] Add flag to select between per-file and monolithic layout 2020-05-26 14:41:49 +03:00
Kevin Most 4f26ac9a04 Fix "Koltin" typos throughout codebase (#3383)
* Fix "Koltin" typos throughout codebase

* Update K2MetadataKlibSerializer.kt
2020-05-20 15:12:32 +03:00
Nikolay Krasko 4230a17427 Revert "Force bootstrap stdlib in modules that used in composite build"
This reverts commit ad76562c
2020-04-27 15:58:38 +03:00
Nikolay Krasko ad76562cbc Force bootstrap stdlib in modules that used in composite build 2020-04-27 15:36:49 +03:00
Ilya Matveev 5f53986f47 [klibs] Allow resolving klibs which names are not valid file names 2020-04-19 19:08:43 +07:00
Roman Artemev 74132fbc03 [KLIB] Fix IO API
- Implement abstract IR raw data readers
 - Add file and memory based specializations of IR data readers
2020-04-14 11:12:07 +03:00
Dmitriy Dolovov d7226f4952 KLIB. Promote KLIB ABI version 2020-04-10 19:38:05 +07:00
Dmitriy Dolovov 101442ad14 KLIB: Store native targets in manifest 2020-04-10 19:33:27 +07:00
Dmitriy Dolovov 1b06256650 KLIB: Add 'native_targets' manifest property 2020-04-10 19:33:19 +07:00
Ilya Matveev ba6ca67e4f [Commonizer] Support short library names 2020-04-09 13:07:43 +07:00
Ilya Matveev 343e8c6f84 [KLIB] Add short_name to klib manifest
Fixes for KT-36720 and KT-36721 change a scheme that is used to generate
unique names for klibs: now we use "fully qualified" names that
include a group and a name of a library (e.g. org.jetbrains.kotlin.
native.posix).

But in some cases we still need short library names for Kotlin/Native.
For example to display platform libs in the IDE or to export some
symbols of a library to an ObjC framework.

This patch introduces a corresponding property to klib manifest.
2020-04-09 13:07:42 +07:00
Ilya Matveev f7f7d237e0 [KLIB] Support unpacked klibs with dots in names in ToolingResolve 2020-04-07 12:47:54 +07:00
Dmitriy Dolovov 4c6bddf6be KLIB: Fix reading property lists in Properties.propertyList()
1. If property is absent, or contains empty string or a string consisting only of whitespace characters, Properties.propertyList() should always return empty List<String>.
2. If property starts or ends with whitespace characters, Properties.propertyList() should not include empty-string values for whitespace prefix or suffix.
2020-04-06 21:36:26 +07:00
Dmitry Savvinov 6ccb8cd0a3 Properly check platform of klib by reading manifest 2020-03-23 15:38:11 +07:00
Sergey Bogolepov e919e7b79a [Gradle][Native][Cache] Don't skip metadata-based interop libraries
`resolveSingleFileKlib` by default doesn't support klibs with
non-default ir providers. In case of cache generation for native interop
libraries we need to override this behavior because they have
ir_provider=kotlin.native.cinterop.
2020-03-12 18:11:47 +07:00
Alexander Gorshenev b06a3ea5ac Print out abi version as a full triple 2020-03-10 12:06:59 +03:00
Alexander Gorshenev a635748848 Provide library producer compiler version in klib abi mismatch disagnostics 2020-03-10 12:06:59 +03:00
Alexander Gorshenev fac71ac812 Be prepared if in the future we extend klib abi version to a triple 2020-03-10 12:06:59 +03:00
Dmitry Savvinov b8b1dd753c Add builtins_platform property to klib manifest 2020-03-05 17:27:38 +03:00
Roman Artemev 46491c12ee [KLIB] Promote Klib ABI version 2020-02-14 18:22:16 +03:00
Roman Artemev a411549e38 [KLIB] Fix zipped layout 2020-02-14 18:22:16 +03: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
Dmitriy Dolovov 80eb148092 IDE: Fix ToolingSingleFileKlibResolveStrategy to recongnize klib archives
Issue #KT-36213
2020-02-01 17:07:18 +07:00
Dmitriy Dolovov ef199f8e45 Mark obsolete createKotlinLibrary() call as @Deprecated 2020-02-01 17:07:18 +07:00
Dmitriy Dolovov 1196044df7 Introduce 2 KLIB resolve strategies: "compiler" & "tooling"
Issue #KT-36213
2020-02-01 17:06:42 +07:00
Dmitriy Dolovov 1053428ee4 Minor: Formatted 2020-02-01 17:04:00 +07:00
Svyatoslav Kuzmich 091e8495cd [JS IR] Use util-klib tool to filter klib in JS IR gradle plugin 2020-01-29 15:22:07 +03:00
Georgy Bronnikov 47d6bdfd35 IR: add isProvidedByDefault() to SearchPathResolver 2020-01-28 12:19:43 +03:00
Alexander Gorshenev f58a6e054c Provide the same createKotlinLibrary even in multi-component situation 2020-01-27 20:21:32 +03:00
Alexander Gorshenev 19cbdb096f Fine tuned the single file klib resolver 2020-01-27 20:21:32 +03:00
Alexander Gorshenev fcce35c06f Move tools to resolveSingleFileKlib 2020-01-27 20:21:32 +03:00
Alexander Gorshenev 7390e74bbd Initial implementation of klib components 2020-01-27 20:21:32 +03:00