From ff70b837ee59d4d0564feed50ded9e4e1b5ae429 Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Mon, 13 Aug 2018 17:02:22 +0300 Subject: [PATCH] [JS IR BE] Support local delegated properties --- .../common/lower/PropertiesLowering.kt | 29 +++++++-- .../kotlin/ir/backend/js/compiler.kt | 1 + .../js/lower/CallableReferenceLowering.kt | 64 +++++++++++++++++++ .../inlineGenericFunCalledFromSubclass.kt | 1 - .../box/coroutines/inlineSuspendFunction.kt | 1 - .../box/coroutines/instanceOfContinuation.kt | 1 - .../codegen/box/coroutines/localDelegate.kt | 1 - .../stackUnwinding/inlineSuspendFunction.kt | 1 - .../suspendFunctionAsCoroutine/operators.kt | 1 - .../local/capturedLocalVal.kt | 1 - .../local/capturedLocalValNoInline.kt | 1 - .../local/capturedLocalVar.kt | 1 - .../local/capturedLocalVarNoInline.kt | 1 - .../delegatedProperty/local/inlineGetValue.kt | 1 - .../local/inlineOperators.kt | 1 - .../box/delegatedProperty/local/kt16864.kt | 1 - .../box/delegatedProperty/local/localVal.kt | 1 - .../local/localValNoExplicitType.kt | 1 - .../box/delegatedProperty/local/localVar.kt | 1 - .../local/localVarNoExplicitType.kt | 1 - .../provideDelegate/local.kt | 1 - .../provideDelegate/localCaptured.kt | 1 - .../localDifferentReceivers.kt | 1 - .../augmentedAssignmentsAndIncrements.kt | 1 - .../forIntInDownToWithNonConstBounds.kt | 1 - .../forInDownTo/forIntInNonOptimizedDownTo.kt | 1 - .../box/ranges/forInDownTo/forLongInDownTo.kt | 1 - .../forInDownTo/forNullableIntInDownTo.kt | 1 - .../ranges/forInUntil/forInUntilMinlong.kt | 1 - .../box/delegateProperty/capturedLocalVal.kt | 1 - .../capturedLocalValNoInline.kt | 1 - .../box/delegateProperty/capturedLocalVar.kt | 1 - .../capturedLocalVarNoInline.kt | 1 - .../testData/box/delegateProperty/localVal.kt | 1 - .../testData/box/delegateProperty/localVar.kt | 1 - .../box/delegateProperty/localVarInc.kt | 1 - .../delegateProperty/localVarPlusAssign.kt | 1 - .../unusedPropertyMetadata.kt | 1 - 38 files changed, 89 insertions(+), 40 deletions(-) diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/PropertiesLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/PropertiesLowering.kt index 1371fcbdfc9..ee87c4becb6 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/PropertiesLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/PropertiesLowering.kt @@ -8,14 +8,11 @@ package org.jetbrains.kotlin.backend.common.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.ir.IrStatement -import org.jetbrains.kotlin.ir.declarations.IrClass -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.IrFile -import org.jetbrains.kotlin.ir.declarations.IrProperty +import org.jetbrains.kotlin.ir.declarations.* +import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl import org.jetbrains.kotlin.ir.util.transformFlat import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid -import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.utils.addIfNotNull import java.util.* @@ -48,3 +45,25 @@ class PropertiesLowering : IrElementTransformerVoid(), FileLoweringPass { else null } + +class LocalDelegatedPropertiesLowering : IrElementTransformerVoid(), FileLoweringPass { + override fun lower(irFile: IrFile) { + irFile.accept(this, null) + } + + override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty): IrStatement { + declaration.transformChildrenVoid(this) + + val initializer = declaration.delegate.initializer!! + declaration.delegate.initializer = IrBlockImpl( + initializer.startOffset, initializer.endOffset, initializer.type, null, + listOfNotNull( + declaration.getter, + declaration.setter, + initializer + ) + ) + + return declaration.delegate + } +} diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt index 706936ebdf9..c6a3ba4b5d7 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt @@ -97,6 +97,7 @@ private fun JsIrBackendContext.lower(moduleFragment: IrModuleFragment) { moduleFragment.files.forEach(EnumClassLowering(this)::runOnFilePostfix) moduleFragment.files.forEach(EnumUsageLowering(this)::lower) moduleFragment.files.forEach(ReturnableBlockLowering(this)::lower) + moduleFragment.files.forEach(LocalDelegatedPropertiesLowering()::lower) moduleFragment.files.forEach(LocalDeclarationsLowering(this)::runOnFilePostfix) moduleFragment.files.forEach(InnerClassesLowering(this)::runOnFilePostfix) moduleFragment.files.forEach(InnerClassConstructorCallsLowering(this)::runOnFilePostfix) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt index 49a44e75c21..a0c7c44e3f3 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt @@ -82,6 +82,10 @@ class CallableReferenceLowering(val context: JsIrBackendContext) { collectedReferenceMap[makeCallableKey(expression.getter!!.owner, expression)] = expression } + override fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference) { + collectedReferenceMap[makeCallableKey(expression.getter!!.owner, expression)] = expression + } + override fun visitElement(element: IrElement) { element.acceptChildrenVoid(this) } @@ -111,6 +115,11 @@ class CallableReferenceLowering(val context: JsIrBackendContext) { expression.getter!!.owner, expression ) else emptyList() + + override fun visitLocalDelegatedPropertyReference( + expression: IrLocalDelegatedPropertyReference, + data: Nothing? + ) = lowerLocalKPropertyReference(expression) }, null) } } @@ -128,6 +137,12 @@ class CallableReferenceLowering(val context: JsIrBackendContext) { } ?: expression } + override fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference): IrExpression { + return callableToGetterFunction[makeCallableKey(expression.getter!!.owner, expression)]!!.let { + redirectToFunction(expression, it) + } + } + private fun redirectToFunction(callable: IrCallableReference, newTarget: IrFunction) = IrCallImpl( callable.startOffset, callable.endOffset, @@ -278,6 +293,55 @@ class CallableReferenceLowering(val context: JsIrBackendContext) { return additionalDeclarations + listOf(refGetFunction) } + private fun lowerLocalKPropertyReference(propertyReference: IrLocalDelegatedPropertyReference): List { + // transform + // ::bar -> + // Foo_bar_KreferenceGet() : KPropertyN { + // if ($cache$ == null) { + // val x = fun Foo_bar_KreferenceClosure_get(): PType { + // throw IllegalStateException() + // } + // x.get = x + // x.callableName = "bar" + // $cache$ = x + // } + // return $cache$ + // } + + val getterName = createPropertyClosureGetterName(propertyReference.descriptor) + val refGetFunction = buildGetFunction(propertyReference.getter.owner, propertyReference, getterName) + val getterFunction = buildClosureFunction(context.irBuiltIns.throwIseFun, refGetFunction, propertyReference) + + val additionalDeclarations = generateGetterBodyWithGuard(refGetFunction) { + val statements = mutableListOf() + + val getterFunctionType = context.builtIns.getFunction(getterFunction.valueParameters.size + 1) + val type = getterFunctionType.toIrType() + val irGetReference = JsIrBuilder.buildFunctionReference(type, getterFunction.symbol) + val irVarSymbol = JsSymbolBuilder.buildTempVar(refGetFunction.symbol, type) + + statements += JsIrBuilder.buildVar(irVarSymbol, irGetReference, type = type) + + statements += JsIrBuilder.buildCall(context.intrinsics.jsSetJSField.symbol).apply { + putValueArgument(0, JsIrBuilder.buildGetValue(irVarSymbol)) + putValueArgument(1, getterConst) + putValueArgument(2, JsIrBuilder.buildGetValue(irVarSymbol)) + } + + statements += JsIrBuilder.buildCall(context.intrinsics.jsSetJSField.symbol).apply { + putValueArgument(0, JsIrBuilder.buildGetValue(irVarSymbol)) + putValueArgument(1, callableNameConst) + putValueArgument(2, JsIrBuilder.buildString(context.irBuiltIns.stringType, getReferenceName(propertyReference.descriptor))) + } + + Pair(statements, irVarSymbol) + } + + callableToGetterFunction[makeCallableKey(propertyReference.getter.owner, propertyReference)] = refGetFunction + + return additionalDeclarations + listOf(refGetFunction) + } + private fun generateGetterBodyWithGuard( getterFunction: IrSimpleFunction, builder: () -> Pair, IrValueSymbol> diff --git a/compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt b/compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt index 18f62c9ba6b..23b2e755668 100644 --- a/compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt +++ b/compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt b/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt index 1cdc38ae603..0f7d8bf399c 100644 --- a/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt +++ b/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: NATIVE // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt b/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt index 74e8b4ec03d..cc1f00d71a4 100644 --- a/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt +++ b/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: NATIVE // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/coroutines/localDelegate.kt b/compiler/testData/codegen/box/coroutines/localDelegate.kt index 5810f0d9295..e35a7036c5f 100644 --- a/compiler/testData/codegen/box/coroutines/localDelegate.kt +++ b/compiler/testData/codegen/box/coroutines/localDelegate.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt b/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt index a94a8746ba2..82bb60ab926 100644 --- a/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt +++ b/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: NATIVE // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt index 576350516e5..22765622672 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt index 3dcc9b095d8..da644978336 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt index cc4bb36923c..74ccba552f7 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt index fa9cab2b47e..7bca5a35123 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt index f8b778ef22d..111946ff52d 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt b/compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt index 51379ee5b48..3a4e5e92a2b 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt b/compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt index 7ca7720195d..b40c32fd438 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt b/compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt index b6ae33e0db2..f7a9f75e007 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR object Whatever { operator fun getValue(thisRef: Any?, prop: Any?) = "OK" diff --git a/compiler/testData/codegen/box/delegatedProperty/local/localVal.kt b/compiler/testData/codegen/box/delegatedProperty/local/localVal.kt index 1f07e90b937..5248f40361f 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/localVal.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/localVal.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt b/compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt index b4893161c84..f90c9ebe307 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/localVar.kt b/compiler/testData/codegen/box/delegatedProperty/local/localVar.kt index 149528abac9..c0ef8b28763 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/localVar.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/localVar.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt b/compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt index 04bc356e166..f9f424b99ca 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR package foo import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt index ea4fbaabfb5..b8d396225f4 100644 --- a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt +++ b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt index 9270f763dc7..3b4a29db095 100644 --- a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt +++ b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt index 5ec11ab098f..f44e255b816 100644 --- a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt +++ b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt b/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt index ca1c24afa84..b94d14df1da 100644 --- a/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt +++ b/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // Enable when KT-14833 is fixed. // IGNORE_BACKEND: JVM import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt b/compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt index 8ce382e2f5a..1141a4d68c6 100644 --- a/compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt +++ b/compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt b/compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt index 29001982893..45214ff7d0e 100644 --- a/compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt b/compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt index 5221c4b3673..4d1e9793cce 100644 --- a/compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt +++ b/compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt b/compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt index 1ad7ae86992..26109378c1b 100644 --- a/compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt +++ b/compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt b/compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt index 7a4b24db936..865c6580f54 100644 --- a/compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt +++ b/compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt index 381615f04e5..35f6e7f15a0 100644 --- a/js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt +++ b/js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1114 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt index aa438b79b1f..377dc92eeb3 100644 --- a/js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt +++ b/js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1116 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt index caafd19150f..372d287ff1a 100644 --- a/js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt +++ b/js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1115 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt index 2233c54cc96..da4343f2410 100644 --- a/js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt +++ b/js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1118 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/localVal.kt b/js/js.translator/testData/box/delegateProperty/localVal.kt index 4db4bdd575b..b75c6601d6d 100644 --- a/js/js.translator/testData/box/delegateProperty/localVal.kt +++ b/js/js.translator/testData/box/delegateProperty/localVal.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1114 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/localVar.kt b/js/js.translator/testData/box/delegateProperty/localVar.kt index abe2c9fb302..b7aee217150 100644 --- a/js/js.translator/testData/box/delegateProperty/localVar.kt +++ b/js/js.translator/testData/box/delegateProperty/localVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1115 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/localVarInc.kt b/js/js.translator/testData/box/delegateProperty/localVarInc.kt index a7b369128e6..0724c02ea88 100644 --- a/js/js.translator/testData/box/delegateProperty/localVarInc.kt +++ b/js/js.translator/testData/box/delegateProperty/localVarInc.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1115 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt b/js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt index 33fb60b341e..fa82bb39644 100644 --- a/js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt +++ b/js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1115 //TODO: reuse same tests from JVM backend package foo diff --git a/js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt b/js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt index 09281b637d4..7d26c1832ba 100644 --- a/js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt +++ b/js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1131 // PROPERTY_NOT_USED: PropertyMetadata import kotlin.reflect.KProperty