Commit Graph

84096 Commits

Author SHA1 Message Date
Ivan Kochurkin 0fc8be4d60 [FIR] Implement OUTER_CLASS_ARGUMENTS_REQUIRED diagnostics 2021-07-15 19:02:40 +03:00
Yahor Berdnikau f7ed2f813d Exclude Gradle Kotlin runtime dependencies from 'no-arg' plugin.
This should remove warnings on multiple versions in build classpath
runtime.

^KT-47635 Fixed
2021-07-15 15:27:56 +00:00
Yahor Berdnikau 8db1c52c09 Exclude Gradle Kotlin runtime from 'sam-with-receiver' plugin.
This should remove warnings on multiple dependencies versions
in the build classpath runtime.

^KT-47636 Fixed
2021-07-15 15:27:24 +00:00
Mikhail Glukhikh 40c3c317b2 RawFirBuilder: optimize package name calculation in compiler mode 2021-07-15 12:46:23 +00:00
Ilya Goncharov dcc54101a7 [Gradle, JS] Add test with icremental JS Ir in parallel build 2021-07-15 11:42:48 +00:00
Svyatoslav Kuzmich a468792a19 [Wasm] Support Milestone 3 of V8 Wasm GC
Advance V8 version to 9.2.212

Relevant Wasm GC changes:
https://github.com/WebAssembly/gc/commit/f9f8ffa445c2c0fe4ac284a1d12a8c5477da4457
2021-07-15 10:59:06 +00:00
sebastian.sellmair 9500b2d36e [Commonizer] Add HierarchicalCInteropCallableAnnotationCommonizationTest.test single platform not marked as objc 2021-07-15 10:04:45 +00:00
sebastian.sellmair 17ed498390 [Commonizer] approximationKeys: Fix closing ] for type parameter types' upper bounds 2021-07-15 10:04:45 +00:00
sebastian.sellmair daa046589e [Commonizer] approximationKeys: Minor cleanup of buildApproximationSignature 2021-07-15 10:04:44 +00:00
sebastian.sellmair 2c8ce2539b [Commonizer] HierarchicalPropertyCommonizationTest: Add test property with and without setter 2021-07-15 10:04:43 +00:00
sebastian.sellmair 8bab6c3076 [Commonizer] Commonize 'val' and 'var' properties
If a setter is not present on all platforms a fallback private setter
shall be emitted.

^KT-47502 Verification Pending
^KT-47691 Verification Pending
2021-07-15 10:04:43 +00:00
sebastian.sellmair c4d90dc744 [Commonizer] Implement alis type substitution as CirNodeTransformer
This has the advantage, that the substitution only has to run on
functions or properties that are 'incomplete' (missing at least
one other target declaration)

^KT-47433 Verification Pending
2021-07-15 10:04:42 +00:00
sebastian.sellmair 7c450f9884 [Commonizer] Implement CirAliasTypeSubstitutor
This will substitute non-commonizable classifiers with known
type-aliases (which might be commonizable).

A simple example depending on this substitution comes from posix:
Most function and properties use the `FILE` typealias which
is available across all platforms.

Some linux platforms use `__IO_FILE` in their signature, which
is just linux specific. This type substitution will figure out, that
this type can be substituted with `FILE`.

^KT-47433 Verification Pending
2021-07-15 10:04:41 +00:00
sebastian.sellmair 906346b7d9 [Commonizer] Drop CirProperty interface for plain data class 2021-07-15 10:04:41 +00:00
sebastian.sellmair f0feca286e [Commonizer] Drop CirExtensionReceiver interface for plain data class 2021-07-15 10:04:40 +00:00
sebastian.sellmair fdee49ee59 [Commonizer] Drop CirTypeParameter interface for plain data class 2021-07-15 10:04:39 +00:00
sebastian.sellmair 4a4516731a [Commonizer] Drop CirValueParameter interface for plain class 2021-07-15 10:04:39 +00:00
sebastian.sellmair e246a12cd3 [Commonizer] Drop CirFunction interface for plain data class 2021-07-15 10:04:38 +00:00
sebastian.sellmair 0c32abed02 [Commonizer] Remove now unnecessary ArtificialCirDeclaration
This marker interface is not necessary anymore, since no new actuals
will be generated by the Commonizer. It was used to filter declarations
during the serializ
2021-07-15 10:04:37 +00:00
sebastian.sellmair e041532dd2 [Commonizer] InlineSourceBuilder: Also mark ModuleBuilder functions with InlineSourcesCommonizationTestDsl 2021-07-15 10:04:37 +00:00
sebastian.sellmair 87ac436a35 [Commonizer] Implement HierarchicalCInteropCallableAnnotationCommonizationTest 2021-07-15 10:04:36 +00:00
sebastian.sellmair 8acfeb3e17 [Commonizer] Remove computing signatures from metadata 2021-07-15 10:04:36 +00:00
sebastian.sellmair f3ff9814a8 [Commonizer] Create approximation keys based on Cir instead of metadata 2021-07-15 10:04:35 +00:00
sebastian.sellmair 09f9a1ce5b [Commonizer] Share Test: Commonizer / Light run configuration
This run configuration can be used to run only light weight/faster tests
2021-07-15 10:04:34 +00:00
Andrey Kuleshov 26a71af6b3 [Native, All platforms] HotFix of the incorrect parsing of long strings to Float and Double (#4492)
### What's done:
- Fixed incorrect logic of String.toFloat() and String.toDouble().
  Long string without any digits were treated as Float or Double:
  "this string does not look as float isn't it?".toFloat() == "Infinity".

- Fixed incorrect parsing of floating point constants "NaN" and "Infinity":
  String values like "NaNPICEZy" or "InfinityN" were treated as valid numbers.

- Merged parsing logic for Double and Float:
  Removed the code duplication, unified methods, made the code more Kotlin-like, not C++-like.

- Updated tests:
  Removed useless tests that checked nothing, updated tests with regression scenarios.
2021-07-15 14:47:55 +07:00
Sergey Bogolepov 118889add5 [K/N] Fix mingw_x86 compilation
It was broken in 9ed97a27f1.
2021-07-15 04:55:36 +00:00
Roman Artemev 447900c3f2 [K/N] Make sure all module names are uniq
In case of klib -> binary compilation there were two different modules
with the same. It breaks invariant about uniqueness if module name.
2021-07-15 03:09:46 +03:00
Georgy Bronnikov ba61700be6 Regenerate tests 2021-07-14 21:20:49 +03:00
Georgy Bronnikov 4af2aaedb1 IR, temporary: a simpler mangling for flexible types
Mangling for flexible types will need another look.
Complicated cases still do not work.
2021-07-14 21:20:48 +03:00
Georgy Bronnikov c3f4fcde0b JVM_IR: compute signatures for fake overrides of Java fields 2021-07-14 21:20:47 +03:00
Georgy Bronnikov 8c3386b607 IR: set file in declarationTable when serializing IR 2021-07-14 21:20:46 +03:00
Georgy Bronnikov 05a42b8cd5 IR: handle CompositeSignature in DescriptorByIdSignatureFinder 2021-07-14 21:20:45 +03:00
Georgy Bronnikov da946e464f Fix compilation after rebase: add debugInfo to JvmIr.proto 2021-07-14 21:20:43 +03:00
Georgy Bronnikov f4d358069c Fixes after rebase, not related to IrLibraryFile 2021-07-14 21:20:42 +03:00
Georgy Bronnikov 08b950fc2a JVM_IR: Supply fake file name to signatures of file local declarations 2021-07-14 21:20:41 +03:00
Georgy Bronnikov 225705a237 IR: do not serialize nonlocal initializers in inline-only mode 2021-07-14 21:20:40 +03:00
Georgy Bronnikov 28bff2ba4f JVM_IR: add test for calling monitorEnter/Exit from serialized code. 2021-07-14 21:20:38 +03:00
Georgy Bronnikov dffb22de9d JVM_IR: avoid duplication in declaration lists during deserialization 2021-07-14 21:20:36 +03:00
Georgy Bronnikov fa4efd3303 JVM_IR: fix deserialization of Java static field symbols 2021-07-14 21:20:35 +03:00
Georgy Bronnikov 955ee07517 IR: compute signature for scripts 2021-07-14 21:20:33 +03:00
Georgy Bronnikov 9d0c6fb157 IR: remove an overly optimistic assert 2021-07-14 21:20:32 +03:00
Georgy Bronnikov c3a94e1e62 FIR: adapt to changes in IR interface
JvmGeneratorExtensionsImpl, JvmIrCodegenFactory need new arguments.
2021-07-14 21:20:31 +03:00
Georgy Bronnikov 20b76d4149 JVM_IR: reorganize initialization of JvmGeneratorExtensionsImpl
CachedFields are now created at initialization.
Therefore we need CompilerConfiguration as a constructor parameter.
2021-07-14 21:20:30 +03:00
Georgy Bronnikov 7bbc04b6a2 JVM_IR: reconstruct fake overrides after IR deserialization.
We need to keep track of local signatures for deserialized symbols.
2021-07-14 21:20:29 +03:00
Georgy Bronnikov a63cc95a2a JVM_IR: untangle backend.jvm and serialization.jvm (again) 2021-07-14 21:20:28 +03:00
Georgy Bronnikov 1c4466951f IR: a flag to GeneratorExtensions to control IR deserialization
There is no need to search for IR embedded in toplevel classes when none
is expected (in npon-JVM backends or when -Xserialize-ir is not set).
2021-07-14 21:20:27 +03:00
Georgy Bronnikov ec1c97c684 JVM_IR: register builtin annotation constructors in SymbolTable
When deserializing IR, these annotations need to be visible.
2021-07-14 21:20:26 +03:00
Georgy Bronnikov 8d15a1d13d JVM_IR: use signatures in AbstractIrSerializeCompileKotlinAgainstInlineKotlinTest
Using signatures allows us to identify calls from a new module to an old
one.
2021-07-14 21:20:24 +03:00
Georgy Bronnikov 49619cda48 Restore Native compilation 2021-07-14 21:20:23 +03:00
Georgy Bronnikov 931733f8cc JVM_IR: deal with JvmStatic in imported IR 2021-07-14 21:20:22 +03:00