Commit Graph

37600 Commits

Author SHA1 Message Date
Ivan Kochurkin 3dc0935da4 [FIR] Pass bounds from original type to fully expanded ^KT-40203 Fixed 2021-09-28 21:32:54 +03:00
Sergej Jaskiewicz f0f60907e2 [JS IR] Fix generating property accessors
TL;DR, before we were emitting this JS code:
  Object.defineProperty(Base.prototype, 'bar', {
    configurable: true,
    get: Base.prototype._get_bar__0_k$,
    set: Base.prototype._set_bar__a4enbm_k$
  });

Now we emit this code instead:
  Object.defineProperty(Base.prototype, 'bar', {
    configurable: true,
    get: function () {
      return this._get_bar__0_k$();
    },
    set: function (value) {
      this._set_bar__a4enbm_k$(value);
    }
  });

This fixes the issue where if we had a @JsExport'ed base class with a
public property overridden in a non-exported derived class, we couldn't
access that property from JS if we were given an instance of
the derived class.

#KT-41912 Fixed
2021-09-28 20:04:38 +03:00
Svyatoslav Kuzmich 841f5a583e [Wasm] Support wasm target in multiplatform plugin 2021-09-28 18:26:07 +03:00
Roman Artemev 070c64f9b5 [JS IR] Add descriptive error message for js("...") call
Report a message instead of NPE if `js("...")`` code couldn't be emitted
2021-09-28 18:15:57 +03:00
Roman Artemev 920daac0a2 [JS IR] Fix string literal folder in codegen for js("...") function
Support `val v = "S"` and plus (`v1 + v2`) cases

Fix KT-48941, KT-47360 and probably KT-42681
2021-09-28 18:15:55 +03:00
Roman Artemev f05c8ad953 [JS IR] Fix js("...") call checker in frontend.
Call mather relies on that BuiltIn package fragment implement specific
interface `BuiltInsPackageFragment` which was missed. Make sure that
BuiltIn module's package fragments implement that interface.

Fix progression optimizer symbols resolve in JS & WASM IR BE
2021-09-28 18:15:51 +03:00
Ilya Kirillov 7045e3ee45 Unmute passing FIR LC test 2021-09-28 14:19:15 +02:00
Vyacheslav Gerasimov 29787218e1 Build: Add proper kotlin-compiler-runner-unshaded for ide artifacts
Fixes tests in kt-212-master branch of kotlin plugin in
intellij-community repository
2021-09-28 13:42:31 +03:00
Dmitriy Novozhilov de7fb9606a Migrate all JDK 9 related tests to JDK 11 2021-09-28 13:01:47 +03:00
Dmitriy Novozhilov ce3562f0e8 Migrate all JDK 15 related tests to JDK 17 2021-09-28 13:01:45 +03:00
nataliya.valtman 452dfd6edd Use default performance manager for K2JVMCompiler 2021-09-28 09:20:50 +00:00
Mikhail Glukhikh 363680e4c9 Delay abstract class member forbiddance (see KT-45508) to 1.7 2021-09-28 11:17:42 +03:00
Dmitriy Novozhilov 4f7103b2a1 Add ApiVersion for 1.7 2021-09-28 10:16:51 +03:00
Roman Artemev 4073f177b4 [JS IR] Fix switch transformer in case of if as an expr
- Fix KT-43374
2021-09-27 19:01:43 +03:00
Ivan Kylchik cc934d9574 Support arguments' evaluation of primitive arrays in fir2ir transformer 2021-09-27 17:45:01 +03:00
Svyatoslav Kuzmich dd45714137 [Wasm] Add property reference stdlib part 2021-09-27 17:08:55 +03:00
Svyatoslav Kuzmich 5c05ff48ff [Wasm] Copy property reference lowering from K/N 2021-09-27 17:07:39 +03:00
Svyatoslav Kuzmich 33314b25c0 [Wasm] Add function interface replacer lowering
Replace function interface super types with runtime interfaces.
Needed for interface calls machinery.
2021-09-27 17:06:41 +03:00
Victor Petukhov ee728b6902 Use the new type inference for top-level callable reference resolution
^KT-47797 Fixed
^KT-47987 Fixed
^KT-45034 Fixed
^KT-48446 Fixed
^KT-13934 Fixed
2021-09-27 16:12:27 +03:00
Victor Petukhov ca13aea26a Creating resolved and resolution atoms for callable references 2021-09-27 16:12:25 +03:00
Victor Petukhov 5ec97093fa Propagate tracing strategy for creating callable reference arguments 2021-09-27 16:12:24 +03:00
Victor Petukhov 764361bc42 Format and remove unused imports and variables 2021-09-27 16:12:22 +03:00
Victor Petukhov 6a6695a173 Store SimpleTypeArgumentImpl type projection instead of type reference for better handling star projected type arguments 2021-09-27 16:12:21 +03:00
Victor Petukhov 8b85b4630b Write LHS resolution result into a call position 2021-09-27 16:12:20 +03:00
Victor Petukhov 2f4d02d011 Move util functions from KotlinToResolvedCallTransformer to resolvedCallUtil.kt 2021-09-27 16:12:18 +03:00
Victor Petukhov 3696bebb48 Introduce NewCallableReferenceResolvedCall and commonize other logic under NewAbstractResolvedCall 2021-09-27 16:12:17 +03:00
Victor Petukhov 65a8c9d89a Extract NewAbstractResolvedCall into separate file 2021-09-27 16:12:15 +03:00
Victor Petukhov fb3f3642f7 Extract NewVariableAsFunctionResolvedCallImpl into separate file 2021-09-27 16:12:14 +03:00
Victor Petukhov 1cc2d7c920 Extract NewResolvedCallImpl into separate file 2021-09-27 16:12:12 +03:00
Victor Petukhov 065d492066 Extract TrackingBindingTrace into separate file 2021-09-27 16:12:11 +03:00
Victor Petukhov f1803b49fe Extract KotlinCallKind into separate file 2021-09-27 16:12:09 +03:00
Victor Petukhov 4559558001 Extract SimpleCandidateFactory into separate file 2021-09-27 16:12:08 +03:00
Victor Petukhov 7b9ef0be12 Introduce ResolutionCandidate by commonization KotlinResolutionCandidate and CallableReferenceCandidate
Also introduced SimpleErrorResolutionCandidate
2021-09-27 16:12:06 +03:00
Victor Petukhov 08060aa036 Extract CallableReferencesCandidateFactory into separate file 2021-09-27 16:12:05 +03:00
Victor Petukhov 4fcb16b4c4 Extract CallableReferenceCandidate into separate file 2021-09-27 16:12:04 +03:00
Victor Petukhov dedac63a8c Extract KotlinResolutionCandidate into separate file 2021-09-27 16:12:03 +03:00
Victor Petukhov a264cbfe7d Move CallUtil.kt under the resolve.util package 2021-09-27 16:12:01 +03:00
Victor Petukhov 1635bcad10 Move CallResolverUtil.kt under the resolve.util package 2021-09-27 16:12:00 +03:00
Victor Petukhov 3e1b416a54 Move resolvedCallUtil.kt under the resolve.util package 2021-09-27 16:11:59 +03:00
Victor Petukhov 6082d681b6 Rename the old inference ResolutionCandidate to OldResolutionCandidate 2021-09-27 16:11:58 +03:00
Roman Artemev 623f273251 [JS IR] Fix external vararg if its argument is suspend call
- Fix KT-47811
2021-09-27 15:13:04 +03:00
Vyacheslav Gerasimov f91d6958a8 Build: Rework runtimeJar helper and drop redundant configuration
#KTI-559
2021-09-26 20:10:29 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Nikolay Lunyak 1a9f63efeb [FIR] Fix INSTANCE_ACCESS_BEFORE_SUPER_CALL 2021-09-24 16:50:51 +00:00
Nikolay Lunyak 9790b81f38 [FIR] Fix missing REDUNDANT_VISIBILITY_MODIFIER 2021-09-24 16:48:51 +00:00
Jinseong Jeon ad18343413 FIR: resolve types in accessors when not resolving accessors 2021-09-24 18:56:23 +03:00
Dmitry Petrov 9799ad7bd8 Make optimized loop over unsigned array, indices, withIndex JVM-specific 2021-09-24 12:12:43 +03:00
Dmitry Petrov be28b3c74d JVM_IR KT-29822 KT-48669 loop over unsigned array, indices, withIndex 2021-09-24 12:12:42 +03:00
Dmitry Petrov 2cc6b589f3 JVM_IR KT-48640 generate for-in-downTo as a counter loop 2021-09-24 12:12:41 +03:00
Ilya Goncharov 064744fae7 [JS IR] Remove redundant legacy property access property 2021-09-24 07:07:12 +00:00