diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrUtils.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrUtils.kt index b4ca9bc0f12..7c38fa2108e 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrUtils.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrUtils.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.backend.common.ir import org.jetbrains.kotlin.backend.common.CommonBackendContext import org.jetbrains.kotlin.backend.common.deepCopyWithVariables +import org.jetbrains.kotlin.backend.common.lower.createIrBuilder import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.descriptors.DescriptorVisibility @@ -699,3 +700,28 @@ fun IrExpression?.isPure( return false } + +fun CommonBackendContext.createArrayOfExpression( + startOffset: Int, endOffset: Int, + arrayElementType: IrType, + arrayElements: List +): IrExpression { + + val arrayType = ir.symbols.array.typeWith(arrayElementType) + val arg0 = IrVarargImpl(startOffset, endOffset, arrayType, arrayElementType, arrayElements) + + return IrCallImpl( + startOffset, + endOffset, + arrayType, + ir.symbols.arrayOf, + 1, + 1 + ).apply { + putTypeArgument(0, arrayElementType) + putValueArgument(0, arg0) + } +} + +fun IrBuiltIns.getKFunctionType(returnType: IrType, parameterTypes: List) = + kFunctionN(parameterTypes.size).typeWith(parameterTypes + returnType) \ No newline at end of file diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt index 158733cacc3..c0989855fb0 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt @@ -179,6 +179,12 @@ private val sharedVariablesLoweringPhase = makeWasmModulePhase( description = "Box captured mutable variables" ) +private val propertyReferenceLowering = makeWasmModulePhase( + ::WasmPropertyReferenceLowering, + name = "WasmPropertyReferenceLowering", + description = "Lower property references" +) + private val callableReferencePhase = makeWasmModulePhase( ::WasmCallableReferenceLowering, name = "WasmCallableReferenceLowering", @@ -454,6 +460,7 @@ val wasmPhases = NamedCompilerPhase( enumClassConstructorBodyLoweringPhase then sharedVariablesLoweringPhase then + propertyReferenceLowering then callableReferencePhase then localDelegatedPropertiesLoweringPhase then localDeclarationsLoweringPhase then diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmSymbols.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmSymbols.kt index 71b31c2b8fe..16310ae7dea 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmSymbols.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmSymbols.kt @@ -18,6 +18,8 @@ import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.types.defaultType +import org.jetbrains.kotlin.ir.types.IrType +import org.jetbrains.kotlin.ir.types.typeWith import org.jetbrains.kotlin.ir.util.SymbolTable import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -146,6 +148,21 @@ class WasmSymbols( val exportString = getInternalFunction("exportString") val unsafeGetScratchRawMemory = getInternalFunction("unsafeGetScratchRawMemory") + // KProperty implementations + val kLocalDelegatedPropertyImpl: IrClassSymbol = this.getInternalClass("KLocalDelegatedPropertyImpl") + val kLocalDelegatedMutablePropertyImpl: IrClassSymbol = this.getInternalClass("KLocalDelegatedMutablePropertyImpl") + val kProperty0Impl: IrClassSymbol = this.getInternalClass("KProperty0Impl") + val kProperty1Impl: IrClassSymbol = this.getInternalClass("KProperty1Impl") + val kProperty2Impl: IrClassSymbol = this.getInternalClass("KProperty2Impl") + val kMutableProperty0Impl: IrClassSymbol = this.getInternalClass("KMutableProperty0Impl") + val kMutableProperty1Impl: IrClassSymbol = this.getInternalClass("KMutableProperty1Impl") + val kMutableProperty2Impl: IrClassSymbol = this.getInternalClass("KMutableProperty2Impl") + val kMutableProperty0: IrClassSymbol = getIrClass(FqName("kotlin.reflect.KMutableProperty0")) + val kMutableProperty1: IrClassSymbol = getIrClass(FqName("kotlin.reflect.KMutableProperty1")) + val kMutableProperty2: IrClassSymbol = getIrClass(FqName("kotlin.reflect.KMutableProperty2")) + + val kTypeStub = getInternalFunction("kTypeStub") + private val functionNInterfaces = (0..22).map { arity -> getIrClass(FqName("kotlin.wasm.internal.Function$arity")) } @@ -187,4 +204,8 @@ class WasmSymbols( private fun getInternalFunction(name: String) = getFunction(name, wasmInternalPackage) private fun getIrClass(fqName: FqName): IrClassSymbol = symbolTable.referenceClass(getClass(fqName)) + private fun getInternalClass(name: String): IrClassSymbol = getIrClass(FqName("kotlin.wasm.internal.$name")) + fun getKFunctionType(type: IrType, list: List): IrType { + return irBuiltIns.functionN(list.size).typeWith(list + type) + } } \ No newline at end of file diff --git a/compiler/testData/codegen/box/callableReference/arrayConstructorArgument.kt b/compiler/testData/codegen/box/callableReference/arrayConstructorArgument.kt index 975187924e7..225dfe7850a 100644 --- a/compiler/testData/codegen/box/callableReference/arrayConstructorArgument.kt +++ b/compiler/testData/codegen/box/callableReference/arrayConstructorArgument.kt @@ -1,6 +1,4 @@ // WITH_RUNTIME -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES fun foo(it: Int) = "O"[it] val Int.foo: Char diff --git a/compiler/testData/codegen/box/callableReference/bound/array.kt b/compiler/testData/codegen/box/callableReference/bound/array.kt index 58ff770f459..54181a3c9aa 100644 --- a/compiler/testData/codegen/box/callableReference/bound/array.kt +++ b/compiler/testData/codegen/box/callableReference/bound/array.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS open class A { var f: String = "OK" } diff --git a/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt b/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt index 574504af81c..e83e406c73b 100644 --- a/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt +++ b/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES var result = "" class A { diff --git a/compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt b/compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt index c10403daed2..5ac36c2b1e5 100644 --- a/compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt +++ b/compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: IGNORED_IN_JS // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // TODO: investigate should it be ran for JS or not diff --git a/compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt b/compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt index 687d2dae3e8..a1190617170 100644 --- a/compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt +++ b/compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // KT-30629 abstract class BaseFragment { diff --git a/compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt b/compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt index 87359c44f22..eae8470aee7 100644 --- a/compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt +++ b/compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: CLASS_REFERENCES class Generic

(val p: P) class Host { diff --git a/compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt b/compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt index c5a7b0132db..a0005e9c7b0 100644 --- a/compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt +++ b/compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: UNKNOWN // SKIP_SOURCEMAP_REMAPPING fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/bound/multiCase.kt b/compiler/testData/codegen/box/callableReference/bound/multiCase.kt index 68fb7689e03..08af3dd78ca 100644 --- a/compiler/testData/codegen/box/callableReference/bound/multiCase.kt +++ b/compiler/testData/codegen/box/callableReference/bound/multiCase.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // IGNORE_BACKEND: NATIVE class A(var v: Int) { fun f(x: Int) = x * v diff --git a/compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt b/compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt index d3b540c5cae..a617d3b561d 100644 --- a/compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt +++ b/compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS val String?.ok: String get() = "OK" diff --git a/compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt b/compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt index d17561afaf4..819dfb5a7e7 100644 --- a/compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt +++ b/compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS fun box(): String { val f = "kotlin"::length val result = f.get() diff --git a/compiler/testData/codegen/box/callableReference/kt21014.kt b/compiler/testData/codegen/box/callableReference/kt21014.kt index f866e9a2c14..9e35ab30b22 100644 --- a/compiler/testData/codegen/box/callableReference/kt21014.kt +++ b/compiler/testData/codegen/box/callableReference/kt21014.kt @@ -1,8 +1,6 @@ // WITH_RUNTIME // IGNORE_BACKEND: JVM // IGNORE_LIGHT_ANALYSIS -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // JVM_TARGET: 1.8 // ^ This test causes SIGSEGV on JDK 1.6 with old back-end. diff --git a/compiler/testData/codegen/box/callableReference/kt21092a.kt b/compiler/testData/codegen/box/callableReference/kt21092a.kt index 579de21cd37..33078b1ce30 100644 --- a/compiler/testData/codegen/box/callableReference/kt21092a.kt +++ b/compiler/testData/codegen/box/callableReference/kt21092a.kt @@ -1,7 +1,5 @@ // IGNORE_BACKEND: JVM // WITH_RUNTIME -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES val T.foo get() = 42 diff --git a/compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt b/compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt index 0e36ed8a8d9..eb2a0728db2 100644 --- a/compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt +++ b/compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES abstract class Base { val result = "OK" } diff --git a/compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt b/compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt index 49a2bbc572e..c0f85eb309f 100644 --- a/compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt +++ b/compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - // WITH_RUNTIME // FILE: b.kt import a.A diff --git a/compiler/testData/codegen/box/callableReference/property/delegated.kt b/compiler/testData/codegen/box/callableReference/property/delegated.kt index 3eca56876f6..00b880be84e 100644 --- a/compiler/testData/codegen/box/callableReference/property/delegated.kt +++ b/compiler/testData/codegen/box/callableReference/property/delegated.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty val four: Int by NumberDecrypter diff --git a/compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt b/compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt index 07c0e5902be..3bc30b3c17d 100644 --- a/compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt +++ b/compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty var result: String by Delegate diff --git a/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt b/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt index 19e9b4d607e..10ccfbdee1e 100644 --- a/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt +++ b/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES enum class E { I } diff --git a/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt b/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt index 457cc7de547..455b69ae0cf 100644 --- a/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt +++ b/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES val Array.firstElement: String get() = get(0) fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/genericProperty.kt b/compiler/testData/codegen/box/callableReference/property/genericProperty.kt index 21d5e9a6646..1fc5510e830 100644 --- a/compiler/testData/codegen/box/callableReference/property/genericProperty.kt +++ b/compiler/testData/codegen/box/callableReference/property/genericProperty.kt @@ -1,6 +1,4 @@ // !LANGUAGE: -ForbidUsingExtensionPropertyTypeParameterInDelegate -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // IGNORE_BACKEND: NATIVE //For KT-6020 import kotlin.reflect.KProperty1 diff --git a/compiler/testData/codegen/box/callableReference/property/inEnum.kt b/compiler/testData/codegen/box/callableReference/property/inEnum.kt index f6c4a9e0b88..87ccf327b55 100644 --- a/compiler/testData/codegen/box/callableReference/property/inEnum.kt +++ b/compiler/testData/codegen/box/callableReference/property/inEnum.kt @@ -1,6 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES - import kotlin.reflect.KProperty1 class Q { diff --git a/compiler/testData/codegen/box/callableReference/property/inReceiverOfAnother.kt b/compiler/testData/codegen/box/callableReference/property/inReceiverOfAnother.kt index 28c8514afb1..930cad57a54 100644 --- a/compiler/testData/codegen/box/callableReference/property/inReceiverOfAnother.kt +++ b/compiler/testData/codegen/box/callableReference/property/inReceiverOfAnother.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS var x = "OK" class C(init: () -> String) { diff --git a/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt b/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt index 9d2aa3a56a9..617732ae7f0 100644 --- a/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt +++ b/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES var state = "" var topLevel: Int diff --git a/compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt b/compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt index 38bd1e3be89..0030d8026c3 100644 --- a/compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt +++ b/compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // Name of the getter should be 'getaBcde' according to JavaBean conventions var aBcde: Int = 239 diff --git a/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt b/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt index c1111cc124f..5ce636926d5 100644 --- a/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt +++ b/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty1 class A { diff --git a/compiler/testData/codegen/box/callableReference/property/kt12044.kt b/compiler/testData/codegen/box/callableReference/property/kt12044.kt index 52b0746aba6..ea43b14b545 100644 --- a/compiler/testData/codegen/box/callableReference/property/kt12044.kt +++ b/compiler/testData/codegen/box/callableReference/property/kt12044.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // KT-12044 Assertion "Rewrite at slice LEXICAL_SCOPE" for 'if' with property references fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt b/compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt index fe528d1d04a..7cabd9c6d65 100644 --- a/compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt +++ b/compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES class Foo { protected var x = 0 diff --git a/compiler/testData/codegen/box/callableReference/property/kt14330.kt b/compiler/testData/codegen/box/callableReference/property/kt14330.kt index 0b620b02ae9..43969a5fd1a 100644 --- a/compiler/testData/codegen/box/callableReference/property/kt14330.kt +++ b/compiler/testData/codegen/box/callableReference/property/kt14330.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES data class Foo(var bar: Int?) fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt b/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt index 9d363274aa6..d0acfccb0bd 100644 --- a/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt +++ b/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES var recivier : Any? = "fail" var value2 : Any? = "fail2" diff --git a/compiler/testData/codegen/box/callableReference/property/kt15447.kt b/compiler/testData/codegen/box/callableReference/property/kt15447.kt index 2185c258155..6d87564a2a7 100644 --- a/compiler/testData/codegen/box/callableReference/property/kt15447.kt +++ b/compiler/testData/codegen/box/callableReference/property/kt15447.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: STDLIB_LAZY //WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt b/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt index d520921eb76..06e81f0a0f1 100644 --- a/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt +++ b/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: STDLIB_COLLECTIONS // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt b/compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt index fc636768a96..d892efcba29 100644 --- a/compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt +++ b/compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES open class Base { open val foo = "Base" } diff --git a/compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt b/compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt index e43704b4c4d..0b3203d692e 100644 --- a/compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt +++ b/compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS class A { var value: String = "fail1" private set diff --git a/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt b/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt index ac74136d45d..8674d12a3a8 100644 --- a/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt +++ b/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KMutableProperty class Bar(name: String) { diff --git a/compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt b/compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt index dc5f6e97bb3..2a9e80b9fcd 100644 --- a/compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt +++ b/compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // See KT-12337 Reference to property with invisible setter should not be a KMutableProperty import kotlin.reflect.KProperty1 diff --git a/compiler/testData/codegen/box/callableReference/property/receiverEvaluatedOnce.kt b/compiler/testData/codegen/box/callableReference/property/receiverEvaluatedOnce.kt index 16a7fb64ad1..3a3a6668c03 100644 --- a/compiler/testData/codegen/box/callableReference/property/receiverEvaluatedOnce.kt +++ b/compiler/testData/codegen/box/callableReference/property/receiverEvaluatedOnce.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // WITH_REFLECT import kotlin.reflect.KProperty0 diff --git a/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt b/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt index 090f3f65234..28d7199fe8d 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES val String.id: String get() = this diff --git a/compiler/testData/codegen/box/callableReference/property/simpleMember.kt b/compiler/testData/codegen/box/callableReference/property/simpleMember.kt index 4daa2966d63..39bf36a0707 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleMember.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleMember.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES class A(val x: Int) fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt b/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt index d6ef602311e..e69cbbe72fc 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES var storage = 0 var Int.foo: Int diff --git a/compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt b/compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt index 56c397515f9..f7d815af3fc 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES data class Box(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt b/compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt index cf0738b84e6..46abcebe5f9 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES data class Box(val value: String) var pr = Box("first") diff --git a/compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt b/compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt index 05f9b3dfe56..818327da26f 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES data class Box(val value: String) val foo = Box("lol") diff --git a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt index b6ad12e5cc9..d2113f462cb 100644 --- a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt +++ b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS abstract class Base(val fn: () -> String) class Outer { diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt index 223826692e2..4807578c574 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES class Del(var x: T) { operator fun getValue(thisRef: Any?, kProp: Any) = x diff --git a/compiler/testData/codegen/box/dataClasses/dataClassWithManyFields.kt b/compiler/testData/codegen/box/dataClasses/dataClassWithManyFields.kt index 1fead1ebc0f..23801ce4545 100644 --- a/compiler/testData/codegen/box/dataClasses/dataClassWithManyFields.kt +++ b/compiler/testData/codegen/box/dataClasses/dataClassWithManyFields.kt @@ -1,6 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// Needs string concatenation lowering working via the stdlib StringBuilder. Otherwise fails with intermitten StackOverflow exception. -// WASM_MUTE_REASON: STDLIB_STRING_BUILDER data class DC( val d0: String = "", val d1: String = "", val d2: String = "", val d3: String = "", val d4: String = "", val d5: String = "", diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt b/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt index 0da0ab1c720..4553087103e 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS enum class X { B { diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt b/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt index bc65a5fa1d3..7a5f9272e42 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS enum class X { B { override val value = "OK" diff --git a/compiler/testData/codegen/box/fieldRename/delegates.kt b/compiler/testData/codegen/box/fieldRename/delegates.kt index 66078db13d3..0a29a513400 100644 --- a/compiler/testData/codegen/box/fieldRename/delegates.kt +++ b/compiler/testData/codegen/box/fieldRename/delegates.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty public open class TestDelegate(private val initializer: () -> T) { diff --git a/compiler/testData/codegen/box/inference/kt36446.kt b/compiler/testData/codegen/box/inference/kt36446.kt index 58f2a11b34a..06fbf4bb317 100644 --- a/compiler/testData/codegen/box/inference/kt36446.kt +++ b/compiler/testData/codegen/box/inference/kt36446.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +NewInference // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/inference/kt39824.kt b/compiler/testData/codegen/box/inference/kt39824.kt index bc520620caf..d9f620144f4 100644 --- a/compiler/testData/codegen/box/inference/kt39824.kt +++ b/compiler/testData/codegen/box/inference/kt39824.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: STDLIB_LAZY // WITH_RUNTIME fun diContext(context: C): DIContext = DIContext(TypeToken(), context) diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt index 7a9d36d6988..3308911e249 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt index 79bbdb1c176..5fd011aa0f4 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt index b8f36f83e6c..86cd84c0d0e 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt index 8510a2e312b..7db8b64f40a 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassInternalPrimaryVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassInternalPrimaryVal.kt index 733d8657a7b..c7477995ee7 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassInternalPrimaryVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassInternalPrimaryVal.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt index f35603ea2a0..3382c4148f3 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt index ffdd779d0d8..e585afa7e4e 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrivatePrimaryVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrivatePrimaryVal.kt index 6e95b380884..142b2b798eb 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrivatePrimaryVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrivatePrimaryVal.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt index 2281e95f11b..66c0e9572ca 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // !LANGUAGE: +InlineClasses // WITH_RUNTIME inline class Z(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt index 1381c3cc35d..17764bb1826 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME inline class Z(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt index 0f8ffea3ee2..e7942b503ce 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME inline class Z(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt b/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt index 30f53c6ceb1..2a43d97f524 100644 --- a/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt +++ b/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassPropertyReferenceGetAndSet.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassPropertyReferenceGetAndSet.kt index 197f7a6ed56..e75ce35c2bc 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassPropertyReferenceGetAndSet.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassPropertyReferenceGetAndSet.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/kt25750.kt b/compiler/testData/codegen/box/inlineClasses/kt25750.kt index aa6c36b049f..bdb0cd98ffe 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt25750.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt25750.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/captureLocalVarDelegatedToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/captureLocalVarDelegatedToInlineClass.kt index dfc34dc40d8..b677ce3ab9b 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/captureLocalVarDelegatedToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/captureLocalVarDelegatedToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses var setterInvoked = 0 diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClass.kt index 19773e2d633..8cfad98309d 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses class Foo { diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClassWithProvideDelegate.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClassWithProvideDelegate.kt index 986d7bfeef5..31533f625a6 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClassWithProvideDelegate.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClassWithProvideDelegate.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses class Foo { diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateCompanionVarToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateCompanionVarToInlineClass.kt index 8b4dfc0852a..0d8d8c78f4b 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateCompanionVarToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateCompanionVarToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses class Foo { diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateLocalVarToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateLocalVarToInlineClass.kt index 8bb46f4cfae..c676535dbfa 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateLocalVarToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateLocalVarToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses var setterInvoked = 0 diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateObjectVarToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateObjectVarToInlineClass.kt index a922e92f032..64880c7ee7a 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateObjectVarToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateObjectVarToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses object Foo { diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatePrivateCompanionVarToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatePrivateCompanionVarToInlineClass.kt index 7df0669e63a..386a83b8246 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatePrivateCompanionVarToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatePrivateCompanionVarToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses class Foo { diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateTopLevelVarToInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateTopLevelVarToInlineClass.kt index 72780aa35d6..8e71f010747 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateTopLevelVarToInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateTopLevelVarToInlineClass.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses var setterInvoked = 0 diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatedPropertyOfInlineClassType.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatedPropertyOfInlineClassType.kt index 5f17fc07444..f3f308eca92 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatedPropertyOfInlineClassType.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatedPropertyOfInlineClassType.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty inline class ICInt(val i: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt index ae5c8b8e209..17ac0d3d836 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // !LANGUAGE: +InlineClasses // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt42933.kt b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt42933.kt index 1578a826805..4c35beb672c 100644 --- a/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt42933.kt +++ b/compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt42933.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES class Delegate { operator fun getValue(t: Any?, p: Any): String = "OK" diff --git a/compiler/testData/codegen/box/ir/anonymousClassLeak.kt b/compiler/testData/codegen/box/ir/anonymousClassLeak.kt index f5edc88422f..00e6873f19d 100644 --- a/compiler/testData/codegen/box/ir/anonymousClassLeak.kt +++ b/compiler/testData/codegen/box/ir/anonymousClassLeak.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: STDLIB_LAZY // WITH_RUNTIME // MODULE: lib diff --git a/compiler/testData/codegen/box/ir/serializationRegressions/deepGenericDelegatedProperty.kt b/compiler/testData/codegen/box/ir/serializationRegressions/deepGenericDelegatedProperty.kt index 09397955ed5..82823f3dabc 100644 --- a/compiler/testData/codegen/box/ir/serializationRegressions/deepGenericDelegatedProperty.kt +++ b/compiler/testData/codegen/box/ir/serializationRegressions/deepGenericDelegatedProperty.kt @@ -1,6 +1,6 @@ // !LANGUAGE: -ForbidUsingExtensionPropertyTypeParameterInDelegate // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: IGNORED_IN_NATIVE // IGNORE_BACKEND: NATIVE // SKIP_MANGLE_VERIFICATION //For KT-6020 diff --git a/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt b/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt index af45d7c5381..35c75883e68 100644 --- a/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt +++ b/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt @@ -1,6 +1,4 @@ // !LANGUAGE: -ForbidUsingExtensionPropertyTypeParameterInDelegate -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // IGNORE_BACKEND: NATIVE //For KT-6020 diff --git a/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt b/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt index 939a462b86f..bde3c09d5c4 100644 --- a/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt +++ b/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES // Enable when KT-14833 is fixed. // IGNORE_BACKEND: JVM import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/properties/genericPropertyMultiModule.kt b/compiler/testData/codegen/box/properties/genericPropertyMultiModule.kt index f97b4aa6ed3..927aa65e546 100644 --- a/compiler/testData/codegen/box/properties/genericPropertyMultiModule.kt +++ b/compiler/testData/codegen/box/properties/genericPropertyMultiModule.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // WITH_RUNTIME // MODULE: lib // FILE: common.kt diff --git a/compiler/testData/codegen/box/properties/kt4383.kt b/compiler/testData/codegen/box/properties/kt4383.kt index d4b8fe6bfec..de2bfe7c943 100644 --- a/compiler/testData/codegen/box/properties/kt4383.kt +++ b/compiler/testData/codegen/box/properties/kt4383.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: UNIT_ISSUES import kotlin.reflect.KProperty class D { diff --git a/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt b/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt index 790cf9f42f9..008ef946010 100644 --- a/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt +++ b/compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty class Holder(var value: Int) { diff --git a/compiler/testData/codegen/box/regressions/objectInsideDelegation.kt b/compiler/testData/codegen/box/regressions/objectInsideDelegation.kt index 441b9b5161f..b1bca3b3e10 100644 --- a/compiler/testData/codegen/box/regressions/objectInsideDelegation.kt +++ b/compiler/testData/codegen/box/regressions/objectInsideDelegation.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: STDLIB_LAZY // WITH_RUNTIME val b: First by lazy { diff --git a/compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedPropertyReference.kt b/compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedPropertyReference.kt index 5febb1fb17e..dbfc3d7dac1 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedPropertyReference.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedPropertyReference.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: WASM // FILE: 1.kt package a diff --git a/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_property.kt b/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_property.kt index f36eb201c10..aa3df9c2daf 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_property.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_property.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - // FILE: a.kt package a diff --git a/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_property.kt b/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_property.kt index 10d148c2651..0dd6f54e4a0 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_property.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_property.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: WASM - // FILE: a.kt package a diff --git a/compiler/testData/codegen/box/typeMapping/kt3863.kt b/compiler/testData/codegen/box/typeMapping/kt3863.kt index 81c2d49e430..21b6b4acd63 100644 --- a/compiler/testData/codegen/box/typeMapping/kt3863.kt +++ b/compiler/testData/codegen/box/typeMapping/kt3863.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty // java.lang.VerifyError: (class: NotImplemented, method: get signature: (Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;) Unable to pop operand off an empty stack diff --git a/compiler/testData/codegen/box/typeMapping/kt3976.kt b/compiler/testData/codegen/box/typeMapping/kt3976.kt index 46cfe76a477..47110878e72 100644 --- a/compiler/testData/codegen/box/typeMapping/kt3976.kt +++ b/compiler/testData/codegen/box/typeMapping/kt3976.kt @@ -1,5 +1,3 @@ -// DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES import kotlin.reflect.KProperty // java.lang.ClassNotFoundException: kotlin.Nothing diff --git a/compiler/testData/codegen/box/unsignedTypes/kt25784.kt b/compiler/testData/codegen/box/unsignedTypes/kt25784.kt index e7dc0265f04..bd93ca7e1d5 100644 --- a/compiler/testData/codegen/box/unsignedTypes/kt25784.kt +++ b/compiler/testData/codegen/box/unsignedTypes/kt25784.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// WASM_MUTE_REASON: PROPERTY_REFERENCES +// WASM_MUTE_REASON: BINDING_RECEIVERS // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 1d9f0490218..52f80c67ff4 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -1474,6 +1474,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/callableReference/arrayConstructor.kt"); } + @TestMetadata("arrayConstructorArgument.kt") + public void testArrayConstructorArgument() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/arrayConstructorArgument.kt"); + } + @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/box/callableReference/arrayOf.kt"); @@ -1499,6 +1504,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/callableReference/inlineArrayConstructors.kt"); } + @TestMetadata("kt21014.kt") + public void testKt21014() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/kt21014.kt"); + } + + @TestMetadata("kt21092a.kt") + public void testKt21092a() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt"); + } + @TestMetadata("kt37604.kt") public void testKt37604() throws Exception { runTest("compiler/testData/codegen/box/callableReference/kt37604.kt"); @@ -1687,6 +1702,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/callableReference/bound/dontShareReceiver.kt"); } + @TestMetadata("emptyLHS.kt") + public void testEmptyLHS() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); + } + + @TestMetadata("genericBoundPropertyAsCrossinline.kt") + public void testGenericBoundPropertyAsCrossinline() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt"); + } + @TestMetadata("kt12738.kt") public void testKt12738() throws Exception { runTest("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); @@ -1697,6 +1722,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); } + @TestMetadata("multiCase.kt") + public void testMultiCase() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); + } + @TestMetadata("objectReceiver.kt") public void testObjectReceiver() throws Exception { runTest("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); @@ -2108,6 +2138,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); } + @TestMetadata("accessViaSubclass.kt") + public void testAccessViaSubclass() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); + } + @TestMetadata("accessorForPropertyWithPrivateSetter.kt") public void testAccessorForPropertyWithPrivateSetter() throws Exception { runTest("compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt"); @@ -2117,10 +2152,115 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/property"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("delegated.kt") + public void testDelegated() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/delegated.kt"); + } + + @TestMetadata("delegatedMutable.kt") + public void testDelegatedMutable() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); + } + + @TestMetadata("enumNameOrdinal.kt") + public void testEnumNameOrdinal() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); + } + + @TestMetadata("extensionToArray.kt") + public void testExtensionToArray() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); + } + + @TestMetadata("genericProperty.kt") + public void testGenericProperty() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); + } + + @TestMetadata("inEnum.kt") + public void testInEnum() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/inEnum.kt"); + } + + @TestMetadata("invokePropertyReference.kt") + public void testInvokePropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); + } + + @TestMetadata("javaBeanConvention.kt") + public void testJavaBeanConvention() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); + } + + @TestMetadata("kClassInstanceIsInitializedFirst.kt") + public void testKClassInstanceIsInitializedFirst() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); + } + + @TestMetadata("kt12044.kt") + public void testKt12044() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); + } + + @TestMetadata("kt12982_protectedPropertyReference.kt") + public void testKt12982_protectedPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); + } + + @TestMetadata("kt14330.kt") + public void testKt14330() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); + } + + @TestMetadata("kt14330_2.kt") + public void testKt14330_2() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); + } + @TestMetadata("localClassVar.kt") public void testLocalClassVar() throws Exception { runTest("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); } + + @TestMetadata("overriddenInSubclass.kt") + public void testOverriddenInSubclass() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); + } + + @TestMetadata("privateSetterInsideClass.kt") + public void testPrivateSetterInsideClass() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); + } + + @TestMetadata("simpleExtension.kt") + public void testSimpleExtension() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); + } + + @TestMetadata("simpleMember.kt") + public void testSimpleMember() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); + } + + @TestMetadata("simpleMutableExtension.kt") + public void testSimpleMutableExtension() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); + } + + @TestMetadata("simpleMutableMember.kt") + public void testSimpleMutableMember() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); + } + + @TestMetadata("simpleMutableTopLevel.kt") + public void testSimpleMutableTopLevel() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); + } + + @TestMetadata("simpleTopLevel.kt") + public void testSimpleTopLevel() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); + } } @TestMetadata("compiler/testData/codegen/box/callableReference/serializability") @@ -4069,6 +4209,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); } + @TestMetadata("forInDelegatedPropertyUpdatedInLoopBody.kt") + public void testForInDelegatedPropertyUpdatedInLoopBody() throws Exception { + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); + } + @TestMetadata("forInDoubleArrayWithUpcast.kt") public void testForInDoubleArrayWithUpcast() throws Exception { runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInDoubleArrayWithUpcast.kt"); @@ -4376,6 +4521,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); } + @TestMetadata("dataClassWithManyFields.kt") + public void testDataClassWithManyFields() throws Exception { + runTest("compiler/testData/codegen/box/dataClasses/dataClassWithManyFields.kt"); + } + @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { runTest("compiler/testData/codegen/box/dataClasses/genericParam.kt"); @@ -6252,6 +6402,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); } + @TestMetadata("delegates.kt") + public void testDelegates() throws Exception { + runTest("compiler/testData/codegen/box/fieldRename/delegates.kt"); + } + @TestMetadata("genericPropertyWithItself.kt") public void testGenericPropertyWithItself() throws Exception { runTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); @@ -7410,6 +7565,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inference/kt10822.kt"); } + @TestMetadata("kt36446.kt") + public void testKt36446() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt36446.kt"); + } + @TestMetadata("kt38664.kt") public void testKt38664() throws Exception { runTest("compiler/testData/codegen/box/inference/kt38664.kt"); @@ -7904,6 +8064,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/inlineClassInStringTemplate.kt"); } + @TestMetadata("inlineClassPropertyReferenceGetAndSet.kt") + public void testInlineClassPropertyReferenceGetAndSet() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassPropertyReferenceGetAndSet.kt"); + } + @TestMetadata("inlineClassValueCapturedInInlineLambda.kt") public void testInlineClassValueCapturedInInlineLambda() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/inlineClassValueCapturedInInlineLambda.kt"); @@ -7979,6 +8144,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/kt25246.kt"); } + @TestMetadata("kt25750.kt") + public void testKt25750() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt25750.kt"); + } + @TestMetadata("kt25771.kt") public void testKt25771() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt25771.kt"); @@ -8547,16 +8717,51 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionFun.kt"); } + @TestMetadata("inlineClassExtensionVal.kt") + public void testInlineClassExtensionVal() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt"); + } + + @TestMetadata("inlineClassInternalPrimaryVal.kt") + public void testInlineClassInternalPrimaryVal() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassInternalPrimaryVal.kt"); + } + @TestMetadata("inlineClassMemberFun.kt") public void testInlineClassMemberFun() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberFun.kt"); } + @TestMetadata("inlineClassMemberVal.kt") + public void testInlineClassMemberVal() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt"); + } + @TestMetadata("inlineClassPrimaryConstructor.kt") public void testInlineClassPrimaryConstructor() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryConstructor.kt"); } + @TestMetadata("inlineClassPrimaryVal.kt") + public void testInlineClassPrimaryVal() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt"); + } + + @TestMetadata("inlineClassPrivatePrimaryVal.kt") + public void testInlineClassPrivatePrimaryVal() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrivatePrimaryVal.kt"); + } + + @TestMetadata("inlineClassTypeMemberVar.kt") + public void testInlineClassTypeMemberVar() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt"); + } + + @TestMetadata("inlineClassTypeTopLevelVar.kt") + public void testInlineClassTypeTopLevelVar() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt"); + } + @TestMetadata("kt37986.kt") public void testKt37986() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/kt37986.kt"); @@ -8920,6 +9125,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/functionNameMangling/propertySetterWithInlineClassTypeArgument.kt"); } + @TestMetadata("reflectionForPropertyOfInlineClassType.kt") + public void testReflectionForPropertyOfInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt"); + } + @TestMetadata("syntheticAccessorForFunctionWithMangledName.kt") public void testSyntheticAccessorForFunctionWithMangledName() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/functionNameMangling/syntheticAccessorForFunctionWithMangledName.kt"); @@ -9185,6 +9395,61 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testAllFilesPresentInPropertyDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/propertyDelegation"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + + @TestMetadata("captureLocalVarDelegatedToInlineClass.kt") + public void testCaptureLocalVarDelegatedToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/captureLocalVarDelegatedToInlineClass.kt"); + } + + @TestMetadata("delegateClassVarToInlineClass.kt") + public void testDelegateClassVarToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClass.kt"); + } + + @TestMetadata("delegateClassVarToInlineClassWithProvideDelegate.kt") + public void testDelegateClassVarToInlineClassWithProvideDelegate() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateClassVarToInlineClassWithProvideDelegate.kt"); + } + + @TestMetadata("delegateCompanionVarToInlineClass.kt") + public void testDelegateCompanionVarToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateCompanionVarToInlineClass.kt"); + } + + @TestMetadata("delegateLocalVarToInlineClass.kt") + public void testDelegateLocalVarToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateLocalVarToInlineClass.kt"); + } + + @TestMetadata("delegateObjectVarToInlineClass.kt") + public void testDelegateObjectVarToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateObjectVarToInlineClass.kt"); + } + + @TestMetadata("delegatePrivateCompanionVarToInlineClass.kt") + public void testDelegatePrivateCompanionVarToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatePrivateCompanionVarToInlineClass.kt"); + } + + @TestMetadata("delegateTopLevelVarToInlineClass.kt") + public void testDelegateTopLevelVarToInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegateTopLevelVarToInlineClass.kt"); + } + + @TestMetadata("delegatedPropertyOfInlineClassType.kt") + public void testDelegatedPropertyOfInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/delegatedPropertyOfInlineClassType.kt"); + } + + @TestMetadata("kt27070.kt") + public void testKt27070() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt27070.kt"); + } + + @TestMetadata("kt42933.kt") + public void testKt42933() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/propertyDelegation/kt42933.kt"); + } } @TestMetadata("compiler/testData/codegen/box/inlineClasses/result") @@ -10104,6 +10369,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/serializationRegressions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("genericProperty.kt") + public void testGenericProperty() throws Exception { + runTest("compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt"); + } + @TestMetadata("innerClassInEnumEntryClass.kt") public void testInnerClassInEnumEntryClass() throws Exception { runTest("compiler/testData/codegen/box/ir/serializationRegressions/innerClassInEnumEntryClass.kt"); @@ -13078,6 +13348,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("augmentedAssignmentsAndIncrements.kt") + public void testAugmentedAssignmentsAndIncrements() throws Exception { + runTest("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); + } + @TestMetadata("classArtificialFieldInsideNested.kt") public void testClassArtificialFieldInsideNested() throws Exception { runTest("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); @@ -13313,6 +13588,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); } + @TestMetadata("primitiveOverrideDelegateAccessor.kt") + public void testPrimitiveOverrideDelegateAccessor() throws Exception { + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); + } + @TestMetadata("privateAccessorOfOverriddenProperty.kt") public void testPrivateAccessorOfOverriddenProperty() throws Exception { runTest("compiler/testData/codegen/box/properties/privateAccessorOfOverriddenProperty.kt"); @@ -16823,6 +17103,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/typeMapping/kt3286.kt"); } + @TestMetadata("kt3863.kt") + public void testKt3863() throws Exception { + runTest("compiler/testData/codegen/box/typeMapping/kt3863.kt"); + } + + @TestMetadata("kt3976.kt") + public void testKt3976() throws Exception { + runTest("compiler/testData/codegen/box/typeMapping/kt3976.kt"); + } + @TestMetadata("nothing.kt") public void testNothing() throws Exception { runTest("compiler/testData/codegen/box/typeMapping/nothing.kt"); diff --git a/libraries/stdlib/wasm/src/kotlin/reflect/KCallable.kt b/libraries/stdlib/wasm/src/kotlin/reflect/KCallable.kt index 15a8c0ec4f2..0450798e013 100644 --- a/libraries/stdlib/wasm/src/kotlin/reflect/KCallable.kt +++ b/libraries/stdlib/wasm/src/kotlin/reflect/KCallable.kt @@ -20,4 +20,10 @@ public actual interface KCallable { * the setter, similarly, will have the name "". */ actual public val name: String + + + /** + * The type of values returned by this callable. + */ + public val returnType: KType }