From 2e709a81fad9ca92674ef98f5e9668e145e86b3b Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Wed, 12 Sep 2018 14:31:22 +0300 Subject: [PATCH] [JS IR BE] Arrays, varargs --- .../kotlin/ir/backend/js/JsIntrinsics.kt | 48 +++++++ .../kotlin/ir/backend/js/compiler.kt | 35 +++-- .../lower/ArrayInlineConstructorLowering.kt | 73 +++++++++++ .../js/lower/IntrinsicifyCallsLowering.kt | 100 ++++++++++---- .../ir/backend/js/lower/VarargLowering.kt | 124 ++++++++++++++++++ .../js/lower/inline/FunctionInlining.kt | 5 +- .../ir/backend/js/lower/inline/ModuleIndex.kt | 14 +- .../IrElementToJsExpressionTransformer.kt | 46 +------ .../irToJs/JsIntrinsicTransformers.kt | 37 ++++++ .../IrBuiltinFunctionDescriptor.kt | 25 ++++ ...IrBuiltinsPackageFragmentDescriptorImpl.kt | 11 ++ .../ir/util/DeepCopyIrTreeWithSymbols.kt | 7 + .../kotlin/ir/util/DeepCopyTypeRemapper.kt | 30 ++++- .../jetbrains/kotlin/ir/util/SymbolTable.kt | 58 +++++++- .../box/arrays/arrayConstructorsSimple.kt | 1 - .../box/arrays/arrayGetAssignMultiIndex.kt | 1 - .../codegen/box/arrays/arrayGetMultiIndex.kt | 1 - .../codegen/box/arrays/arrayInstanceOf.kt | 1 - .../codegen/box/arrays/arrayPlusAssign.kt | 1 - .../accessArrayOfInlineClass.kt | 2 +- .../arrayOfInlineClassOfArrayOfInlineClass.kt | 2 +- .../arrays/collectionAssignGetMultiIndex.kt | 1 - .../box/arrays/collectionGetMultiIndex.kt | 1 - .../codegen/box/arrays/forEachBooleanArray.kt | 1 - .../codegen/box/arrays/forEachByteArray.kt | 1 - .../codegen/box/arrays/forEachCharArray.kt | 1 - .../codegen/box/arrays/forEachDoubleArray.kt | 1 - .../codegen/box/arrays/forEachFloatArray.kt | 1 - .../codegen/box/arrays/forEachIntArray.kt | 1 - .../codegen/box/arrays/forEachLongArray.kt | 1 - .../codegen/box/arrays/forEachShortArray.kt | 1 - .../genericArrayInObjectLiteralConstructor.kt | 1 - .../box/arrays/inProjectionAsParameter.kt | 1 - .../codegen/box/arrays/inProjectionOfArray.kt | 1 - .../codegen/box/arrays/inProjectionOfList.kt | 1 - .../testData/codegen/box/arrays/indices.kt | 1 - .../codegen/box/arrays/indicesChar.kt | 1 - .../testData/codegen/box/arrays/iterator.kt | 1 - .../box/arrays/iteratorBooleanArray.kt | 1 - .../codegen/box/arrays/iteratorByteArray.kt | 1 - .../box/arrays/iteratorByteArrayNextByte.kt | 1 - .../codegen/box/arrays/iteratorCharArray.kt | 1 - .../codegen/box/arrays/iteratorDoubleArray.kt | 1 - .../codegen/box/arrays/iteratorFloatArray.kt | 1 - .../codegen/box/arrays/iteratorIntArray.kt | 1 - .../codegen/box/arrays/iteratorLongArray.kt | 1 - .../box/arrays/iteratorLongArrayNextLong.kt | 1 - .../codegen/box/arrays/iteratorShortArray.kt | 1 - .../testData/codegen/box/arrays/kt1291.kt | 1 - .../testData/codegen/box/arrays/kt2997.kt | 1 - compiler/testData/codegen/box/arrays/kt33.kt | 1 - .../testData/codegen/box/arrays/kt3771.kt | 1 - .../testData/codegen/box/arrays/kt4348.kt | 1 - .../testData/codegen/box/arrays/kt4357.kt | 1 - compiler/testData/codegen/box/arrays/kt594.kt | 1 - .../testData/codegen/box/arrays/kt7009.kt | 1 - .../testData/codegen/box/arrays/kt7288.kt | 1 - compiler/testData/codegen/box/arrays/kt779.kt | 1 - compiler/testData/codegen/box/arrays/kt945.kt | 1 - .../codegen/box/arrays/longAsIndex.kt | 1 - .../box/arrays/multiArrayConstructors.kt | 1 - .../box/arrays/multiDecl/MultiDeclFor.kt | 1 - .../MultiDeclForComponentExtensions.kt | 1 - .../MultiDeclForComponentMemberExtensions.kt | 1 - ...nentMemberExtensionsInExtensionFunction.kt | 1 - .../multiDecl/MultiDeclForValCaptured.kt | 1 - .../int/MultiDeclForComponentExtensions.kt | 1 - ...tiDeclForComponentExtensionsValCaptured.kt | 1 - .../MultiDeclForComponentMemberExtensions.kt | 1 - ...nentMemberExtensionsInExtensionFunction.kt | 1 - .../codegen/box/arrays/multiDecl/kt15560.kt | 1 - .../codegen/box/arrays/multiDecl/kt15568.kt | 1 - .../codegen/box/arrays/multiDecl/kt15575.kt | 1 - .../long/MultiDeclForComponentExtensions.kt | 1 - ...tiDeclForComponentExtensionsValCaptured.kt | 1 - .../MultiDeclForComponentMemberExtensions.kt | 1 - ...nentMemberExtensionsInExtensionFunction.kt | 1 - .../arrays/nonLocalReturnArrayConstructor.kt | 1 - .../codegen/box/arrays/nonNullArray.kt | 1 - .../codegen/box/arrays/primitiveArrays.kt | 1 - .../testData/codegen/box/arrays/stdlib.kt | 1 - .../codegen/box/boxingOptimization/fold.kt | 1 - .../codegen/box/boxingOptimization/kt6842.kt | 1 - .../boxingOptimization/taintedValuesBox.kt | 1 - .../box/boxingOptimization/unsafeRemoving.kt | 1 - .../codegen/box/bridges/complexTraitImpl.kt | 1 - .../testData/codegen/box/bridges/kt2498.kt | 1 - .../noBridgeOnMutableCollectionInheritance.kt | 1 - .../extendJavaCollections/arrayList.kt | 1 - .../callableReference/bound/coercionToUnit.kt | 1 - .../box/callableReference/bound/emptyLHS.kt | 1 - .../property/extensionToArray.kt | 1 - .../varargAndDefaults/varargViewedAsArray.kt | 1 - .../casts/intersectionTypeMultipleBounds.kt | 1 - .../box/casts/intersectionTypeSmartcast.kt | 1 - .../testData/codegen/box/casts/kt22714.kt | 1 - .../vararg.kt | 1 - .../codegen/box/classLiteral/bound/simple.kt | 1 - .../box/classes/initializerBlockDImpl.kt | 1 - .../testData/codegen/box/classes/kt1018.kt | 1 - .../testData/codegen/box/classes/kt1980.kt | 1 - .../testData/codegen/box/classes/kt2391.kt | 1 - .../testData/codegen/box/classes/kt343.kt | 1 - .../testData/codegen/box/classes/kt471.kt | 1 - .../testData/codegen/box/classes/kt633.kt | 1 - .../testData/codegen/box/classes/kt8011.kt | 1 - .../testData/codegen/box/classes/kt940.kt | 1 - .../box/classes/overloadBinaryOperator.kt | 1 - .../codegen/box/classes/overloadPlusAssign.kt | 1 - .../box/classes/overloadPlusAssignReturn.kt | 1 - .../box/classes/overloadPlusToPlusAssign.kt | 1 - .../box/classes/overloadUnaryOperator.kt | 1 - .../outerCapturedInInlineLambda.kt | 1 - .../outerCapturedInInlineLambda2.kt | 1 - .../withCoroutines.kt | 1 - .../withCoroutinesNoStdLib.kt | 1 - .../propertyAndFunctionNameClash.kt | 1 - .../breakContinueInExpressions/kt17384.kt | 1 - .../box/controlStructures/continueInExpr.kt | 1 - .../box/controlStructures/continueInFor.kt | 1 - .../continueInForCondition.kt | 1 - .../controlStructures/continueToLabelInFor.kt | 1 - .../codegen/box/controlStructures/doWhile.kt | 1 - .../box/controlStructures/forArrayList.kt | 1 - .../forArrayListMultiDecl.kt | 1 - .../forInArraySpecializedToUntil.kt | 1 - ...ArrayWithArrayPropertyUpdatedInLoopBody.kt | 1 - ...rInArrayWithArrayVarUpdatedInLoopBody13.kt | 1 - ...forInDelegatedPropertyUpdatedInLoopBody.kt | 1 - .../forInArray/forInFieldUpdatedInLoopBody.kt | 1 - .../forInArray/forIntArray.kt | 1 - .../forInArray/forNullableIntArray.kt | 1 - .../forInArray/forPrimitiveIntArray.kt | 1 - .../forInArrayOfPrimArrayWithIndex.kt | 1 - ...orInArrayWithIndexContinuesAsUnmodified.kt | 1 - .../forInArrrayWithIndexNoElementVar.kt | 1 - .../forInArrrayWithIndexNoIndexVar.kt | 1 - ...thIndexWithExplicitlyTypedIndexVariable.kt | 1 - .../forInByteArrayWithIndexWithSmartCast.kt | 1 - .../forInByteArrrayWithIndex.kt | 1 - .../forInEmptyArrrayWithIndex.kt | 1 - .../forInGenericArrayOfIntsWithIndex.kt | 1 - ...enericArrayOfIntsWithIndexWithSmartCast.kt | 1 - .../forInGenericArrayWithIndex.kt | 1 - .../forInIntArrayWithIndexWithSmartCast.kt | 1 - .../forInIntArrrayWithIndex.kt | 1 - .../forInObjectArrrayWithIndex.kt | 1 - .../forInShortArrayWithIndexWithSmartCast.kt | 1 - .../forInShortArrrayWithIndex.kt | 1 - .../forInListWithIndex.kt | 1 - .../forInListWithIndexNoElementVar.kt | 1 - .../forInListWithIndexNoIndexVar.kt | 1 - ...thIndexWithExplicitlyTypedIndexVariable.kt | 1 - .../forInSequenceWithIndex.kt | 1 - .../forInSequenceWithIndexNoElementVar.kt | 1 - .../forInSequenceWithIndexNoIndexVar.kt | 1 - ...thIndexWithExplicitlyTypedIndexVariable.kt | 1 - .../forInSmartCastToArray.kt | 1 - .../codegen/box/controlStructures/kt3273.kt | 1 - .../tryCatchAfterWhileTrue.kt | 1 - .../box/coroutines/asyncIteratorToList.kt | 1 - .../testData/codegen/box/coroutines/await.kt | 1 - .../coroutines/controlFlow/breakFinally.kt | 1 - .../coroutines/controlFlow/breakStatement.kt | 1 - .../box/coroutines/controlFlow/forContinue.kt | 1 - .../coroutines/controlFlow/forStatement.kt | 1 - .../box/coroutines/controlFlow/forWithStep.kt | 1 - .../box/coroutines/controlFlow/ifStatement.kt | 1 - .../coroutines/controlFlow/switchLikeWhen.kt | 1 - .../breakWithNonEmptyStack.kt | 1 - .../featureIntersection/tailrec/extention.kt | 1 - .../codegen/box/coroutines/handleException.kt | 1 - .../box/coroutines/inlinedTryCatchFinally.kt | 1 - .../loadFromBooleanArray.kt | 1 - .../intLikeVarSpilling/loadFromByteArray.kt | 1 - .../box/coroutines/iterateOverArray.kt | 1 - .../codegen/box/coroutines/kt12958.kt | 1 - .../codegen/box/coroutines/kt25912.kt | 2 +- .../codegen/box/coroutines/nestedTryCatch.kt | 1 - .../nonLocalReturnFromInlineLambdaDeep.kt | 1 - .../handleException.kt | 1 - .../inlineTwoReceivers.kt | 1 - .../noinlineTwoReceivers.kt | 1 - .../inlineWithoutStateMachine.kt | 1 - .../tailCallOptimizations/tryCatch.kt | 1 - .../tryCatchFinallyWithHandleResult.kt | 1 - .../coroutines/tryCatchWithHandleResult.kt | 1 - .../coroutines/tryFinallyWithHandleResult.kt | 1 - .../unitTypeReturn/coroutineNonLocalReturn.kt | 1 - .../box/coroutines/varSpilling/kt19475.kt | 1 - .../codegen/box/dataClasses/arrayParams.kt | 1 - .../box/dataClasses/equals/genericarray.kt | 1 - .../box/dataClasses/equals/intarray.kt | 1 - .../box/dataClasses/multiDeclarationFor.kt | 1 - .../stdlibUsages.kt | 1 - .../withIndexed.kt | 1 - .../codegen/box/extensionFunctions/kt1953.kt | 1 - .../box/extensionFunctions/kt1953_class.kt | 1 - .../codegen/box/extensionFunctions/kt475.kt | 1 - .../codegen/box/extensionFunctions/kt865.kt | 1 - .../codegen/box/extensionProperties/kt9897.kt | 1 - .../extensionProperties/kt9897_topLevel.kt | 1 - .../testData/codegen/box/functions/kt3214.kt | 1 - .../equalsNaN_properIeeeComparisons.kt | 1 - .../codegen/box/increment/arrayElement.kt | 1 - .../codegen/box/increment/memberExtOnLong.kt | 1 - .../box/increment/mutableListElement.kt | 1 - ...oxUnboxInlineClassesWithOperatorsGetSet.kt | 1 - ...callComputablePropertyInsideInlineClass.kt | 1 - ...checkBoxingForNonLocalAndLabeledReturns.kt | 1 - .../computablePropertyInsideInlineClass.kt | 1 - ...tyForBoxesOfNullableValuesOfInlineClass.kt | 2 +- .../iterateOverArrayOfInlineClassValues.kt | 1 - .../iterateOverListOfInlineClassValues.kt | 1 - .../codegen/box/inlineClasses/kt25246.kt | 2 +- .../codegen/box/inlineClasses/kt26103.kt | 2 +- .../kt26103_covariantUnderlyingType.kt | 2 +- .../inlineClasses/passInlineClassAsVararg.kt | 1 - ...sInlineClassWithSpreadOperatorToVarargs.kt | 1 - .../secondaryConstructorWithVararg.kt | 2 +- ...sideInlineClassWithPrimitiveCarrierType.kt | 2 +- .../objectExtendsClassVararg.kt | 1 - .../box/intrinsics/rangeFromCollection.kt | 1 - .../testData/codegen/box/jdk/arrayList.kt | 1 - compiler/testData/codegen/box/jdk/kt1397.kt | 1 - .../box/lazyCodegen/safeCallAndArray.kt | 1 - .../localClasses/closureOfInnerLocalClass.kt | 1 - .../closureOfLambdaInLocalClass.kt | 1 - .../ownClosureOfInnerLocalClass.kt | 1 - .../box/multiDecl/forIterator/MultiDeclFor.kt | 1 - .../MultiDeclForComponentExtensions.kt | 1 - .../MultiDeclForComponentMemberExtensions.kt | 1 - ...nentMemberExtensionsInExtensionFunction.kt | 1 - .../forIterator/MultiDeclForValCaptured.kt | 1 - .../MultiDeclForComponentExtensions.kt | 1 - ...tiDeclForComponentExtensionsValCaptured.kt | 1 - .../MultiDeclForComponentMemberExtensions.kt | 1 - ...nentMemberExtensionsInExtensionFunction.kt | 1 - .../UnderscoreNamesDontCallComponent.kt | 1 - ...ssToExtensionPropertyImportedFromObject.kt | 1 - ...ArrayAccessToPropertyImportedFromObject.kt | 1 - .../objectVsClassInitialization_kt5291.kt | 1 - .../augmentedAssignmentWithArrayLHS.kt | 1 - .../compareTo/extensionArray.kt | 1 - .../box/operatorConventions/plusExplicit.kt | 1 - .../codegen/box/optimizations/kt20844.kt | 1 - .../referenceWithTheSameNameAsPackage.kt | 1 - .../box/platformTypes/primitives/assign.kt | 1 - .../box/platformTypes/primitives/compareTo.kt | 1 - .../box/platformTypes/primitives/dec.kt | 1 - .../box/platformTypes/primitives/div.kt | 1 - .../box/platformTypes/primitives/equals.kt | 1 - .../box/platformTypes/primitives/hashCode.kt | 1 - .../box/platformTypes/primitives/inc.kt | 1 - .../box/platformTypes/primitives/minus.kt | 1 - .../box/platformTypes/primitives/mod.kt | 1 - .../box/platformTypes/primitives/not.kt | 1 - .../box/platformTypes/primitives/notEquals.kt | 1 - .../box/platformTypes/primitives/plus.kt | 1 - .../platformTypes/primitives/plusAssign.kt | 1 - .../box/platformTypes/primitives/rangeTo.kt | 1 - .../box/platformTypes/primitives/times.kt | 1 - .../box/platformTypes/primitives/toShort.kt | 1 - .../box/platformTypes/primitives/toString.kt | 1 - .../platformTypes/primitives/unaryMinus.kt | 1 - .../box/platformTypes/primitives/unaryPlus.kt | 1 - .../codegen/box/primitiveTypes/conversions.kt | 1 - .../codegen/box/primitiveTypes/kt13023.kt | 1 - .../testData/codegen/box/properties/kt3556.kt | 1 - .../evaluationOrderForComparableRange.kt | 1 - .../contains/evaluationOrderForDownTo.kt | 1 - .../evaluationOrderForRangeLiteral.kt | 1 - .../ranges/contains/generated/arrayIndices.kt | 1 - .../contains/generated/collectionIndices.kt | 1 - .../codegen/box/ranges/contains/inArray.kt | 1 - .../codegen/box/ranges/contains/inIterable.kt | 1 - .../forInCollectionImplicitReceiverIndices.kt | 1 - .../forInIndices/forInCollectionIndices.kt | 1 - .../forInIndices/forInNonOptimizedIndices.kt | 1 - .../forInIndices/forInObjectArrayIndices.kt | 1 - .../forInPrimitiveArrayIndices.kt | 1 - .../forNullableIntInArrayIndices.kt | 1 - .../forNullableIntInCollectionIndices.kt | 1 - .../box/ranges/forInIndices/indexOfLast.kt | 1 - .../kt12983_forInGenericArrayIndices.kt | 1 - .../kt12983_forInGenericCollectionIndices.kt | 1 - .../kt12983_forInSpecificArrayIndices.kt | 1 - .../kt12983_forInSpecificCollectionIndices.kt | 1 - .../box/ranges/forInIndices/kt13241_Array.kt | 1 - .../ranges/forInIndices/kt13241_Collection.kt | 1 - .../forInReversedDownToEvaluationOrder.kt | 1 - ...orInReversedRangeLiteralEvaluationOrder.kt | 1 - .../forInReversedUntilEvaluationOrder.kt | 1 - .../forInReversedArrayIndices.kt | 1 - .../forInReversedCollectionIndices.kt | 1 - .../codegen/box/ranges/forIntRange.kt | 1 - .../multiAssignmentIterationOverIntRange.kt | 1 - .../codegen/box/regressions/Kt1149.kt | 1 - .../codegen/box/regressions/Kt1619Test.kt | 1 - .../codegen/box/regressions/Kt2495Test.kt | 1 - .../codegen/box/regressions/generic.kt | 1 - .../codegen/box/regressions/kt15196.kt | 1 - .../codegen/box/regressions/kt2210.kt | 1 - .../codegen/box/regressions/kt2509.kt | 1 - .../codegen/box/regressions/kt3850.kt | 1 - .../codegen/box/regressions/kt5953.kt | 1 - .../codegen/box/regressions/kt6153.kt | 1 - .../testData/codegen/box/regressions/kt789.kt | 1 - .../testData/codegen/box/regressions/kt998.kt | 1 - .../noCapturingForTypesWithTypeVariables.kt | 1 - .../reified/arraysReification/jaggedArray.kt | 1 - .../reified/arraysReification/jaggedDeep.kt | 1 - .../codegen/box/reified/copyToArray.kt | 1 - .../testData/codegen/box/reified/spreads.kt | 1 - .../testData/codegen/box/reified/varargs.kt | 1 - .../testData/codegen/box/safeCall/kt247.kt | 1 - .../box/secondaryConstructors/varargs.kt | 1 - .../codegen/box/smartCasts/whenSmartCast.kt | 1 - .../codegen/box/specialBuiltins/bridges.kt | 1 - .../box/specialBuiltins/explicitSuperCall.kt | 1 - .../strings/multilineStringsWithTemplates.kt | 1 - .../box/strings/rawStringsWithManyQuotes.kt | 1 - .../strings/stringPlusOnlyWorksOnString.kt | 1 - .../box/super/basicmethodSuperClass.kt | 1 - compiler/testData/codegen/box/super/kt4982.kt | 1 - .../super/superConstructor/kt17464_arrayOf.kt | 1 - .../box/super/superConstructor/kt18356_2.kt | 1 - .../box/typealias/typeAliasAsBareType.kt | 1 - .../typealias/typeAliasConstructorForArray.kt | 1 - .../doNotCopyImmediatelyCreatedArrays.kt | 1 - .../testData/codegen/box/vararg/kt1978.kt | 1 - .../testData/codegen/box/vararg/kt6192.kt | 1 - .../testData/codegen/box/vararg/kt796_797.kt | 1 - .../singleAssignmentToVarargsInFunction.kt | 1 - .../codegen/box/vararg/spreadCopiesArray.kt | 1 - .../codegen/box/vararg/varargInFunParam.kt | 1 - .../box/vararg/varargsAndFunctionLiterals.kt | 1 - .../box/when/exhaustiveBreakContinue.kt | 1 - compiler/testData/codegen/box/when/kt5448.kt | 1 - compiler/testData/codegen/box/when/range.kt | 1 - ...raryVarInWhenByStringIsDisposedProperly.kt | 1 - .../box/when/switchOptimizationDense.kt | 1 - .../switchOptimizationMultipleConditions.kt | 1 - .../box/when/switchOptimizationSparse.kt | 1 - .../box/when/switchOptimizationStatement.kt | 1 - .../box/when/switchOptimizationUnordered.kt | 1 - .../box/when/switchOptimizationWithGap.kt | 1 - .../when/whenArgumentIsEvaluatedOnlyOnce.kt | 1 - .../when/whenSafeCallSubjectEvaluatedOnce.kt | 1 - .../denseIntSwitchWithSubjectVariable.kt | 1 - .../sparseIntSwitchWithSubjectVariable.kt | 1 - .../boxInline/defaultValues/varArgNoInline.kt | 1 - .../exceptionTable/tryCatchInFinally.kt | 1 - .../nonLocalReturns/tryFinally/kt6956.kt | 1 - .../tryFinally/variables/kt7792.kt | 1 - .../kotlin/js/test/BasicIrBoxTest.kt | 10 +- .../testData/_commonFiles/asserts.kt | 9 ++ .../box/closure/closureArrayListInstance.kt | 1 - .../closure/closureInNestedLambdasInObject.kt | 1 - .../box/closure/closureThisAndReceiver.kt | 1 - .../box/closure/iteratingCallbacks.kt | 1 - .../testData/box/closure/lambdaInLocalFun.kt | 1 - .../box/closure/localParameterInCallback.kt | 1 - .../box/coroutines/localVarOptimization.kt | 4 + .../box/coroutines/nativeExceptions.kt | 4 + .../testData/box/dataClass/hashcode.kt | 1 - .../testData/box/dynamic/getByBrackets.kt | 1 - .../testData/box/examples/basicmethod.kt | 1 - .../box/examples/initializerBlockDImpl.kt | 1 - .../box/examples/overloadBinaryOperator.kt | 1 - .../box/examples/overloadPlusAssignReturn.kt | 1 - .../box/examples/overloadPlusToPlusAssign.kt | 1 - .../box/examples/overloadUnaryOperator.kt | 1 - .../testData/box/expression/cast/castToAny.kt | 1 - .../box/expression/cast/castToArray.kt | 1 - .../testData/box/expression/equals/arrays.kt | 1 - .../equals/compareNullableListWithNull.kt | 1 - .../testData/box/expression/equals/kt2370.kt | 1 - .../evaluationOrder/andAndWithTmpVarRhs.kt | 1 - .../assignToArrayElementWithSideEffect.kt | 1 - .../expression/evaluationOrder/callVarargs.kt | 1 - .../intrinsicWithBreakContinueReturn.kt | 1 - .../evaluationOrder/reassignmentLhsCaching.kt | 1 - .../expression/for/forIteratesOverArray.kt | 3 +- .../for/forIteratesOverTypeParameter.kt | 1 - .../box/expression/for/forOnEmptyArray.kt | 1 - .../box/expression/for/forWithEmptyBody.kt | 1 - ...deEffectImElementAccessAndWithEmptyBody.kt | 1 - .../testData/box/expression/for/labeledFor.kt | 1 - .../box/expression/for/overArrayWithIndex.kt | 1 - .../box/expression/function/KT-921.kt | 1 - .../function/expressionAsFunction.kt | 1 - .../box/expression/function/vararg.kt | 1 - .../testData/box/expression/misc/KT-1361-2.kt | 1 - .../testData/box/expression/misc/KT-2314.kt | 1 - .../testData/box/expression/misc/KT-5058.kt | 1 - .../box/expression/misc/elvisReturnNested.kt | 1 - .../box/expression/misc/elvisReturnSimple.kt | 1 - .../expression/misc/toGeneratorInStdlib.kt | 1 - .../box/expression/when/forWithOneStmWhen.kt | 1 - .../box/expression/when/whenEqualsPattern.kt | 1 - .../testData/box/extensionFunction/generic.kt | 1 - .../simplePropertyWithGetter.kt | 1 - .../inheritance/inheritFromCharIterator.kt | 1 - .../box/inheritance/overrideAnyMethods.kt | 1 - .../box/inline/arrayLiteralAliasing.kt | 1 - .../testData/box/inline/astCopy.kt | 1 - .../box/inline/inlineLambdaNoCapture.kt | 1 - .../box/inline/inlineLambdaWithCapture.kt | 1 - .../inline/iteratorOnInlineFunctionResult.kt | 1 - .../testData/box/inline/kt26117.kt | 1 - .../testData/box/inline/vararg.kt | 1 - .../box/inlineEvaluationOrder/arrayAccess1.kt | 1 - .../box/inlineEvaluationOrder/arrayAccess2.kt | 1 - .../box/inlineEvaluationOrder/arrayAccess3.kt | 1 - .../arrayAccessLhsDecomposed.kt | 1 - .../box/inlineEvaluationOrder/arrayLiteral.kt | 1 - .../arrayLiteralMultipleInlineCalls.kt | 1 - .../arrayLiteralNested.kt | 1 - .../callQualifierComplex.kt | 1 - .../propertyAccessWithSideEffect.kt | 1 - ...rtyWithSideEffectPassedToInlineFunction.kt | 1 - .../box/inlineMultiFile/closureChain.kt | 1 - .../box/inlineSizeReduction/lastBreak.kt | 1 - .../inlineSizeReduction/varargTemporaryVar.kt | 1 - .../callableRefToFunInCurrentModule.kt | 1 - .../box/java/abstractList/iterator.kt | 1 - .../testData/box/java/arrayList/access.kt | 1 - .../box/java/arrayList/arrayAccess.kt | 1 - .../java/arrayList/constructWithCapacity.kt | 1 - .../arrayList/constructWithSideEffectParam.kt | 1 - .../box/java/arrayList/containsAll.kt | 1 - .../testData/box/java/arrayList/emptyList.kt | 1 - .../testData/box/java/arrayList/indexOOB.kt | 1 - .../testData/box/java/arrayList/indexOf.kt | 1 - .../testData/box/java/arrayList/isEmpty.kt | 1 - .../testData/box/java/arrayList/iterate.kt | 1 - .../testData/box/java/arrayList/remove.kt | 1 - .../arrayList/removeWithIndexOutOfBounds.kt | 1 - js/js.translator/testData/box/jsCode/forIn.kt | 1 - .../testData/box/jsCode/literal.kt | 1 - .../box/multideclaration/multiValForArray.kt | 1 - .../box/multideclaration/multiValInFor.kt | 1 - .../testData/box/number/longArray.kt | 1 - .../box/number/longBinaryOperations.kt | 1 - .../box/operatorOverloading/lambdaRhs.kt | 1 - .../overloadPlusAssignArrayList.kt | 1 - .../overloadPlusAssignViaExtensionFunction.kt | 1 - .../overloadPlusViaExtensionFunction.kt | 1 - .../testData/box/range/intDownTo.kt | 1 - .../testData/box/range/intUpTo.kt | 1 - .../testData/box/range/reverse.kt | 1 - .../testData/box/reified/vararg.kt | 1 - .../testData/box/rtti/stdlibEmptyListClass.kt | 1 - .../testData/box/standardClasses/any.kt | 1 - .../testData/box/standardClasses/array.kt | 1 - .../box/standardClasses/arrayAccess.kt | 1 - .../arrayConstructorsWithLambda.kt | 4 +- .../arrayFunctionConstructor.kt | 1 - .../standardClasses/arrayIsFilledWithNulls.kt | 1 - .../testData/box/standardClasses/arraySize.kt | 1 - .../box/standardClasses/arraysIterator.kt | 1 - .../box/standardClasses/stringBuilder.kt | 1 - .../box/superCall/nativeSuperClass.kt | 1 - libraries/stdlib/js/irRuntime/arrays.kt | 95 ++++++++++++++ libraries/stdlib/js/irRuntime/hacks.kt | 22 +++- libraries/stdlib/js/irRuntime/kotlinHacks.kt | 50 ++----- .../stdlib/js/irRuntime/noPackageHacks.kt | 54 ++++++++ .../stdlib/js/irRuntime/typeCheckUtils.kt | 20 +-- .../js/src/kotlin/collections/InternalMap.kt | 5 +- 470 files changed, 761 insertions(+), 585 deletions(-) create mode 100644 compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ArrayInlineConstructorLowering.kt create mode 100644 compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt create mode 100644 libraries/stdlib/js/irRuntime/arrays.kt create mode 100644 libraries/stdlib/js/irRuntime/noPackageHacks.kt diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsIntrinsics.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsIntrinsics.kt index c1e1083a014..1820215231f 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsIntrinsics.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsIntrinsics.kt @@ -17,6 +17,8 @@ import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.psi2ir.findSingleFunction import org.jetbrains.kotlin.types.KotlinType +import java.util.* + class JsIntrinsics(private val irBuiltIns: IrBuiltIns, val context: JsIrBackendContext) { private val externalPackageFragmentSymbol = IrExternalPackageFragmentSymbolImpl(context.internalPackageFragmentDescriptor) @@ -166,6 +168,52 @@ class JsIntrinsics(private val irBuiltIns: IrBuiltIns, val context: JsIrBackendC val returnIfSuspended = getInternalFunction("returnIfSuspended") val getContinuation = getInternalFunction("getContinuation") + // Arrays: + val array = context.symbolTable.referenceClass(irBuiltIns.builtIns.array) + + val primitiveArrays = PrimitiveType.values().associate { context.symbolTable.referenceClass(irBuiltIns.builtIns.getPrimitiveArrayClassDescriptor(it)) to it } + + val jsArray = getInternalFunction("arrayWithFun") + val jsFillArray = getInternalFunction("fillArrayFun") + + val jsArrayLength = unOp("jsArrayLength") + val jsArrayGet = binOp("jsArrayGet") + val jsArraySet = tripleOp("jsArraySet") + + val jsArrayIteratorFunction = getInternalFunction("arrayIterator") + + val jsPrimitiveArrayIteratorFunctions = + PrimitiveType.values().associate { it to getInternalFunction("${it.typeName.asString().toLowerCase()}ArrayIterator") } + + val arrayLiteral = unOp("arrayLiteral").symbol + + val primitiveToTypedArrayMap = EnumMap(mapOf( + PrimitiveType.BYTE to "Int8", + PrimitiveType.SHORT to "Int16", + PrimitiveType.INT to "Int32", + PrimitiveType.FLOAT to "Float32", + PrimitiveType.DOUBLE to "Float64")) + + val primitiveToSizeConstructor = + PrimitiveType.values().associate { type -> + type to (primitiveToTypedArrayMap[type]?.let { + unOp("${it.toLowerCase()}Array").symbol + } ?: getInternalFunction("${type.typeName.asString().toLowerCase()}Array")) + } + + val primitiveToLiteralConstructor = + PrimitiveType.values().associate { type -> + type to (primitiveToTypedArrayMap[type]?.let { + unOp("${it.toLowerCase()}ArrayOf").symbol + } ?: getInternalFunction("${type.typeName.asString().toLowerCase()}ArrayOf")) + } + + val arrayConcat = getInternalWithoutPackage("arrayConcat") + + val primitiveArrayConcat = getInternalWithoutPackage("primitiveArrayConcat") + + val jsArraySlice = unOp("slice") + // Helpers: private fun getInternalFunction(name: String) = 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 d570b0666f9..29d3d813296 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 @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.backend.common.runOnFilePostfix import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.ir.backend.js.lower.* import org.jetbrains.kotlin.ir.backend.js.lower.coroutines.CoroutineIntrinsicLowering import org.jetbrains.kotlin.ir.backend.js.lower.coroutines.SuspendFunctionsLowering @@ -21,9 +22,19 @@ import org.jetbrains.kotlin.ir.backend.js.lower.inline.RemoveInlineFunctionsWith import org.jetbrains.kotlin.ir.backend.js.lower.inline.ReturnableBlockLowering import org.jetbrains.kotlin.ir.backend.js.lower.inline.replaceUnboundSymbols import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrModuleToJsTransformer +import org.jetbrains.kotlin.ir.declarations.* +import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns +import org.jetbrains.kotlin.ir.expressions.IrBlock +import org.jetbrains.kotlin.ir.expressions.IrReturnableBlock +import org.jetbrains.kotlin.ir.symbols.* +import org.jetbrains.kotlin.ir.symbols.impl.* +import org.jetbrains.kotlin.ir.util.* +import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid +import org.jetbrains.kotlin.ir.visitors.acceptVoid import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator +import org.jetbrains.kotlin.ir.util.deepCopyWithSymbols import org.jetbrains.kotlin.ir.util.patchDeclarationParents import org.jetbrains.kotlin.js.analyze.TopDownAnalyzerFacadeForJS import org.jetbrains.kotlin.name.FqName @@ -31,17 +42,17 @@ import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStat import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.psi2ir.Psi2IrTranslator -data class Result(val moduleDescriptor: ModuleDescriptor, val generatedCode: String) +data class Result(val moduleDescriptor: ModuleDescriptor, val generatedCode: String, val moduleFragment: IrModuleFragment) fun compile( project: Project, files: List, configuration: CompilerConfiguration, export: FqName? = null, - dependencies: List = listOf() + dependencies: List = listOf() ): Result { val analysisResult = - TopDownAnalyzerFacadeForJS.analyzeFiles(files, project, configuration, dependencies.filterIsInstance(), emptyList()) + TopDownAnalyzerFacadeForJS.analyzeFiles(files, project, configuration, dependencies.mapNotNull { it.moduleDescriptor as? ModuleDescriptorImpl }, emptyList()) ProgressIndicatorAndCompilationCanceledStatus.checkCanceled() @@ -50,6 +61,10 @@ fun compile( val psi2IrTranslator = Psi2IrTranslator(configuration.languageVersionSettings) val psi2IrContext = psi2IrTranslator.createGeneratorContext(analysisResult.moduleDescriptor, analysisResult.bindingContext) + val irDependencyModules = dependencies.map { it.moduleFragment.deepCopyWithSymbols() } + + irDependencyModules.forEach { psi2IrContext.symbolTable.loadModule(it)} + val moduleFragment = psi2IrTranslator.generateModuleFragment(psi2IrContext, files) val context = JsIrBackendContext( @@ -70,21 +85,24 @@ fun compile( MoveExternalDeclarationsToSeparatePlace().lower(moduleFragment.files) + moduleFragment.files.forEach(CoroutineIntrinsicLowering(context)::lower) + moduleFragment.files.forEach { ArrayInlineConstructorLowering(context).lower(it) } + + val moduleFragmentCopy = moduleFragment.deepCopyWithSymbols() context.performInlining(moduleFragment) - context.lower(moduleFragment) + context.lower(moduleFragment, irDependencyModules) val program = moduleFragment.accept(IrModuleToJsTransformer(context), null) - return Result(analysisResult.moduleDescriptor, program.toString()) + return Result(analysisResult.moduleDescriptor, program.toString(), moduleFragmentCopy) } private fun JsIrBackendContext.performInlining(moduleFragment: IrModuleFragment) { FunctionInlining(this).inline(moduleFragment) - moduleFragment.replaceUnboundSymbols(this) moduleFragment.patchDeclarationParents() @@ -93,7 +111,8 @@ private fun JsIrBackendContext.performInlining(moduleFragment: IrModuleFragment) } } -private fun JsIrBackendContext.lower(moduleFragment: IrModuleFragment) { +private fun JsIrBackendContext.lower(moduleFragment: IrModuleFragment, dependencies: List) { + moduleFragment.files.forEach(VarargLowering(this)::lower) moduleFragment.files.forEach(LateinitLowering(this, true)::lower) moduleFragment.files.forEach(DefaultArgumentStubGenerator(this)::runOnFilePostfix) moduleFragment.files.forEach(DefaultParameterInjector(this)::runOnFilePostfix) @@ -114,7 +133,7 @@ private fun JsIrBackendContext.lower(moduleFragment: IrModuleFragment) { moduleFragment.files.forEach(TypeOperatorLowering(this)::lower) moduleFragment.files.forEach(BlockDecomposerLowering(this)::runOnFilePostfix) val sctor = SecondaryCtorLowering(this) - moduleFragment.files.forEach(sctor.getConstructorProcessorLowering()) + (moduleFragment.files + dependencies.flatMap { it.files }).forEach(sctor.getConstructorProcessorLowering()) moduleFragment.files.forEach(sctor.getConstructorRedirectorLowering()) val clble = CallableReferenceLowering(this) moduleFragment.files.forEach(clble.getReferenceCollector()) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ArrayInlineConstructorLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ArrayInlineConstructorLowering.kt new file mode 100644 index 00000000000..ff068377856 --- /dev/null +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ArrayInlineConstructorLowering.kt @@ -0,0 +1,73 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.ir.backend.js.lower + +import org.jetbrains.kotlin.backend.common.FileLoweringPass +import org.jetbrains.kotlin.builtins.PrimitiveType +import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET +import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext +import org.jetbrains.kotlin.ir.declarations.IrConstructor +import org.jetbrains.kotlin.ir.declarations.IrFile +import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrExpression +import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl +import org.jetbrains.kotlin.ir.expressions.impl.IrConstImpl +import org.jetbrains.kotlin.ir.symbols.IrClassSymbol +import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid +import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid + +// Replace array inline constructors with stdlib function invocations +// Should be performed before inliner +class ArrayInlineConstructorLowering(val context: JsIrBackendContext) : FileLoweringPass { + override fun lower(irFile: IrFile) { + irFile.transformChildrenVoid(ArrayConstructorTransformer(context)) + } +} + +private class ArrayConstructorTransformer( + val context: JsIrBackendContext +) : IrElementTransformerVoid() { + + private val primitiveArrayInlineToSizeConstructorMap = context.intrinsics.primitiveArrays.keys.associate { + it.inlineConstructor to it.sizeConstructor + } + + override fun visitCall(expression: IrCall): IrExpression { + expression.transformChildrenVoid(this) + + if (expression.symbol == context.intrinsics.array.inlineConstructor) { + return irCall(expression, context.intrinsics.jsArray) + } else { + primitiveArrayInlineToSizeConstructorMap[expression.symbol]?.let { sizeConstructor -> + return IrCallImpl( + expression.startOffset, + expression.endOffset, + expression.type, + context.intrinsics.jsFillArray + ).apply { + putValueArgument(0, IrCallImpl( + expression.startOffset, + expression.endOffset, + expression.type, + sizeConstructor + ).apply { + putValueArgument(0, expression.getValueArgument(0)) + }) + putValueArgument(1, expression.getValueArgument(1)) + } + } + } + + return expression + } +} + +// TODO it.isInline doesn't work =( +private val IrClassSymbol.inlineConstructor + get() = owner.declarations.filterIsInstance().first { it.valueParameters.size == 2 }.symbol + +private val IrClassSymbol.sizeConstructor + get() = owner.declarations.filterIsInstance().first { it.valueParameters.size == 1 }.symbol diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/IntrinsicifyCallsLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/IntrinsicifyCallsLowering.kt index 88ee703d718..6daef8c61c2 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/IntrinsicifyCallsLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/IntrinsicifyCallsLowering.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.utils.isSubtypeOf import org.jetbrains.kotlin.backend.common.utils.isSubtypeOfClass import org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor +import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext import org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder import org.jetbrains.kotlin.ir.backend.js.ir.irCall @@ -19,8 +20,10 @@ import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction +import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl +import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.types.* @@ -137,6 +140,27 @@ class IntrinsicifyCallsLowering(private val context: JsIrBackendContext) : FileL add(irBuiltIns.lessOrEqualFunByOperandType, intrinsics.jsLtEq) add(irBuiltIns.greaterFunByOperandType, intrinsics.jsGt) add(irBuiltIns.greaterOrEqualFunByOperandType, intrinsics.jsGtEq) + + // Arrays + add(context.intrinsics.array.sizeProperty, context.intrinsics.jsArrayLength, true) + add(context.intrinsics.array.getFunction, context.intrinsics.jsArrayGet, true) + add(context.intrinsics.array.setFunction, context.intrinsics.jsArraySet, true) + add(context.intrinsics.array.iterator, context.intrinsics.jsArrayIteratorFunction.owner, true) + for ((key, elementType) in context.intrinsics.primitiveArrays) { + add(key.sizeProperty, context.intrinsics.jsArrayLength, true) + add(key.getFunction, context.intrinsics.jsArrayGet, true) + add(key.setFunction, context.intrinsics.jsArraySet, true) + add(key.iterator, context.intrinsics.jsPrimitiveArrayIteratorFunctions[elementType]!!.owner, true) + + // TODO irCall? + add(key.sizeConstructor) { call -> + IrCallImpl(call.startOffset, call.endOffset, call.type, context.intrinsics.primitiveToSizeConstructor[elementType]!!).apply { + putValueArgument(0, call.getValueArgument(0)) + } + } + } + + add(context.irBuiltIns.stringClass.lengthProperty, context.intrinsics.jsArrayLength, true) } memberToTransformer.run { @@ -278,6 +302,32 @@ class IntrinsicifyCallsLowering(private val context: JsIrBackendContext) : FileL put(IrStatementOrigin.PREFIX_DECR, context.intrinsics.jsPrefixDec) put(IrStatementOrigin.POSTFIX_INCR, context.intrinsics.jsPostfixInc) put(IrStatementOrigin.POSTFIX_DECR, context.intrinsics.jsPostfixDec) + put(IrStatementOrigin.GET_ARRAY_ELEMENT, context.intrinsics.jsArrayGet) + } + } + + private fun lowerLongConst(value: Long, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrExpression { + val high = (value shr 32).toInt() + val low = value.toInt() + return IrCallImpl( + startOffset, + endOffset, + irBuiltIns.longType, + context.intrinsics.longConstructor + ).apply { + putValueArgument(0, JsIrBuilder.buildInt(context.irBuiltIns.intType, low)) + putValueArgument(1, JsIrBuilder.buildInt(context.irBuiltIns.intType, high)) + } + } + + private fun lowerCharConst(value: Char, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrExpression { + return IrCallImpl( + startOffset, + endOffset, + irBuiltIns.charType, + context.intrinsics.charConstructor + ).apply { + putValueArgument(0, JsIrBuilder.buildInt(context.irBuiltIns.intType, value.toInt())) } } @@ -287,27 +337,9 @@ class IntrinsicifyCallsLowering(private val context: JsIrBackendContext) : FileL // TODO should this be a separate lowering? override fun visitConst(expression: IrConst): IrExpression { if (expression.kind is IrConstKind.Long) { - val value = IrConstKind.Long.valueOf(expression) - val high = (value shr 32).toInt() - val low = value.toInt() - return IrCallImpl( - expression.startOffset, - expression.endOffset, - irBuiltIns.longType, - context.intrinsics.longConstructor - ).apply { - putValueArgument(0, JsIrBuilder.buildInt(context.irBuiltIns.intType, low)) - putValueArgument(1, JsIrBuilder.buildInt(context.irBuiltIns.intType, high)) - } + return lowerLongConst(IrConstKind.Long.valueOf(expression), expression.startOffset, expression.endOffset) } else if (expression.kind is IrConstKind.Char) { - return IrCallImpl( - expression.startOffset, - expression.endOffset, - irBuiltIns.charType, - context.intrinsics.charConstructor - ).apply { - putValueArgument(0, JsIrBuilder.buildInt(context.irBuiltIns.intType, IrConstKind.Char.valueOf(expression).toInt())) - } + return lowerCharConst(IrConstKind.Char.valueOf(expression), expression.startOffset, expression.endOffset) } return super.visitConst(expression) } @@ -434,9 +466,10 @@ class IntrinsicifyCallsLowering(private val context: JsIrBackendContext) : FileL private fun withLongCoercion(intrinsic: IrSimpleFunction): (IrCall) -> IrExpression = { call -> assert(call.valueArgumentsCount == 1) val arg = call.getValueArgument(0)!! - val receiverType = call.dispatchReceiver!!.type if (arg.type.isLong()) { + val receiverType = call.dispatchReceiver!!.type + when { // Double OP Long => Double OP Long.toDouble() receiverType.isDouble() -> { @@ -475,7 +508,7 @@ class IntrinsicifyCallsLowering(private val context: JsIrBackendContext) : FileL } } - if (receiverType.isLong()) { + if (call.dispatchReceiver!!.type.isLong()) { // LHS is Long => use as is call } else { @@ -682,8 +715,8 @@ private fun SymbolToTransformer.add(from: IrFunctionSymbol, to: (IrCall) -> IrEx put(from, to) } -private fun SymbolToTransformer.add(from: IrFunctionSymbol, to: IrSimpleFunction) { - put(from, { call -> irCall(call, to.symbol) }) +private fun SymbolToTransformer.add(from: IrFunctionSymbol, to: IrSimpleFunction, dispatchReceiverAsFirstArgument: Boolean = false) { + put(from, { call -> irCall(call, to.symbol, dispatchReceiverAsFirstArgument) }) } private fun MutableMap IrExpression>.addWithPredicate( @@ -717,3 +750,22 @@ private class SimpleMemberKey(val klass: IrType, val name: Name) { return result } } + + +private val IrClassSymbol.sizeProperty + get() = owner.declarations.filterIsInstance().first { it.name.asString() == "size" }.getter!!.symbol + +private val IrClassSymbol.getFunction + get() = owner.declarations.filterIsInstance().first { it.name.asString() == "get" }.symbol + +private val IrClassSymbol.setFunction + get() = owner.declarations.filterIsInstance().first { it.name.asString() == "set" }.symbol + +private val IrClassSymbol.iterator + get() = owner.declarations.filterIsInstance().first { it.name.asString() == "iterator" }.symbol + +private val IrClassSymbol.sizeConstructor + get() = owner.declarations.filterIsInstance().first { it.valueParameters.size == 1 }.symbol + +private val IrClassSymbol.lengthProperty + get() = owner.declarations.filterIsInstance().first { it.name.asString() == "length" }.getter!!.symbol \ No newline at end of file diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt new file mode 100644 index 00000000000..68d313f7e5b --- /dev/null +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt @@ -0,0 +1,124 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.ir.backend.js.lower + +import org.jetbrains.kotlin.backend.common.FileLoweringPass +import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET +import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext +import org.jetbrains.kotlin.ir.declarations.IrFile +import org.jetbrains.kotlin.ir.expressions.* +import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl +import org.jetbrains.kotlin.ir.expressions.impl.IrVarargImpl +import org.jetbrains.kotlin.ir.types.IrType +import org.jetbrains.kotlin.ir.types.classifierOrNull +import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl +import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid +import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid + +class VarargLowering(val context: JsIrBackendContext) : FileLoweringPass { + override fun lower(irFile: IrFile) { + irFile.transformChildrenVoid(VarargTransformer(context)) + } +} + +private class VarargTransformer( + val context: JsIrBackendContext +) : IrElementTransformerVoid() { + + private fun List.toArrayLiteral(type: IrType, varargElementType: IrType): IrExpression { + val intrinsic = context.intrinsics.primitiveArrays[type.classifierOrNull]?.let { primitiveType -> + context.intrinsics.primitiveToLiteralConstructor[primitiveType] + } ?: context.intrinsics.arrayLiteral + + val startOffset = firstOrNull()?.startOffset ?: UNDEFINED_OFFSET + val endOffset = lastOrNull()?.endOffset ?: UNDEFINED_OFFSET + + val irVararg = IrVarargImpl(startOffset, endOffset, type, varargElementType, this) + + return IrCallImpl(startOffset, endOffset, type, intrinsic).apply { + if (intrinsic.owner.typeParameters.isNotEmpty()) putTypeArgument(0, varargElementType) + putValueArgument(0, irVararg) + } + } + + override fun visitVararg(expression: IrVararg): IrExpression { + expression.transformChildrenVoid(this) + + val currentList = mutableListOf() + val segments = mutableListOf() + + for (e in expression.elements) { + if (e is IrSpreadElement) { + if (!currentList.isEmpty()) { + segments.add(currentList.toArrayLiteral(expression.type, expression.varargElementType)) + currentList.clear() + } + segments.add(e.expression) + } else { + // IrVarargElement is either IrSpreadElement or IrExpression + currentList.add(e as IrExpression) + } + } + if (!currentList.isEmpty()) { + segments.add(currentList.toArrayLiteral(expression.type, expression.varargElementType)) + currentList.clear() + } + + // empty vararg => empty array literal + if (segments.isEmpty()) { + return emptyList().toArrayLiteral(expression.type, expression.varargElementType) + } + + // vararg with a single segment => no need to concatenate + if (segments.size == 1) { + return if (expression.elements.any { it is IrSpreadElement }) { + // Single spread operator => need to copy the array + IrCallImpl( + expression.startOffset, + expression.endOffset, + expression.type, + context.intrinsics.jsArraySlice.symbol + ).apply { + putValueArgument(0, segments.first()) + } + } else { + segments.first() + } + } + + val arrayLiteral = segments.toArrayLiteral(IrSimpleTypeImpl(context.intrinsics.array, false, emptyList(), emptyList()), context.irBuiltIns.anyType) + + val concatFun = if (expression.type.classifierOrNull in context.intrinsics.primitiveArrays.keys) { + context.intrinsics.primitiveArrayConcat + } else { + context.intrinsics.arrayConcat + } + + return IrCallImpl( + expression.startOffset, + expression.endOffset, + expression.type, + concatFun + ).apply { + putValueArgument(0, arrayLiteral) + } + } + + override fun visitCall(expression: IrCall): IrExpression { + expression.transformChildrenVoid() + val size = expression.valueArgumentsCount + + for (i in 0 until size) { + val argument = expression.getValueArgument(i) + val parameter = expression.symbol.owner.valueParameters[i] + if (argument == null && parameter.varargElementType != null) { + expression.putValueArgument(i, emptyList().toArrayLiteral(parameter.type, parameter.varargElementType!!)) + } + } + + return expression + } +} diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/FunctionInlining.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/FunctionInlining.kt index af2c7d5477c..7fce85266bc 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/FunctionInlining.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/FunctionInlining.kt @@ -68,6 +68,7 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoidW if (functionDeclaration == null) { // We failed to get the declaration. val message = "Inliner failed to obtain function declaration: " + functionDescriptor.fqNameSafe.toString() + getFunctionDeclaration(irCall) context.reportWarning(message, currentFile, irCall) // Report warning. return irCall } @@ -88,8 +89,10 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoidW val functionDescriptor = irCall.descriptor val originalDescriptor = functionDescriptor.resolveFakeOverride().original + val functionDeclaration = - context.originalModuleIndex.functions[originalDescriptor] // ?: // If function is declared in the current module. + context.originalModuleIndex.functions[originalDescriptor] ?: context.symbolTable.referenceDeclaredFunction(originalDescriptor).owner + // ?: // If function is declared in the current module. // TODO deserializer.deserializeInlineBody(originalDescriptor) // Function is declared in another module. return functionDeclaration as IrFunction? } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/ModuleIndex.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/ModuleIndex.kt index f56bdf551e2..fc0dd5e0257 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/ModuleIndex.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/ModuleIndex.kt @@ -18,12 +18,13 @@ import org.jetbrains.kotlin.ir.visitors.acceptVoid class ModuleIndex(val module: IrModuleFragment) { var currentFile: IrFile? = null + /** * Contains all classes declared in [module] */ - val classes: Map + val classes = mutableMapOf() - val enumEntries: Map + val enumEntries = mutableMapOf() /** * Contains all functions declared in [module] @@ -32,9 +33,10 @@ class ModuleIndex(val module: IrModuleFragment) { val declarationToFile = mutableMapOf() init { - val map = mutableMapOf() - enumEntries = mutableMapOf() + addModule(module) + } + fun addModule(module: IrModuleFragment) { module.acceptVoid(object : IrElementVisitorVoid { override fun visitElement(element: IrElement) { element.acceptChildrenVoid(this) @@ -48,7 +50,7 @@ class ModuleIndex(val module: IrModuleFragment) { override fun visitClass(declaration: IrClass) { super.visitClass(declaration) - map[declaration.descriptor] = declaration + classes[declaration.descriptor] = declaration } override fun visitEnumEntry(declaration: IrEnumEntry) { @@ -67,7 +69,5 @@ class ModuleIndex(val module: IrModuleFragment) { declarationToFile[declaration.descriptor] = currentFile!!.name } }) - - classes = map } } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt index e91256bd15b..976ab768fe3 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt @@ -21,50 +21,8 @@ import org.jetbrains.kotlin.util.OperatorNameConventions class IrElementToJsExpressionTransformer : BaseIrElementToJsNodeTransformer { override fun visitVararg(expression: IrVararg, context: JsGenerationContext): JsExpression { - // TODO: perform the dark magic below in the separated lowering - if (expression.elements.size == 1) { - val element = expression.elements[0] - if (element is IrSpreadElement) { - // special case, invoke slice() - val expr = element.expression.accept(this, context) - return JsInvocation(JsNameRef(Namer.SLICE_FUNCTION, expr)) - } - } - - var arrayLiteralElements = mutableListOf() - val concatArguments = mutableListOf() - var qualifier: JsExpression? = null - - expression.elements.forEach { - if (it is IrSpreadElement) { - val expr = it.expression.accept(this, context) - if (qualifier == null) { - if (arrayLiteralElements.isEmpty()) { - qualifier = JsNameRef(Namer.CONCAT_FUNCTION, expr) - } else { - val dispatch = JsArrayLiteral(arrayLiteralElements) - arrayLiteralElements = mutableListOf() - qualifier = JsNameRef(Namer.CONCAT_FUNCTION, dispatch) - concatArguments.add(expr) - } - } else { - if (arrayLiteralElements.isNotEmpty()) { - concatArguments.add(JsArrayLiteral(arrayLiteralElements)) - arrayLiteralElements = mutableListOf() - } - concatArguments.add(expr) - } - } else { - arrayLiteralElements.add(it.accept(this, context)) - } - } - - return qualifier?.let { - if (arrayLiteralElements.isNotEmpty()) { - concatArguments.add(JsArrayLiteral(arrayLiteralElements)) - } - return JsInvocation(it, concatArguments) - } ?: JsArrayLiteral(arrayLiteralElements) + assert(expression.elements.none { it is IrSpreadElement }) + return JsArrayLiteral(expression.elements.map { it.accept(this, context) }) } override fun visitExpressionBody(body: IrExpressionBody, context: JsGenerationContext): JsExpression = diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsIntrinsicTransformers.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsIntrinsicTransformers.kt index 706793b7db8..c18b2820e67 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsIntrinsicTransformers.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsIntrinsicTransformers.kt @@ -136,6 +136,43 @@ class JsIntrinsicTransformers(backendContext: JsIrBackendContext) { val continuation = context.continuation JsInvocation(JsNameRef(getterName, continuation)) } + + add(intrinsics.jsArrayLength) { call, context -> + val args = translateCallArguments(call, context) + JsNameRef("length", args[0]) + } + + add(intrinsics.jsArrayGet) { call, context -> + val args = translateCallArguments(call, context) + val array = args[0] + val index = args[1] + JsArrayAccess(array, index) + } + + add(intrinsics.jsArraySet) { call, context -> + val args = translateCallArguments(call, context) + val array = args[0] + val index = args[1] + val value = args[2] + JsBinaryOperation(JsBinaryOperator.ASG, JsArrayAccess(array, index), value) + } + + add(intrinsics.arrayLiteral) { call, context -> + translateCallArguments(call, context).single() + } + + add(intrinsics.jsArraySlice) { call, context -> + JsInvocation(JsNameRef(Namer.SLICE_FUNCTION, translateCallArguments(call, context).single())) + } + + for ((type, prefix) in intrinsics.primitiveToTypedArrayMap) { + add(intrinsics.primitiveToSizeConstructor[type]!!) { call, context -> + JsNew(JsNameRef("${prefix}Array"), translateCallArguments(call, context)) + } + add(intrinsics.primitiveToLiteralConstructor[type]!!) { call, context -> + JsNew(JsNameRef("${prefix}Array"), translateCallArguments(call, context)) + } + } } } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinFunctionDescriptor.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinFunctionDescriptor.kt index 06a95db8df2..8a5eca55625 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinFunctionDescriptor.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinFunctionDescriptor.kt @@ -87,6 +87,18 @@ class IrSimpleBuiltinOperatorDescriptorImpl( override fun getReturnType(): KotlinType = returnType override fun getValueParameters(): List = valueParameters + + override fun equals(other: Any?): Boolean { + return this === other || + other is IrSimpleBuiltinOperatorDescriptorImpl && + name == other.name && + valueParameters.map { it.type } == other.valueParameters.map { it.type } && + containingDeclaration == other.containingDeclaration + } + + override fun hashCode(): Int { + return (containingDeclaration.hashCode() * 31 + name.hashCode()) * 31 + valueParameters.map { it.type }.hashCode() + } } class IrBuiltinValueParameterDescriptorImpl( @@ -118,4 +130,17 @@ class IrBuiltinValueParameterDescriptorImpl( override fun accept(visitor: DeclarationDescriptorVisitor, data: D): R { return visitor.visitValueParameterDescriptor(this, data) } + + override fun equals(other: Any?): Boolean { + return this === other || + other is IrBuiltinValueParameterDescriptorImpl && + name == other.name && + index == other.index && + type == other.type && + containingDeclaration == other.containingDeclaration + } + + override fun hashCode(): Int { + return (name.hashCode() * 31 + index) * 31 + type.hashCode() + } } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinsPackageFragmentDescriptorImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinsPackageFragmentDescriptorImpl.kt index 7aa70561d4a..9332355a665 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinsPackageFragmentDescriptorImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltinsPackageFragmentDescriptorImpl.kt @@ -45,4 +45,15 @@ class IrBuiltinsPackageFragmentDescriptorImpl( override fun acceptVoid(visitor: DeclarationDescriptorVisitor) { visitor.visitPackageFragmentDescriptor(this, null) } + + override fun equals(other: Any?): Boolean { + return this === other || + other is IrBuiltinsPackageFragmentDescriptorImpl && + fqName == other.fqName && + containingModule == other.containingModule + } + + override fun hashCode(): Int { + return containingModule.hashCode() * 31 + fqName.hashCode() + } } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt index b03d489deeb..2b318c79d0f 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt @@ -42,6 +42,13 @@ open class DeepCopyIrTreeWithSymbols( private val typeRemapper: TypeRemapper ) : IrElementTransformerVoid() { + init { + // TODO refactor + (typeRemapper as? DeepCopyTypeRemapper)?.let { + it.deepCopy = this + } + } + private fun mapDeclarationOrigin(origin: IrDeclarationOrigin) = origin private fun mapStatementOrigin(origin: IrStatementOrigin?) = origin diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt index 3380876995a..73f81d9ba03 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt @@ -6,12 +6,20 @@ package org.jetbrains.kotlin.ir.util import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer +import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrType +import org.jetbrains.kotlin.ir.types.IrTypeProjection +import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl +import org.jetbrains.kotlin.ir.types.impl.IrTypeProjectionImpl +import org.jetbrains.kotlin.ir.types.impl.originalKotlinType class DeepCopyTypeRemapper( private val symbolRemapper: SymbolRemapper ) : TypeRemapper { + lateinit var deepCopy: DeepCopyIrTreeWithSymbols + override fun enterScope(irTypeParametersContainer: IrTypeParametersContainer) { // TODO } @@ -20,6 +28,26 @@ class DeepCopyTypeRemapper( // TODO } - override fun remapType(type: IrType): IrType = type // TODO + // TODO This is a hack + override fun remapType(type: IrType): IrType { + if (type !is IrSimpleType) return type + + val arguments = type.arguments.map { + if (it is IrTypeProjection) { + IrTypeProjectionImpl(this.remapType(it.type), it.variance) + } else { + it + } + } + + val annotations = type.annotations.map { it.transform(deepCopy, null) as IrCall } + + return IrSimpleTypeImpl( + type.originalKotlinType, + symbolRemapper.getReferencedClassifier(type.classifier), + type.hasQuestionMark, + arguments, + annotations) + } } \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt index a8c3212638d..d45a5b223fb 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt @@ -17,6 +17,7 @@ package org.jetbrains.kotlin.ir.util import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.declarations.impl.* import org.jetbrains.kotlin.ir.declarations.lazy.IrLazySymbolTable @@ -25,6 +26,9 @@ import org.jetbrains.kotlin.ir.expressions.IrExpressionBody import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.symbols.impl.* import org.jetbrains.kotlin.ir.types.IrType +import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid +import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid +import org.jetbrains.kotlin.ir.visitors.acceptVoid interface ReferenceSymbolTable { fun referenceClass(descriptor: ClassDescriptor): IrClassSymbol @@ -54,7 +58,7 @@ open class SymbolTable : ReferenceSymbolTable { val unboundSymbols = linkedSetOf() abstract fun get(d: D): S? - protected abstract fun set(d: D, s: S) + abstract fun set(d: D, s: S) inline fun declare(d: D, createSymbol: () -> S, createOwner: (S) -> B): B { val existing = get(d) @@ -92,6 +96,13 @@ open class SymbolTable : ReferenceSymbolTable { override fun set(d: D, s: S) { descriptorToSymbol[d] = s } + + fun copyTo(other: FlatSymbolTable) { + for ((d, s) in descriptorToSymbol) { + other.descriptorToSymbol[d] = s + } + other.unboundSymbols.addAll(unboundSymbols) + } } private class ScopedSymbolTable> @@ -411,6 +422,51 @@ open class SymbolTable : ReferenceSymbolTable { else -> throw IllegalArgumentException("Unexpected value descriptor: $value") } + + fun loadModule(module: IrModuleFragment) { + module.acceptVoid(object: IrElementVisitorVoid { + override fun visitElement(element: IrElement) { + element.acceptChildrenVoid(this) + } + + override fun visitClass(declaration: IrClass) { + // TODO should we check there are no conflicts? + classSymbolTable.descriptorToSymbol[declaration.descriptor] = declaration.symbol + super.visitClass(declaration) + } + + override fun visitConstructor(declaration: IrConstructor) { + constructorSymbolTable.descriptorToSymbol[declaration.descriptor] = declaration.symbol + super.visitConstructor(declaration) + } + + override fun visitEnumEntry(declaration: IrEnumEntry) { + enumEntrySymbolTable.descriptorToSymbol[declaration.descriptor] = declaration.symbol + super.visitEnumEntry(declaration) + } + + override fun visitExternalPackageFragment(declaration: IrExternalPackageFragment) { + externalPackageFragmentTable.descriptorToSymbol[declaration.symbol.descriptor] = declaration.symbol + super.visitExternalPackageFragment(declaration) + } + + override fun visitField(declaration: IrField) { + fieldSymbolTable.descriptorToSymbol[declaration.descriptor] = declaration.symbol + super.visitField(declaration) + } + + override fun visitSimpleFunction(declaration: IrSimpleFunction) { + simpleFunctionSymbolTable.descriptorToSymbol[declaration.descriptor] = declaration.symbol + super.visitSimpleFunction(declaration) + } + + override fun visitTypeParameter(declaration: IrTypeParameter) { + // What about scoped type parameters? + globalTypeParameterSymbolTable.descriptorToSymbol[declaration.descriptor] = declaration.symbol + super.visitTypeParameter(declaration) + } + }) + } } inline fun SymbolTable.withScope(owner: D, block: SymbolTable.(D) -> T): T { diff --git a/compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt b/compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt index b873a1f34c0..1c28cf17aa0 100644 --- a/compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt +++ b/compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt b/compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt index 1c6ae6e29f3..5e8e8bbd546 100644 --- a/compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt +++ b/compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Array.get(index1: Int, index2: Int) = this[index1 + index2] operator fun Array.set(index1: Int, index2: Int, elem: String) { this[index1 + index2] = elem diff --git a/compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt b/compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt index b0cbd2c62ab..6898a9b08e6 100644 --- a/compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt +++ b/compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Array.get(index1: Int, index2: Int) = this[index1 + index2] operator fun Array.set(index1: Int, index2: Int, elem: String) { this[index1 + index2] = elem diff --git a/compiler/testData/codegen/box/arrays/arrayInstanceOf.kt b/compiler/testData/codegen/box/arrays/arrayInstanceOf.kt index da9644f69ef..406b97e57a4 100644 --- a/compiler/testData/codegen/box/arrays/arrayInstanceOf.kt +++ b/compiler/testData/codegen/box/arrays/arrayInstanceOf.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR //test [], get and iterator calls fun test(createIntNotLong: Boolean): String { val a = if (createIntNotLong) IntArray(5) else LongArray(5) diff --git a/compiler/testData/codegen/box/arrays/arrayPlusAssign.kt b/compiler/testData/codegen/box/arrays/arrayPlusAssign.kt index c0c4efedf8e..9a243990fd5 100644 --- a/compiler/testData/codegen/box/arrays/arrayPlusAssign.kt +++ b/compiler/testData/codegen/box/arrays/arrayPlusAssign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val s = IntArray(1) s[0] = 5 diff --git a/compiler/testData/codegen/box/arrays/arraysOfInlineClass/accessArrayOfInlineClass.kt b/compiler/testData/codegen/box/arrays/arraysOfInlineClass/accessArrayOfInlineClass.kt index accbe5cdeea..e1ea79a4ba4 100644 --- a/compiler/testData/codegen/box/arrays/arraysOfInlineClass/accessArrayOfInlineClass.kt +++ b/compiler/testData/codegen/box/arrays/arraysOfInlineClass/accessArrayOfInlineClass.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class Z(val data: Int) diff --git a/compiler/testData/codegen/box/arrays/arraysOfInlineClass/arrayOfInlineClassOfArrayOfInlineClass.kt b/compiler/testData/codegen/box/arrays/arraysOfInlineClass/arrayOfInlineClassOfArrayOfInlineClass.kt index 0b90481b909..679f2534759 100644 --- a/compiler/testData/codegen/box/arrays/arraysOfInlineClass/arrayOfInlineClassOfArrayOfInlineClass.kt +++ b/compiler/testData/codegen/box/arrays/arraysOfInlineClass/arrayOfInlineClassOfArrayOfInlineClass.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_UNSIGNED -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class Data(val data: Array) diff --git a/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt b/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt index 0b60d9a5a22..974b55f66a5 100644 --- a/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt +++ b/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun ArrayList.get(index1: Int, index2: Int) = this[index1 + index2] operator fun ArrayList.set(index1: Int, index2: Int, elem: String) { this[index1 + index2] = elem diff --git a/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt b/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt index 33f8600ff86..295f860f84a 100644 --- a/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt +++ b/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun ArrayList.get(index1: Int, index2: Int) = this[index1 + index2] operator fun ArrayList.set(index1: Int, index2: Int, elem: String) { this[index1 + index2] = elem diff --git a/compiler/testData/codegen/box/arrays/forEachBooleanArray.kt b/compiler/testData/codegen/box/arrays/forEachBooleanArray.kt index 481fdae1c33..f0238410cc5 100644 --- a/compiler/testData/codegen/box/arrays/forEachBooleanArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachBooleanArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in BooleanArray(5)) { if (x != false) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachByteArray.kt b/compiler/testData/codegen/box/arrays/forEachByteArray.kt index 43cd3d0c675..1ae8205531a 100644 --- a/compiler/testData/codegen/box/arrays/forEachByteArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachByteArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in ByteArray(5)) { if (x != 0.toByte()) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachCharArray.kt b/compiler/testData/codegen/box/arrays/forEachCharArray.kt index 9056fc256a1..4b797671175 100644 --- a/compiler/testData/codegen/box/arrays/forEachCharArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachCharArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in CharArray(5)) { if (x != 0.toChar()) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachDoubleArray.kt b/compiler/testData/codegen/box/arrays/forEachDoubleArray.kt index 7ab2670ec3e..c1a79f222a3 100644 --- a/compiler/testData/codegen/box/arrays/forEachDoubleArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachDoubleArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in DoubleArray(5)) { if (x != 0.toDouble()) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachFloatArray.kt b/compiler/testData/codegen/box/arrays/forEachFloatArray.kt index b88ffcde5cd..8245beab4ee 100644 --- a/compiler/testData/codegen/box/arrays/forEachFloatArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachFloatArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in FloatArray(5)) { if (x != 0.toFloat()) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachIntArray.kt b/compiler/testData/codegen/box/arrays/forEachIntArray.kt index 6e06c6c2473..53ce12dd393 100644 --- a/compiler/testData/codegen/box/arrays/forEachIntArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachIntArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in IntArray(5)) { if (x != 0) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachLongArray.kt b/compiler/testData/codegen/box/arrays/forEachLongArray.kt index a31bab7db15..6ed0259f765 100644 --- a/compiler/testData/codegen/box/arrays/forEachLongArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachLongArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in LongArray(5)) { if (x != 0.toLong()) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/forEachShortArray.kt b/compiler/testData/codegen/box/arrays/forEachShortArray.kt index 241a0f4bca4..a9145d42422 100644 --- a/compiler/testData/codegen/box/arrays/forEachShortArray.kt +++ b/compiler/testData/codegen/box/arrays/forEachShortArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { for (x in ShortArray(5)) { if (x != 0.toShort()) return "Fail $x" diff --git a/compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt b/compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt index 25fccde7c2a..0493164e585 100644 --- a/compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt +++ b/compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME abstract class Table( val content: Array> diff --git a/compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt b/compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt index f0c3bec8030..d89fdf1f02b 100644 --- a/compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt +++ b/compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun test(y: Array>) { y[0] = kotlin.arrayOf("OK") } diff --git a/compiler/testData/codegen/box/arrays/inProjectionOfArray.kt b/compiler/testData/codegen/box/arrays/inProjectionOfArray.kt index 0fb2b61d742..87785a47aaf 100644 --- a/compiler/testData/codegen/box/arrays/inProjectionOfArray.kt +++ b/compiler/testData/codegen/box/arrays/inProjectionOfArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val x : Array> = arrayOf(arrayOf(1)) val y : Array> = x diff --git a/compiler/testData/codegen/box/arrays/inProjectionOfList.kt b/compiler/testData/codegen/box/arrays/inProjectionOfList.kt index 77e915bf540..3a22c9124c9 100644 --- a/compiler/testData/codegen/box/arrays/inProjectionOfList.kt +++ b/compiler/testData/codegen/box/arrays/inProjectionOfList.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/arrays/indices.kt b/compiler/testData/codegen/box/arrays/indices.kt index 375ea59c530..65976591a77 100644 --- a/compiler/testData/codegen/box/arrays/indices.kt +++ b/compiler/testData/codegen/box/arrays/indices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/arrays/indicesChar.kt b/compiler/testData/codegen/box/arrays/indicesChar.kt index c1de3df8f0b..5d3470e389d 100644 --- a/compiler/testData/codegen/box/arrays/indicesChar.kt +++ b/compiler/testData/codegen/box/arrays/indicesChar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/arrays/iterator.kt b/compiler/testData/codegen/box/arrays/iterator.kt index b7611deea0d..eb8f84cbb04 100644 --- a/compiler/testData/codegen/box/arrays/iterator.kt +++ b/compiler/testData/codegen/box/arrays/iterator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val x = Array(5, { it } ).iterator() var i = 0 diff --git a/compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt b/compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt index 7575809eb1f..753381f34f4 100644 --- a/compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = BooleanArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorByteArray.kt b/compiler/testData/codegen/box/arrays/iteratorByteArray.kt index 81bea57d919..259eb5f3200 100644 --- a/compiler/testData/codegen/box/arrays/iteratorByteArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorByteArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = ByteArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt b/compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt index e3ab3a6acb1..61c458433a7 100644 --- a/compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt +++ b/compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = ByteArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorCharArray.kt b/compiler/testData/codegen/box/arrays/iteratorCharArray.kt index 56ae4f5aa25..525910d31e3 100644 --- a/compiler/testData/codegen/box/arrays/iteratorCharArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorCharArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = CharArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt b/compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt index 6dc471a8c73..192625f22c6 100644 --- a/compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = DoubleArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorFloatArray.kt b/compiler/testData/codegen/box/arrays/iteratorFloatArray.kt index 8a3869499f5..4a5b86e694f 100644 --- a/compiler/testData/codegen/box/arrays/iteratorFloatArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorFloatArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = FloatArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorIntArray.kt b/compiler/testData/codegen/box/arrays/iteratorIntArray.kt index af689cfe8bf..2dd09e3a59c 100644 --- a/compiler/testData/codegen/box/arrays/iteratorIntArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorIntArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = IntArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorLongArray.kt b/compiler/testData/codegen/box/arrays/iteratorLongArray.kt index adbe9f255fb..b1033002764 100644 --- a/compiler/testData/codegen/box/arrays/iteratorLongArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorLongArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = LongArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt b/compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt index 83479cf485d..cc9cec5d570 100644 --- a/compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt +++ b/compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = LongArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/iteratorShortArray.kt b/compiler/testData/codegen/box/arrays/iteratorShortArray.kt index 566f92b7188..49807e23720 100644 --- a/compiler/testData/codegen/box/arrays/iteratorShortArray.kt +++ b/compiler/testData/codegen/box/arrays/iteratorShortArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = ShortArray(5) val x = a.iterator() diff --git a/compiler/testData/codegen/box/arrays/kt1291.kt b/compiler/testData/codegen/box/arrays/kt1291.kt index 20f64a8800d..02b5fd89707 100644 --- a/compiler/testData/codegen/box/arrays/kt1291.kt +++ b/compiler/testData/codegen/box/arrays/kt1291.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR var result = 0 fun Iterator.foreach(action: (T) -> Unit) { diff --git a/compiler/testData/codegen/box/arrays/kt2997.kt b/compiler/testData/codegen/box/arrays/kt2997.kt index 4afb7412d3e..ac70c009a2d 100644 --- a/compiler/testData/codegen/box/arrays/kt2997.kt +++ b/compiler/testData/codegen/box/arrays/kt2997.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR //KT-2997 Automatically cast error (Array) fun foo(a: Any): Int { diff --git a/compiler/testData/codegen/box/arrays/kt33.kt b/compiler/testData/codegen/box/arrays/kt33.kt index d1a553d56b2..25941e0f5cd 100644 --- a/compiler/testData/codegen/box/arrays/kt33.kt +++ b/compiler/testData/codegen/box/arrays/kt33.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box () : String { val s = ArrayList() s.add("foo") diff --git a/compiler/testData/codegen/box/arrays/kt3771.kt b/compiler/testData/codegen/box/arrays/kt3771.kt index dde9a09c1d3..60db734b833 100644 --- a/compiler/testData/codegen/box/arrays/kt3771.kt +++ b/compiler/testData/codegen/box/arrays/kt3771.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun fill(dest : Array, v : String) { dest[0] = v } diff --git a/compiler/testData/codegen/box/arrays/kt4348.kt b/compiler/testData/codegen/box/arrays/kt4348.kt index 5dff286c60d..aba4a1922d9 100644 --- a/compiler/testData/codegen/box/arrays/kt4348.kt +++ b/compiler/testData/codegen/box/arrays/kt4348.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun String.get(vararg value: Any) : String { return if (value[0] == 44 && value[1] == "example") "OK" else "fail" } diff --git a/compiler/testData/codegen/box/arrays/kt4357.kt b/compiler/testData/codegen/box/arrays/kt4357.kt index 9bde1e4a1c9..95b92765fa4 100644 --- a/compiler/testData/codegen/box/arrays/kt4357.kt +++ b/compiler/testData/codegen/box/arrays/kt4357.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val array = intArrayOf(11, 12, 13) val p = array.get(0) diff --git a/compiler/testData/codegen/box/arrays/kt594.kt b/compiler/testData/codegen/box/arrays/kt594.kt index ee97cfba58c..c67bd1b66e7 100644 --- a/compiler/testData/codegen/box/arrays/kt594.kt +++ b/compiler/testData/codegen/box/arrays/kt594.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR package array_test fun box() : String { diff --git a/compiler/testData/codegen/box/arrays/kt7009.kt b/compiler/testData/codegen/box/arrays/kt7009.kt index 71d0cca5c13..91cf7e4fa5b 100644 --- a/compiler/testData/codegen/box/arrays/kt7009.kt +++ b/compiler/testData/codegen/box/arrays/kt7009.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box() : String { diff --git a/compiler/testData/codegen/box/arrays/kt7288.kt b/compiler/testData/codegen/box/arrays/kt7288.kt index 318b65528bc..2c387e56cf9 100644 --- a/compiler/testData/codegen/box/arrays/kt7288.kt +++ b/compiler/testData/codegen/box/arrays/kt7288.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun test(b: Boolean): String { val a = if (b) IntArray(5) else LongArray(5) if (a is IntArray) { diff --git a/compiler/testData/codegen/box/arrays/kt779.kt b/compiler/testData/codegen/box/arrays/kt779.kt index ec017c95b7d..a56d1e0874b 100644 --- a/compiler/testData/codegen/box/arrays/kt779.kt +++ b/compiler/testData/codegen/box/arrays/kt779.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR val Array.length : Int get() = this.size fun box() = if(arrayOfNulls(10).length == 10) "OK" else "fail" diff --git a/compiler/testData/codegen/box/arrays/kt945.kt b/compiler/testData/codegen/box/arrays/kt945.kt index 3dfe96707f6..eaf6c5e61b6 100644 --- a/compiler/testData/codegen/box/arrays/kt945.kt +++ b/compiler/testData/codegen/box/arrays/kt945.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box() : String { val data = Array>(3) { Array(4, {false}) } for(d in data) { diff --git a/compiler/testData/codegen/box/arrays/longAsIndex.kt b/compiler/testData/codegen/box/arrays/longAsIndex.kt index 32772bc1601..c12d4dca9a4 100644 --- a/compiler/testData/codegen/box/arrays/longAsIndex.kt +++ b/compiler/testData/codegen/box/arrays/longAsIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun IntArray.set(index: Long, elem: Int) { this[index.toInt()] = elem } operator fun IntArray.get(index: Long) = this[index.toInt()] diff --git a/compiler/testData/codegen/box/arrays/multiArrayConstructors.kt b/compiler/testData/codegen/box/arrays/multiArrayConstructors.kt index b7290b74a2d..77663265456 100644 --- a/compiler/testData/codegen/box/arrays/multiArrayConstructors.kt +++ b/compiler/testData/codegen/box/arrays/multiArrayConstructors.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt index b91c89f0217..8657604547a 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { operator fun component1() = i + 1 operator fun component2() = i + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt index 87f6d32ef73..056a9f5f793 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { } diff --git a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt index 1ff07ff1ee2..6a9f6be2409 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { } diff --git a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index b13bed11683..376aabb2466 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { } diff --git a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt index b01006deaf9..f25b504d607 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { operator fun component1() = i + 1 operator fun component2() = i + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt index ddc718e184f..f0687781516 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt index 79380b28a3d..3dda25067f3 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt index b2e09334cb5..2cf40134bf3 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class M { operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index 196182eaf89..9ad2af28556 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class M { operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt b/compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt index d6982b96c5f..552a6653a97 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val array = arrayOf(doubleArrayOf(-1.0)) for (node in array) { diff --git a/compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt b/compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt index 4b8647168a0..c030c22b217 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = Array(2) { DoubleArray(3) } diff --git a/compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt b/compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt index 4c42fec0764..16a7300358b 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val transform = transform(Array(1) { BooleanArray(1) }) if (!transform[0][0]) return "OK" diff --git a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt index cde7cdce873..0ca7fc49d13 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt index 3922d69cfea..3e610b49997 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt index 21bb9d5f0f7..dad12c6d80f 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class M { operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index c4da6f22cf7..fde531f8d21 100644 --- a/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class M { operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt b/compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt index 194a4177220..5f181b59e92 100644 --- a/compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt +++ b/compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR typealias ArrayS = Array fun testArray() { diff --git a/compiler/testData/codegen/box/arrays/nonNullArray.kt b/compiler/testData/codegen/box/arrays/nonNullArray.kt index b672ab41e96..2e480979e6b 100644 --- a/compiler/testData/codegen/box/arrays/nonNullArray.kt +++ b/compiler/testData/codegen/box/arrays/nonNullArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class A() { class B(val i: Int) { } diff --git a/compiler/testData/codegen/box/arrays/primitiveArrays.kt b/compiler/testData/codegen/box/arrays/primitiveArrays.kt index daa4046d4ed..86e2b17cb5a 100644 --- a/compiler/testData/codegen/box/arrays/primitiveArrays.kt +++ b/compiler/testData/codegen/box/arrays/primitiveArrays.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/arrays/stdlib.kt b/compiler/testData/codegen/box/arrays/stdlib.kt index 09812153e99..41f1090eba1 100644 --- a/compiler/testData/codegen/box/arrays/stdlib.kt +++ b/compiler/testData/codegen/box/arrays/stdlib.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR interface ISized { val size : Int } diff --git a/compiler/testData/codegen/box/boxingOptimization/fold.kt b/compiler/testData/codegen/box/boxingOptimization/fold.kt index 320ee1c490a..7bb1608458b 100644 --- a/compiler/testData/codegen/box/boxingOptimization/fold.kt +++ b/compiler/testData/codegen/box/boxingOptimization/fold.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/boxingOptimization/kt6842.kt b/compiler/testData/codegen/box/boxingOptimization/kt6842.kt index de39e995a37..e3162a626a3 100644 --- a/compiler/testData/codegen/box/boxingOptimization/kt6842.kt +++ b/compiler/testData/codegen/box/boxingOptimization/kt6842.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt b/compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt index 381ace540c0..5ea75e4adf6 100644 --- a/compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt +++ b/compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME inline fun put( diff --git a/compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt b/compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt index 301546b33ce..e11a594361d 100644 --- a/compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt +++ b/compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/bridges/complexTraitImpl.kt b/compiler/testData/codegen/box/bridges/complexTraitImpl.kt index c2d856c8c35..ff5edc8750b 100644 --- a/compiler/testData/codegen/box/bridges/complexTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/complexTraitImpl.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME abstract class A { diff --git a/compiler/testData/codegen/box/bridges/kt2498.kt b/compiler/testData/codegen/box/bridges/kt2498.kt index 2cdb48641d3..63811a52bf8 100644 --- a/compiler/testData/codegen/box/bridges/kt2498.kt +++ b/compiler/testData/codegen/box/bridges/kt2498.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: NATIVE open class BaseStringList: ArrayList() { diff --git a/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt b/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt index 09d862b0df1..59e364fe37f 100644 --- a/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt +++ b/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME interface A { diff --git a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt index 1294af78bff..6d07d0b285a 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // KT-6042 java.lang.UnsupportedOperationException with ArrayList // IGNORE_BACKEND: NATIVE class A : ArrayList() diff --git a/compiler/testData/codegen/box/callableReference/bound/coercionToUnit.kt b/compiler/testData/codegen/box/callableReference/bound/coercionToUnit.kt index 8baa905d065..58883cc9de4 100644 --- a/compiler/testData/codegen/box/callableReference/bound/coercionToUnit.kt +++ b/compiler/testData/codegen/box/callableReference/bound/coercionToUnit.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +NewInference -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME class Foo diff --git a/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt b/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt index b0dc3021971..d14914a0157 100644 --- a/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt +++ b/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // LANGUAGE_VERSION: 1.2 var result = "" diff --git a/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt b/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt index ba86b34d299..95fa4b59ae6 100644 --- a/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt +++ b/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR val Array.firstElement: String get() = get(0) fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt b/compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt index 5c674f3517a..e8b3849e2a7 100644 --- a/compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt +++ b/compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt @@ -1,5 +1,4 @@ // KT-25514 Support usage of function reference with vararg where function of array is expected in new inference -// IGNORE_BACKEND: JS_IR fun foo(x: Int, vararg y: String): String = y[0] diff --git a/compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt b/compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt index bc33a1904b2..31183798872 100644 --- a/compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt +++ b/compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR interface A { fun foo(): Any? fun bar(): String diff --git a/compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt b/compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt index f54c79b755d..509ef35fabd 100644 --- a/compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt +++ b/compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR interface A { fun foo(): Any? } diff --git a/compiler/testData/codegen/box/casts/kt22714.kt b/compiler/testData/codegen/box/casts/kt22714.kt index 3d855c1fe25..ad7baa3f0b6 100644 --- a/compiler/testData/codegen/box/casts/kt22714.kt +++ b/compiler/testData/codegen/box/casts/kt22714.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun Array.getLength(): Int { return this.size } diff --git a/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt b/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt index d5e008203e2..dab9ff62303 100644 --- a/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt +++ b/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class Box(val value: T) fun run(vararg z: T): Box { diff --git a/compiler/testData/codegen/box/classLiteral/bound/simple.kt b/compiler/testData/codegen/box/classLiteral/bound/simple.kt index 60131ff2487..6c7092c7bbb 100644 --- a/compiler/testData/codegen/box/classLiteral/bound/simple.kt +++ b/compiler/testData/codegen/box/classLiteral/bound/simple.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val x: CharSequence = "" diff --git a/compiler/testData/codegen/box/classes/initializerBlockDImpl.kt b/compiler/testData/codegen/box/classes/initializerBlockDImpl.kt index acf7c248f9e..087f4ab0c54 100644 --- a/compiler/testData/codegen/box/classes/initializerBlockDImpl.kt +++ b/compiler/testData/codegen/box/classes/initializerBlockDImpl.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME class World() { public val items: ArrayList = ArrayList() diff --git a/compiler/testData/codegen/box/classes/kt1018.kt b/compiler/testData/codegen/box/classes/kt1018.kt index edbf0f79c33..6e192f5e0be 100644 --- a/compiler/testData/codegen/box/classes/kt1018.kt +++ b/compiler/testData/codegen/box/classes/kt1018.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR public class StockMarketTableModel() { public fun getColumnCount() : Int { diff --git a/compiler/testData/codegen/box/classes/kt1980.kt b/compiler/testData/codegen/box/classes/kt1980.kt index d2005359bcb..74414304f25 100644 --- a/compiler/testData/codegen/box/classes/kt1980.kt +++ b/compiler/testData/codegen/box/classes/kt1980.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR public inline fun Int.times(body : () -> Unit) { var count = this; while (count > 0) { diff --git a/compiler/testData/codegen/box/classes/kt2391.kt b/compiler/testData/codegen/box/classes/kt2391.kt index 85f38ca6fa6..2176c01b98e 100644 --- a/compiler/testData/codegen/box/classes/kt2391.kt +++ b/compiler/testData/codegen/box/classes/kt2391.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR public interface LoggerAware { public val logger: StringBuilder } diff --git a/compiler/testData/codegen/box/classes/kt343.kt b/compiler/testData/codegen/box/classes/kt343.kt index 065d3891a64..adae992ae21 100644 --- a/compiler/testData/codegen/box/classes/kt343.kt +++ b/compiler/testData/codegen/box/classes/kt343.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun launch(f : () -> Unit) { f() } diff --git a/compiler/testData/codegen/box/classes/kt471.kt b/compiler/testData/codegen/box/classes/kt471.kt index a7535d121c9..4de658a6626 100644 --- a/compiler/testData/codegen/box/classes/kt471.kt +++ b/compiler/testData/codegen/box/classes/kt471.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class MyNumber(val i: Int) { operator fun inc(): MyNumber = MyNumber(i+1) } diff --git a/compiler/testData/codegen/box/classes/kt633.kt b/compiler/testData/codegen/box/classes/kt633.kt index 8fb219ba3f3..04e0a26ec12 100644 --- a/compiler/testData/codegen/box/classes/kt633.kt +++ b/compiler/testData/codegen/box/classes/kt633.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class mInt(val i : Int) { override fun toString() : String = "mint: $i" operator fun plus(i : Int) = mInt(this.i + i) diff --git a/compiler/testData/codegen/box/classes/kt8011.kt b/compiler/testData/codegen/box/classes/kt8011.kt index ea40647c7bb..e4ab453aa33 100644 --- a/compiler/testData/codegen/box/classes/kt8011.kt +++ b/compiler/testData/codegen/box/classes/kt8011.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun testFun1(str: String): String { diff --git a/compiler/testData/codegen/box/classes/kt940.kt b/compiler/testData/codegen/box/classes/kt940.kt index e8862ef40a6..f9e99b3716a 100644 --- a/compiler/testData/codegen/box/classes/kt940.kt +++ b/compiler/testData/codegen/box/classes/kt940.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box() : String { diff --git a/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt b/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt index 8efe7e0b828..2333984acfa 100644 --- a/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt +++ b/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadPlusAssign.kt b/compiler/testData/codegen/box/classes/overloadPlusAssign.kt index 03b27b102c2..04fa8c842ca 100644 --- a/compiler/testData/codegen/box/classes/overloadPlusAssign.kt +++ b/compiler/testData/codegen/box/classes/overloadPlusAssign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt b/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt index 70cfeb85f02..005c69ce4f9 100644 --- a/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt +++ b/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt b/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt index 70cfeb85f02..005c69ce4f9 100644 --- a/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt +++ b/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadUnaryOperator.kt b/compiler/testData/codegen/box/classes/overloadUnaryOperator.kt index 6c5c3dbbb23..5813e80f4c2 100644 --- a/compiler/testData/codegen/box/classes/overloadUnaryOperator.kt +++ b/compiler/testData/codegen/box/classes/overloadUnaryOperator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt index 2a5ad021a97..185afa77134 100644 --- a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt +++ b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR open class Base(val callback: () -> String) class Outer { diff --git a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt index 7971aeef152..1d8ea921f17 100644 --- a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt +++ b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR open class Base(val callback: () -> String) class Outer { diff --git a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt index bda3cb7e131..86949e41e56 100644 --- a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt +++ b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt index 0a183342a1d..e232cfcc9dd 100644 --- a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt +++ b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt b/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt index 4e514638e2d..94562f8c7f1 100644 --- a/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt +++ b/compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR package d fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt index 5a891af0665..97dabd308f4 100644 --- a/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt +++ b/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR fun returnNullable(): String? = null inline fun Array.matchAll(fn: (String) -> Unit) { diff --git a/compiler/testData/codegen/box/controlStructures/continueInExpr.kt b/compiler/testData/codegen/box/controlStructures/continueInExpr.kt index 52bcbde0550..328f8efafec 100644 --- a/compiler/testData/codegen/box/controlStructures/continueInExpr.kt +++ b/compiler/testData/codegen/box/controlStructures/continueInExpr.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun concatNonNulls(strings: List): String { diff --git a/compiler/testData/codegen/box/controlStructures/continueInFor.kt b/compiler/testData/codegen/box/controlStructures/continueInFor.kt index 01e43617e42..7d5bb6a3dc4 100644 --- a/compiler/testData/codegen/box/controlStructures/continueInFor.kt +++ b/compiler/testData/codegen/box/controlStructures/continueInFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun for_int_range(): Int { var c = 0 for (i in 1..10) { diff --git a/compiler/testData/codegen/box/controlStructures/continueInForCondition.kt b/compiler/testData/codegen/box/controlStructures/continueInForCondition.kt index c184a8873f9..3ebace16102 100644 --- a/compiler/testData/codegen/box/controlStructures/continueInForCondition.kt +++ b/compiler/testData/codegen/box/controlStructures/continueInForCondition.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun foo(): List? = listOf("abcde") diff --git a/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt b/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt index 5caa3f25486..fe644d6e64b 100644 --- a/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt +++ b/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun for_int_range(): Int { var c = 0 loop@ for (i in 1..10) { diff --git a/compiler/testData/codegen/box/controlStructures/doWhile.kt b/compiler/testData/codegen/box/controlStructures/doWhile.kt index 005053af962..f9b776c736c 100644 --- a/compiler/testData/codegen/box/controlStructures/doWhile.kt +++ b/compiler/testData/codegen/box/controlStructures/doWhile.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { var x = 0 do x++ while (x < 5) diff --git a/compiler/testData/codegen/box/controlStructures/forArrayList.kt b/compiler/testData/codegen/box/controlStructures/forArrayList.kt index e33d36dea3d..cce12773de3 100644 --- a/compiler/testData/codegen/box/controlStructures/forArrayList.kt +++ b/compiler/testData/codegen/box/controlStructures/forArrayList.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val alist = arrayListOf(1, 2, 3) // : j.u.ArrayList diff --git a/compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt b/compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt index e354f96189e..04bd627762e 100644 --- a/compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt +++ b/compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val alist = arrayListOf(1 to 2, 2 to 3, 3 to 4) diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt index a12b209f557..fe1b8ff2934 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt index e63131e376b..a86b71e6fb5 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME var xs = intArrayOf(1, 2, 3) diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt index bac90c61410..6b256bcc1bb 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // LANGUAGE_VERSION: 1.3 diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt index 87190482f9c..863c2008135 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR class Del(var x: T) { operator fun getValue(thisRef: Any?, kProp: Any) = x diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt index 876ca9e703f..592ba5119db 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR var xs: IntArray = intArrayOf(1, 2, 3) get() = field set(ys) { diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt index 48879e798c0..9fc295b3eda 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box() : String { val a = arrayOfNulls(5) var i = 0 diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt index 1d24ba70ea1..10e29bcba89 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box() : String { val b : Array = arrayOfNulls (5) var i = 0 diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt index 44f23260790..566894de73a 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box() : String { val a = IntArray (5) var i = 0 diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayOfPrimArrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayOfPrimArrayWithIndex.kt index dbb8870db14..4110567b89a 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayOfPrimArrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayOfPrimArrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt index f3666a127fb..c0acf8265a9 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // See https://youtrack.jetbrains.com/issue/KT-22424 // IGNORE_BACKEND: JS // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt index 8817914d628..3e1960de238 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt index 0b2153c582c..a62b7a28345 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt index 7d595a997b1..5ba7716f540 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt index 471a3979447..61523d25894 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = byteArrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt index 0a2bb6669a5..7060eafb6d9 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = byteArrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt index 12450693283..b95ed235fe0 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = intArrayOf() diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt index 3bfdce7f44c..c03df2ec3c4 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt index 16c08cf0ff7..b9467837e7c 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt index ae4b6fe37bc..b813712969d 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt index 84a62a974e4..aebff5d02de 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = intArrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt index b2d360f0561..09df87d740b 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = intArrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt index ef6b92066d4..87b7f2c8cfe 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = arrayOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt index ac98cb1d605..3f1fa272344 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = shortArrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt index 5cd18e2349a..49055dc55a3 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val arr = shortArrayOf(10, 20, 30, 40) diff --git a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt index c0a6d83f0eb..fd529f7561e 100644 --- a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt index 62ae68415a1..a442bce6cf0 100644 --- a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt +++ b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt index e5d75f57991..e38b740c350 100644 --- a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt +++ b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt index e4161293973..6ecc9408208 100644 --- a/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt +++ b/compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d") diff --git a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt index cfcd71078b3..88796c7f316 100644 --- a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt +++ b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d").asSequence() diff --git a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt index 43e1d5c758a..a71fdae9033 100644 --- a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt +++ b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d").asSequence() diff --git a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt index 31c0ba5fb76..6496606222f 100644 --- a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt +++ b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d").asSequence() diff --git a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt index 1327d09fd0f..67196f6fadd 100644 --- a/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt +++ b/compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val xs = listOf("a", "b", "c", "d").asSequence() diff --git a/compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt b/compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt index 20b3503a4b7..83a919d7e9f 100644 --- a/compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt +++ b/compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun f(x: Any?): Any? { if (x is Array<*>) { for (i in x) { diff --git a/compiler/testData/codegen/box/controlStructures/kt3273.kt b/compiler/testData/codegen/box/controlStructures/kt3273.kt index 22611d6d422..187dc50ecf8 100644 --- a/compiler/testData/codegen/box/controlStructures/kt3273.kt +++ b/compiler/testData/codegen/box/controlStructures/kt3273.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun printlnMock(a: Any) {} public fun testCoalesce() { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt index 3645522e428..4db8ad73a72 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { val a = arrayListOf() diff --git a/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt b/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt index b139d4a3db5..0f1f1af6f80 100644 --- a/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt +++ b/compiler/testData/codegen/box/coroutines/asyncIteratorToList.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/await.kt b/compiler/testData/codegen/box/coroutines/await.kt index 8bb47d11aa4..bd911ade1ad 100644 --- a/compiler/testData/codegen/box/coroutines/await.kt +++ b/compiler/testData/codegen/box/coroutines/await.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/controlFlow/breakFinally.kt b/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt index 448a6601ac6..c4f2aa62734 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JS -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt index 18f936a0bec..0e2c8f0c2f3 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.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/controlFlow/forContinue.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt index 7524de0cea2..7b8b6065d3c 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.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/controlFlow/forStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt index a37836a956d..578ccfd944c 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.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/controlFlow/forWithStep.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt index d591bddd6b7..175aef23563 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.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/controlFlow/ifStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt index 134b6b43d18..0a1d8e8066e 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.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/controlFlow/switchLikeWhen.kt b/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt index ed6a2218723..992881b1633 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.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/featureIntersection/breakWithNonEmptyStack.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt index 47d15770c4e..bf37005e38e 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.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/featureIntersection/tailrec/extention.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt index 8a14d09ecaa..3d4b15eeddf 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.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/handleException.kt b/compiler/testData/codegen/box/coroutines/handleException.kt index 2f44299fefe..0b34eec444a 100644 --- a/compiler/testData/codegen/box/coroutines/handleException.kt +++ b/compiler/testData/codegen/box/coroutines/handleException.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/inlinedTryCatchFinally.kt b/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt index 9406a457440..487d20a4d56 100644 --- a/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt +++ b/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.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/intLikeVarSpilling/loadFromBooleanArray.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt index c48fcb3b0c5..eaf4a432293 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.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/intLikeVarSpilling/loadFromByteArray.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt index ffcac12f1a6..d8a41235ac9 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.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/iterateOverArray.kt b/compiler/testData/codegen/box/coroutines/iterateOverArray.kt index 41db33da1b6..de2d16db0c5 100644 --- a/compiler/testData/codegen/box/coroutines/iterateOverArray.kt +++ b/compiler/testData/codegen/box/coroutines/iterateOverArray.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/kt12958.kt b/compiler/testData/codegen/box/coroutines/kt12958.kt index 21be6f6462a..387e49d4303 100644 --- a/compiler/testData/codegen/box/coroutines/kt12958.kt +++ b/compiler/testData/codegen/box/coroutines/kt12958.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/kt25912.kt b/compiler/testData/codegen/box/coroutines/kt25912.kt index cbfe503bafb..90d0ec8fa27 100644 --- a/compiler/testData/codegen/box/coroutines/kt25912.kt +++ b/compiler/testData/codegen/box/coroutines/kt25912.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST -// IGNORE_BACKEND: JS_IR, JVM_IR, NATIVE +// IGNORE_BACKEND: JVM_IR, NATIVE import helpers.* import COROUTINES_PACKAGE.* diff --git a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt index 0e7a850d1d0..ebca2f67da4 100644 --- a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt +++ b/compiler/testData/codegen/box/coroutines/nestedTryCatch.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/nonLocalReturnFromInlineLambdaDeep.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt index 2f9e6aa7624..2a2dc55fd2e 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt index 13df197a964..067d7ba31c4 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.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/suspendFunctionAsCoroutine/inlineTwoReceivers.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt index 461f53455bd..71a5b75b0f3 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.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/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt index 39018934762..34599cbfbaa 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.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/tailCallOptimizations/inlineWithoutStateMachine.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt index 15941bbb3fe..ed114e23849 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.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/tailCallOptimizations/tryCatch.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt index 07b0d3534ad..5ab7debdf21 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.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/tryCatchFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt index 06147bbb36f..4c82b93b553 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.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/tryCatchWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt index d9f2c3d75db..ca936776f08 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.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/tryFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt index 7d5560b73cf..58e81869243 100644 --- a/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.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/unitTypeReturn/coroutineNonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt index ad377fca5b6..8c0bc7056ce 100644 --- a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.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/varSpilling/kt19475.kt b/compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt index 845999a6984..c7c5d0d87c4 100644 --- a/compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt +++ b/compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/dataClasses/arrayParams.kt b/compiler/testData/codegen/box/dataClasses/arrayParams.kt index 7c3e708d4bc..3c55fb1a0dd 100644 --- a/compiler/testData/codegen/box/dataClasses/arrayParams.kt +++ b/compiler/testData/codegen/box/dataClasses/arrayParams.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR data class A(val x: Array, val y: IntArray) fun foo(x: Array, y: IntArray) = A(x, y) diff --git a/compiler/testData/codegen/box/dataClasses/equals/genericarray.kt b/compiler/testData/codegen/box/dataClasses/equals/genericarray.kt index ae2466ef598..eaf4b04032e 100644 --- a/compiler/testData/codegen/box/dataClasses/equals/genericarray.kt +++ b/compiler/testData/codegen/box/dataClasses/equals/genericarray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR data class A(val v: Array) fun box() : String { diff --git a/compiler/testData/codegen/box/dataClasses/equals/intarray.kt b/compiler/testData/codegen/box/dataClasses/equals/intarray.kt index cb1bcb4a1ff..85eb1bec509 100644 --- a/compiler/testData/codegen/box/dataClasses/equals/intarray.kt +++ b/compiler/testData/codegen/box/dataClasses/equals/intarray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR data class A(val v: IntArray) fun box() : String { diff --git a/compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt b/compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt index f2923ae2213..b7756b0c036 100644 --- a/compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt +++ b/compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR data class A(val x: Int, val y: String) fun box(): String { diff --git a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt index 70113e3855a..fe527e1237d 100644 --- a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt +++ b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt index 71ea980abfd..13280feb86e 100644 --- a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt +++ b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME data class Station( val id: String?, diff --git a/compiler/testData/codegen/box/extensionFunctions/kt1953.kt b/compiler/testData/codegen/box/extensionFunctions/kt1953.kt index 46dc45bb0fa..c7f72f666f5 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt1953.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt1953.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val sb = StringBuilder() operator fun String.unaryPlus() { diff --git a/compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt b/compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt index fcabec49ff3..e2feab63b56 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class A { private val sb: StringBuilder = StringBuilder() diff --git a/compiler/testData/codegen/box/extensionFunctions/kt475.kt b/compiler/testData/codegen/box/extensionFunctions/kt475.kt index 3e1e034c422..f81998986f4 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt475.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt475.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box() : String { val array = ArrayList() diff --git a/compiler/testData/codegen/box/extensionFunctions/kt865.kt b/compiler/testData/codegen/box/extensionFunctions/kt865.kt index 4e73c95c119..b461ec16a08 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt865.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt865.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class Template() { val collected = ArrayList() diff --git a/compiler/testData/codegen/box/extensionProperties/kt9897.kt b/compiler/testData/codegen/box/extensionProperties/kt9897.kt index ca55cc69c13..728323b1c64 100644 --- a/compiler/testData/codegen/box/extensionProperties/kt9897.kt +++ b/compiler/testData/codegen/box/extensionProperties/kt9897.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR object Test { var z = "0" var l = 0L diff --git a/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt b/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt index c5aadc58a89..9ff0dd42c22 100644 --- a/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt +++ b/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR var z = "0" var l = 0L diff --git a/compiler/testData/codegen/box/functions/kt3214.kt b/compiler/testData/codegen/box/functions/kt3214.kt index 84b4aa1bfdd..8ff33fcad23 100644 --- a/compiler/testData/codegen/box/functions/kt3214.kt +++ b/compiler/testData/codegen/box/functions/kt3214.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class A { fun get(vararg x: Int) = x.size } diff --git a/compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt b/compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt index 49b8a1ce9c4..11042003d0f 100644 --- a/compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt +++ b/compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +ProperIeee754Comparisons // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/increment/arrayElement.kt b/compiler/testData/codegen/box/increment/arrayElement.kt index d03372e8abb..e74d4d23515 100644 --- a/compiler/testData/codegen/box/increment/arrayElement.kt +++ b/compiler/testData/codegen/box/increment/arrayElement.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val aByte: Array = arrayOf(1) val bByte: ByteArray = byteArrayOf(1) diff --git a/compiler/testData/codegen/box/increment/memberExtOnLong.kt b/compiler/testData/codegen/box/increment/memberExtOnLong.kt index 87cbcd5d7a2..ffbb49b904a 100644 --- a/compiler/testData/codegen/box/increment/memberExtOnLong.kt +++ b/compiler/testData/codegen/box/increment/memberExtOnLong.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME object ExtProvider { diff --git a/compiler/testData/codegen/box/increment/mutableListElement.kt b/compiler/testData/codegen/box/increment/mutableListElement.kt index a02b875c816..b861d31e15d 100644 --- a/compiler/testData/codegen/box/increment/mutableListElement.kt +++ b/compiler/testData/codegen/box/increment/mutableListElement.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt b/compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt index ec9b6c5bc42..25930ef462b 100644 --- a/compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt +++ b/compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class UInt(private val value: Int) { fun asInt() = value diff --git a/compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt index 4ecac71d7e7..2cd6b8b0441 100644 --- a/compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class Props(val intArray: IntArray) { val size get() = intArray.size diff --git a/compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt b/compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt index 684523a6813..4c7db0fd617 100644 --- a/compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt +++ b/compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class ULong(val l: Long) diff --git a/compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt index b7fe6084bd9..6904e07105d 100644 --- a/compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class UIntArray(private val intArray: IntArray) { val size get() = intArray.size diff --git a/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClass.kt index 4783543722e..1dec4ccb010 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClass.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class X(val x: String) inline class Y(val y: Number) diff --git a/compiler/testData/codegen/box/inlineClasses/iterateOverArrayOfInlineClassValues.kt b/compiler/testData/codegen/box/inlineClasses/iterateOverArrayOfInlineClassValues.kt index cbcd74c6717..185a6e267f2 100644 --- a/compiler/testData/codegen/box/inlineClasses/iterateOverArrayOfInlineClassValues.kt +++ b/compiler/testData/codegen/box/inlineClasses/iterateOverArrayOfInlineClassValues.kt @@ -1,7 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class Foo(val arg: Int) inline class AsAny(val arg: Any) diff --git a/compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt b/compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt index 576b3588167..cd363f30994 100644 --- a/compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt +++ b/compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt @@ -1,7 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class Foo(val arg: String) diff --git a/compiler/testData/codegen/box/inlineClasses/kt25246.kt b/compiler/testData/codegen/box/inlineClasses/kt25246.kt index 3abf4966284..d908791c903 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt25246.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt25246.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class Rgba(val value: Int) { inline val r: Int get() = (value shr 0) and 0xFF diff --git a/compiler/testData/codegen/box/inlineClasses/kt26103.kt b/compiler/testData/codegen/box/inlineClasses/kt26103.kt index 20b515f5a52..e4f532cd6db 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt26103.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt26103.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class Bar(val y: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt b/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt index d9528471540..8e9f8d50a96 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class GList(val xs: List) inline class GSList(val ss: List) diff --git a/compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt b/compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt index d1178a5abd4..eda2b8bf085 100644 --- a/compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt +++ b/compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class UInt(val value: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt b/compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt index 0e2ba0f6802..800eac24894 100644 --- a/compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt +++ b/compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR inline class UInt(val value: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/secondaryConstructorWithVararg.kt b/compiler/testData/codegen/box/inlineClasses/secondaryConstructorWithVararg.kt index e0a94b6356f..e898e64309c 100644 --- a/compiler/testData/codegen/box/inlineClasses/secondaryConstructorWithVararg.kt +++ b/compiler/testData/codegen/box/inlineClasses/secondaryConstructorWithVararg.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR inline class Z(val x: Int) { constructor(vararg ys: Long) : this(ys.size) diff --git a/compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierType.kt b/compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierType.kt index 948aa2aa925..fcbceb4b94f 100644 --- a/compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierType.kt +++ b/compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierType.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND: JVM_IR, JS_IR +// IGNORE_BACKEND: JVM_IR var global = "wrong" diff --git a/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt b/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt index 1b8ec436503..b0bb4aed5d1 100644 --- a/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt +++ b/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR open class SomeClass(val some: Double, val other: Int, vararg val args: String) { fun result() = args[1] } diff --git a/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt b/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt index 3a3905595f2..93d22ce72d0 100644 --- a/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt +++ b/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val list = ArrayList() list.add(1..3) diff --git a/compiler/testData/codegen/box/jdk/arrayList.kt b/compiler/testData/codegen/box/jdk/arrayList.kt index b6431915028..54a5b35886e 100644 --- a/compiler/testData/codegen/box/jdk/arrayList.kt +++ b/compiler/testData/codegen/box/jdk/arrayList.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val a = ArrayList() diff --git a/compiler/testData/codegen/box/jdk/kt1397.kt b/compiler/testData/codegen/box/jdk/kt1397.kt index 857f03a5e37..a18209a99c3 100644 --- a/compiler/testData/codegen/box/jdk/kt1397.kt +++ b/compiler/testData/codegen/box/jdk/kt1397.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: NATIVE class IntArrayList(): ArrayList() { diff --git a/compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt b/compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt index 1bb7a3d3b76..90b61d66b5f 100644 --- a/compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt +++ b/compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C { fun calc() : String { return "OK" diff --git a/compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt b/compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt index f2c7a52e632..87afaf89ed0 100644 --- a/compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt +++ b/compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // Enable for JVM backend when KT-8120 gets fixed // IGNORE_BACKEND: JVM diff --git a/compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt b/compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt index ca6883635e3..3cae7289280 100644 --- a/compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt +++ b/compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { var log = "" diff --git a/compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt b/compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt index 607610d8a4f..57c51e32a67 100644 --- a/compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt +++ b/compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR fun box(): String { var log = "" diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt index 5438e284222..d3fce253d5a 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { operator fun component1() = i + 1 operator fun component2() = i + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt index 152e28718cc..fb470307de3 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { } diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt index ece41a6770d..344e2051fc9 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { } diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index 42cb7917e1c..2b223cd505e 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { } diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt index 67bfe8624eb..a744e0370ee 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class C(val i: Int) { operator fun component1() = i + 1 operator fun component2() = i + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt index 94ec0e08ffd..e9facb62192 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt index 136a4410add..7afc1023d61 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt index c7c17bccc82..499b2e18356 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class M { operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index 8f46bb9f598..b20eb9d7453 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class M { operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt b/compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt index 3b81afbd468..644125c9809 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class A { operator fun component1() = "O" operator fun component2(): String = throw RuntimeException("fail 0") diff --git a/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt b/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt index d7eefba8b1d..358a1b9ddfd 100644 --- a/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt +++ b/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import Host.x diff --git a/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt b/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt index 57edc0a5a1e..bfe33afdeaa 100644 --- a/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt +++ b/compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import Host.x diff --git a/compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt b/compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt index 76595f10b6f..86cd1babbab 100644 --- a/compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt +++ b/compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR public inline fun T.with(f: T.() -> Unit): T { this.f() return this diff --git a/compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt b/compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt index 9ee38e3a41c..0c80cc8edb7 100644 --- a/compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt +++ b/compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR var log = "" fun foo(): Int { diff --git a/compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt b/compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt index ea561d7d1c6..7ca0f34b787 100644 --- a/compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt +++ b/compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun checkLess(x: Array, y: Array) = when { x >= y -> "Fail $x >= $y" !(x < y) -> "Fail !($x < $y)" diff --git a/compiler/testData/codegen/box/operatorConventions/plusExplicit.kt b/compiler/testData/codegen/box/operatorConventions/plusExplicit.kt index bfc3791b643..3e38b44d62b 100644 --- a/compiler/testData/codegen/box/operatorConventions/plusExplicit.kt +++ b/compiler/testData/codegen/box/operatorConventions/plusExplicit.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun bar1(): String { diff --git a/compiler/testData/codegen/box/optimizations/kt20844.kt b/compiler/testData/codegen/box/optimizations/kt20844.kt index c017cbb3a25..6c359e3c88b 100644 --- a/compiler/testData/codegen/box/optimizations/kt20844.kt +++ b/compiler/testData/codegen/box/optimizations/kt20844.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR //WITH_RUNTIME fun foo(x: String, ys: List) = diff --git a/compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt b/compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt index fe69ad10679..99387957c24 100644 --- a/compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt +++ b/compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +NewInference -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // FILE: messages/foo.kt diff --git a/compiler/testData/codegen/box/platformTypes/primitives/assign.kt b/compiler/testData/codegen/box/platformTypes/primitives/assign.kt index 9999116bf15..97730470dfc 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/assign.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/assign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt b/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt index 9ee07956946..288a8111d76 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/dec.kt b/compiler/testData/codegen/box/platformTypes/primitives/dec.kt index 293bae8eb3c..04574676e01 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/dec.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/dec.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/div.kt b/compiler/testData/codegen/box/platformTypes/primitives/div.kt index 243d5bdeb31..1d19aa08bde 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/div.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/div.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(2) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equals.kt b/compiler/testData/codegen/box/platformTypes/primitives/equals.kt index a150ce6741b..f11e683d8cf 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/equals.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/equals.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt b/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt index ef86807890a..884ce0f7752 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/inc.kt b/compiler/testData/codegen/box/platformTypes/primitives/inc.kt index ab7392b1149..25de0090050 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/inc.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/inc.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/minus.kt b/compiler/testData/codegen/box/platformTypes/primitives/minus.kt index 79315d63b80..cf14e881a9a 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/minus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/minus.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/mod.kt b/compiler/testData/codegen/box/platformTypes/primitives/mod.kt index 19a5b405785..f72a03f668d 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/mod.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/mod.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(2) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/not.kt b/compiler/testData/codegen/box/platformTypes/primitives/not.kt index 7b218fb0e37..0c280a8febc 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/not.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/not.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(true) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt b/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt index 2db15dcc7de..0f57a857b28 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/plus.kt b/compiler/testData/codegen/box/platformTypes/primitives/plus.kt index d4e64bc24b3..97b8744ab0d 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/plus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/plus.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt b/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt index a9bfa928437..cc3512f76a0 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt b/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt index 7eccf5c008b..ceb1961f5df 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(2) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/times.kt b/compiler/testData/codegen/box/platformTypes/primitives/times.kt index fb08be0c3a7..939bc056018 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/times.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/times.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt b/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt index 46c6a98a7be..429eaf77336 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/toString.kt b/compiler/testData/codegen/box/platformTypes/primitives/toString.kt index f3dbe253dac..3ad15f84649 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/toString.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/toString.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt b/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt index b5a95f96d90..30ed37ccf3b 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt b/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt index e650b603861..c987878a3a1 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { val l = ArrayList() l.add(1) diff --git a/compiler/testData/codegen/box/primitiveTypes/conversions.kt b/compiler/testData/codegen/box/primitiveTypes/conversions.kt index 14f50cfbfcc..a8521d51a0a 100644 --- a/compiler/testData/codegen/box/primitiveTypes/conversions.kt +++ b/compiler/testData/codegen/box/primitiveTypes/conversions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/primitiveTypes/kt13023.kt b/compiler/testData/codegen/box/primitiveTypes/kt13023.kt index 138dfae47a7..602654d9563 100644 --- a/compiler/testData/codegen/box/primitiveTypes/kt13023.kt +++ b/compiler/testData/codegen/box/primitiveTypes/kt13023.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/properties/kt3556.kt b/compiler/testData/codegen/box/properties/kt3556.kt index e1b88bc1576..adce0368131 100644 --- a/compiler/testData/codegen/box/properties/kt3556.kt +++ b/compiler/testData/codegen/box/properties/kt3556.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class Test { val a : String = "1" private val b : String get() = a diff --git a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt index c38a1c8ec70..6201cf0b728 100644 --- a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt +++ b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME var order = StringBuilder() diff --git a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt index fee880b3675..433614b74aa 100644 --- a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt +++ b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME var order = StringBuilder() diff --git a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt index 95293e7f534..1128de60a56 100644 --- a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt +++ b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME var order = StringBuilder() diff --git a/compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt b/compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt index 7f4e0426b4a..73f9e466828 100644 --- a/compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // Auto-generated by GenerateInRangeExpressionTestData. Do not edit! // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt b/compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt index 002a0fb2c8d..952f5e7b4e9 100644 --- a/compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // Auto-generated by GenerateInRangeExpressionTestData. Do not edit! // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/contains/inArray.kt b/compiler/testData/codegen/box/ranges/contains/inArray.kt index e8a482633e6..496d9095a00 100644 --- a/compiler/testData/codegen/box/ranges/contains/inArray.kt +++ b/compiler/testData/codegen/box/ranges/contains/inArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String = when { diff --git a/compiler/testData/codegen/box/ranges/contains/inIterable.kt b/compiler/testData/codegen/box/ranges/contains/inIterable.kt index cd9bf9b361d..8a418e12d1a 100644 --- a/compiler/testData/codegen/box/ranges/contains/inIterable.kt +++ b/compiler/testData/codegen/box/ranges/contains/inIterable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val iterable: Iterable = listOf(1, 2, 3) diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt index 9e639afea89..ec23e8a7493 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt index de353d32a84..f4b018a1ee8 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt index 73e2abe80db..b46b4812732 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt index 51c06614ed0..db45263759f 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt index 7c2781250c0..e1e5fb603d7 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt index 3e1d7aa42df..2fb6c207bda 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt index e3f4c06766d..295f66bf5c9 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt b/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt index 91258c673cf..4d776ba833e 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt index b6501f23a96..a702ad58de0 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME abstract class BaseGeneric(val t: T) { diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt index f946f7d1ce2..6a66952d7d5 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME abstract class BaseGeneric(val t: T) { diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt index 990c4755781..1ff6d06f18a 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME abstract class BaseGeneric(val t: T) { diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt index d05b3cd4c82..adeb7decaed 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME abstract class BaseGeneric(val t: T) { diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt index daf3114304d..47b299b9a5c 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt index 76692c4af36..9bd4610d351 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt b/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt index ceb1091b392..c85ebc7b78e 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt b/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt index 08f83719b37..59f09a0c7bd 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt b/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt index 77d0ff6e70b..db6c269f554 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt index b9576cf588c..b36db60681f 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt index c725abd3a75..f29f5a657be 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forIntRange.kt b/compiler/testData/codegen/box/ranges/forIntRange.kt index 42af0e74395..1dd52f48533 100644 --- a/compiler/testData/codegen/box/ranges/forIntRange.kt +++ b/compiler/testData/codegen/box/ranges/forIntRange.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box() : String { diff --git a/compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt b/compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt index 87f31644c09..d8fef0b509a 100644 --- a/compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt +++ b/compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME operator fun Int.component1(): String { diff --git a/compiler/testData/codegen/box/regressions/Kt1149.kt b/compiler/testData/codegen/box/regressions/Kt1149.kt index 484218fded9..f1581c61cf7 100644 --- a/compiler/testData/codegen/box/regressions/Kt1149.kt +++ b/compiler/testData/codegen/box/regressions/Kt1149.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME package test.regressions.kt1149 diff --git a/compiler/testData/codegen/box/regressions/Kt1619Test.kt b/compiler/testData/codegen/box/regressions/Kt1619Test.kt index c1cf73453a3..d8f38f37765 100644 --- a/compiler/testData/codegen/box/regressions/Kt1619Test.kt +++ b/compiler/testData/codegen/box/regressions/Kt1619Test.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME package regressions diff --git a/compiler/testData/codegen/box/regressions/Kt2495Test.kt b/compiler/testData/codegen/box/regressions/Kt2495Test.kt index c4e4ef4973a..072eba9a2f8 100644 --- a/compiler/testData/codegen/box/regressions/Kt2495Test.kt +++ b/compiler/testData/codegen/box/regressions/Kt2495Test.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME package regressions diff --git a/compiler/testData/codegen/box/regressions/generic.kt b/compiler/testData/codegen/box/regressions/generic.kt index c9e7507b5e0..c5cf2b2efff 100644 --- a/compiler/testData/codegen/box/regressions/generic.kt +++ b/compiler/testData/codegen/box/regressions/generic.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun ArrayList.findAll(predicate: (T) -> Boolean): ArrayList { diff --git a/compiler/testData/codegen/box/regressions/kt15196.kt b/compiler/testData/codegen/box/regressions/kt15196.kt index 864720d7aa6..debf64aeb70 100644 --- a/compiler/testData/codegen/box/regressions/kt15196.kt +++ b/compiler/testData/codegen/box/regressions/kt15196.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun foo() { val array = Array(0, { IntArray(0) } ) diff --git a/compiler/testData/codegen/box/regressions/kt2210.kt b/compiler/testData/codegen/box/regressions/kt2210.kt index 7b2c15ed68b..95f4d64882a 100644 --- a/compiler/testData/codegen/box/regressions/kt2210.kt +++ b/compiler/testData/codegen/box/regressions/kt2210.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class A(t: Array>) { val a:Array> = t } diff --git a/compiler/testData/codegen/box/regressions/kt2509.kt b/compiler/testData/codegen/box/regressions/kt2509.kt index 7e6f5684bc5..10529d6d497 100644 --- a/compiler/testData/codegen/box/regressions/kt2509.kt +++ b/compiler/testData/codegen/box/regressions/kt2509.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { A() return "OK" diff --git a/compiler/testData/codegen/box/regressions/kt3850.kt b/compiler/testData/codegen/box/regressions/kt3850.kt index 2f41ff01921..03acfce7df7 100644 --- a/compiler/testData/codegen/box/regressions/kt3850.kt +++ b/compiler/testData/codegen/box/regressions/kt3850.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR private class One { val a1 = arrayOf( object { val fy = "text"} diff --git a/compiler/testData/codegen/box/regressions/kt5953.kt b/compiler/testData/codegen/box/regressions/kt5953.kt index 062242a13e2..3a7cdb1f7e5 100644 --- a/compiler/testData/codegen/box/regressions/kt5953.kt +++ b/compiler/testData/codegen/box/regressions/kt5953.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/regressions/kt6153.kt b/compiler/testData/codegen/box/regressions/kt6153.kt index 8d8ebb5a372..cc21778d197 100644 --- a/compiler/testData/codegen/box/regressions/kt6153.kt +++ b/compiler/testData/codegen/box/regressions/kt6153.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // KT-6153 java.lang.IllegalStateException while building object Bug { fun title(id:Int) = when (id) { diff --git a/compiler/testData/codegen/box/regressions/kt789.kt b/compiler/testData/codegen/box/regressions/kt789.kt index 21b36c3fbeb..9849559160b 100644 --- a/compiler/testData/codegen/box/regressions/kt789.kt +++ b/compiler/testData/codegen/box/regressions/kt789.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR package foo fun box() : String { diff --git a/compiler/testData/codegen/box/regressions/kt998.kt b/compiler/testData/codegen/box/regressions/kt998.kt index 5dec3537077..7fef173ff74 100644 --- a/compiler/testData/codegen/box/regressions/kt998.kt +++ b/compiler/testData/codegen/box/regressions/kt998.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun findPairless(a : IntArray) : Int { diff --git a/compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt b/compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt index 5fca292b12b..993d8ad63cd 100644 --- a/compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt +++ b/compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun foo(useScriptArgs: Array?) { val constructorArgs: Array = arrayOf(useScriptArgs.orEmpty()) } diff --git a/compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt b/compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt index 6695370834c..1a2bee24db9 100644 --- a/compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt +++ b/compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR inline fun jaggedArray(x: (Int, Int) -> T): Array> = Array(1) { i -> Array(1) { j -> x(i, j) } } diff --git a/compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt b/compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt index cefc30e375c..aa8f36fc23e 100644 --- a/compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt +++ b/compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR inline fun jaggedArray(x: (Int, Int, Int) -> T): Array>> = Array(1) { i -> Array(1) { j -> Array(1) { k -> x(i, j, k) } diff --git a/compiler/testData/codegen/box/reified/copyToArray.kt b/compiler/testData/codegen/box/reified/copyToArray.kt index a0fb6c64d20..4cbf10bdec5 100644 --- a/compiler/testData/codegen/box/reified/copyToArray.kt +++ b/compiler/testData/codegen/box/reified/copyToArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/reified/spreads.kt b/compiler/testData/codegen/box/reified/spreads.kt index d059b85a689..d77eabc10a9 100644 --- a/compiler/testData/codegen/box/reified/spreads.kt +++ b/compiler/testData/codegen/box/reified/spreads.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/reified/varargs.kt b/compiler/testData/codegen/box/reified/varargs.kt index 3c013e8d720..681d7da31b8 100644 --- a/compiler/testData/codegen/box/reified/varargs.kt +++ b/compiler/testData/codegen/box/reified/varargs.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/safeCall/kt247.kt b/compiler/testData/codegen/box/safeCall/kt247.kt index 00b42a32c20..55a7fbe74f8 100644 --- a/compiler/testData/codegen/box/safeCall/kt247.kt +++ b/compiler/testData/codegen/box/safeCall/kt247.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun t1() : Boolean { val s1 : String? = "sff" val s2 : String? = null diff --git a/compiler/testData/codegen/box/secondaryConstructors/varargs.kt b/compiler/testData/codegen/box/secondaryConstructors/varargs.kt index 2c1732cc023..39bfb8bf7a9 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/varargs.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/varargs.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun join(x: Array): String { var result = "" for (i in x) { diff --git a/compiler/testData/codegen/box/smartCasts/whenSmartCast.kt b/compiler/testData/codegen/box/smartCasts/whenSmartCast.kt index 34a96d0ff9c..8069048ce00 100644 --- a/compiler/testData/codegen/box/smartCasts/whenSmartCast.kt +++ b/compiler/testData/codegen/box/smartCasts/whenSmartCast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun baz(s: String?): Int { if (s == null) return 0 return when(s) { diff --git a/compiler/testData/codegen/box/specialBuiltins/bridges.kt b/compiler/testData/codegen/box/specialBuiltins/bridges.kt index 27e087b930e..f6c2b254e26 100644 --- a/compiler/testData/codegen/box/specialBuiltins/bridges.kt +++ b/compiler/testData/codegen/box/specialBuiltins/bridges.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: NATIVE interface A0 { diff --git a/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt b/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt index 6960f8989c5..bc281a4b112 100644 --- a/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt +++ b/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: NATIVE class A : ArrayList() { diff --git a/compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt b/compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt index 252161def06..38e661755cd 100644 --- a/compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt +++ b/compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box() : String { val s = "abc" val test1 = """$s""" diff --git a/compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt b/compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt index 2916bc58c5c..1fb97bd718e 100644 --- a/compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt +++ b/compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR class P(val actual: String, val expected: String) fun array(vararg s: P) = s diff --git a/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt b/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt index f6d0a49e1e8..cf713b647c2 100644 --- a/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt +++ b/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME fun box(): String { diff --git a/compiler/testData/codegen/box/super/basicmethodSuperClass.kt b/compiler/testData/codegen/box/super/basicmethodSuperClass.kt index 1da448c04e0..ccd620c34fd 100644 --- a/compiler/testData/codegen/box/super/basicmethodSuperClass.kt +++ b/compiler/testData/codegen/box/super/basicmethodSuperClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: NATIVE class N() : ArrayList() { diff --git a/compiler/testData/codegen/box/super/kt4982.kt b/compiler/testData/codegen/box/super/kt4982.kt index 9451086c444..8c01d8f2212 100644 --- a/compiler/testData/codegen/box/super/kt4982.kt +++ b/compiler/testData/codegen/box/super/kt4982.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR abstract class WaitFor { init { condition() diff --git a/compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt b/compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt index 84556646a40..eb092f89776 100644 --- a/compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt +++ b/compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR open class A(val array: Array) class B : A(arrayOf("OK")) diff --git a/compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt b/compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt index 19a38ac7196..9773342f5fa 100644 --- a/compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt +++ b/compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR abstract class Base(val s: String, vararg ints: Int) fun foo(s: String, ints: IntArray) = object : Base(ints = *ints, s = s) {} diff --git a/compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt b/compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt index 4e5178c79e8..eed82fc0045 100644 --- a/compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt +++ b/compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME typealias L = List diff --git a/compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt b/compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt index e44fe1ea5af..8be95d2e91d 100644 --- a/compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt +++ b/compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR typealias BoolArray = Array typealias IArray = IntArray typealias MyArray = Array diff --git a/compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt b/compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt index e15927dda7a..6cc4d47dc23 100644 --- a/compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt +++ b/compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun booleanVararg(vararg xs: Boolean) { if (xs.size != 1 && xs[0] != true) throw AssertionError() } diff --git a/compiler/testData/codegen/box/vararg/kt1978.kt b/compiler/testData/codegen/box/vararg/kt1978.kt index a83295e08a7..6d27ec3a311 100644 --- a/compiler/testData/codegen/box/vararg/kt1978.kt +++ b/compiler/testData/codegen/box/vararg/kt1978.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun aa(vararg a : String): String = a[0] fun box(): String { diff --git a/compiler/testData/codegen/box/vararg/kt6192.kt b/compiler/testData/codegen/box/vararg/kt6192.kt index b08c591090c..89296cf18c2 100644 --- a/compiler/testData/codegen/box/vararg/kt6192.kt +++ b/compiler/testData/codegen/box/vararg/kt6192.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun barB(vararg args: Byte) = args fun barC(vararg args: Char) = args diff --git a/compiler/testData/codegen/box/vararg/kt796_797.kt b/compiler/testData/codegen/box/vararg/kt796_797.kt index fc86d402b3b..ebb6be014c3 100644 --- a/compiler/testData/codegen/box/vararg/kt796_797.kt +++ b/compiler/testData/codegen/box/vararg/kt796_797.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR operator fun Array?.get(i : Int?) = this!!.get(i!!) fun array(vararg t : T) : Array = t as Array diff --git a/compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt b/compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt index 37b10a7e6cd..b41ddc0c46d 100644 --- a/compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt +++ b/compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt @@ -1,5 +1,4 @@ // !LANGUAGE: -ProhibitAssigningSingleElementsToVarargsInNamedForm -// IGNORE_BACKEND: JS_IR fun box(): String { if (test1(p = 1) != "1") return "fail 1" diff --git a/compiler/testData/codegen/box/vararg/spreadCopiesArray.kt b/compiler/testData/codegen/box/vararg/spreadCopiesArray.kt index 7fdb2e0a06e..d5b7fc1fe65 100644 --- a/compiler/testData/codegen/box/vararg/spreadCopiesArray.kt +++ b/compiler/testData/codegen/box/vararg/spreadCopiesArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/vararg/varargInFunParam.kt b/compiler/testData/codegen/box/vararg/varargInFunParam.kt index ec863cfeb51..6f0d02a20d0 100644 --- a/compiler/testData/codegen/box/vararg/varargInFunParam.kt +++ b/compiler/testData/codegen/box/vararg/varargInFunParam.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun box(): String { if (test1() != "") return "fail 1" if (test1(1) != "1") return "fail 2" diff --git a/compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt b/compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt index ce37992460d..3c7dca68c44 100644 --- a/compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt +++ b/compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun foo(a: Int, vararg b: Int, f: (IntArray) -> String): String { return "test" + a + " " + f(b) } diff --git a/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt b/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt index bca8f62a582..69c959e13cb 100644 --- a/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt +++ b/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR enum class Color { RED, GREEN, BLUE } fun foo(arr: Array): Color { diff --git a/compiler/testData/codegen/box/when/kt5448.kt b/compiler/testData/codegen/box/when/kt5448.kt index de0f570b2be..e1c81b55ca9 100644 --- a/compiler/testData/codegen/box/when/kt5448.kt +++ b/compiler/testData/codegen/box/when/kt5448.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME class A diff --git a/compiler/testData/codegen/box/when/range.kt b/compiler/testData/codegen/box/when/range.kt index 23953e79be2..a8d8c41c144 100644 --- a/compiler/testData/codegen/box/when/range.kt +++ b/compiler/testData/codegen/box/when/range.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR fun isDigit(a: Int) : String { val aa = ArrayList () aa.add(239) diff --git a/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt b/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt index 87e50a57db5..11824481064 100644 --- a/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt +++ b/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val String.name get() = this diff --git a/compiler/testData/codegen/box/when/switchOptimizationDense.kt b/compiler/testData/codegen/box/when/switchOptimizationDense.kt index f67c715d15d..0d3a604681f 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationDense.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationDense.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // CHECK_CASES_COUNT: function=dense count=10 // CHECK_IF_COUNT: function=dense count=0 diff --git a/compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt b/compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt index 203b798ac76..1883f1a9580 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // CHECK_CASES_COUNT: function=foo count=9 // CHECK_IF_COUNT: function=foo count=0 diff --git a/compiler/testData/codegen/box/when/switchOptimizationSparse.kt b/compiler/testData/codegen/box/when/switchOptimizationSparse.kt index 7a8d1fac925..f7ce09c8a16 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationSparse.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationSparse.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // CHECK_CASES_COUNT: function=sparse count=3 // CHECK_IF_COUNT: function=sparse count=0 diff --git a/compiler/testData/codegen/box/when/switchOptimizationStatement.kt b/compiler/testData/codegen/box/when/switchOptimizationStatement.kt index c3b7ba894ca..0a827fd3f76 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationStatement.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationStatement.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // CHECK_CASES_COUNT: function=exhaustive count=3 // CHECK_IF_COUNT: function=exhaustive count=0 diff --git a/compiler/testData/codegen/box/when/switchOptimizationUnordered.kt b/compiler/testData/codegen/box/when/switchOptimizationUnordered.kt index 47b15f2c0de..0700ea3d53b 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationUnordered.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationUnordered.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // CHECK_CASES_COUNT: function=foo count=3 // CHECK_IF_COUNT: function=foo count=0 diff --git a/compiler/testData/codegen/box/when/switchOptimizationWithGap.kt b/compiler/testData/codegen/box/when/switchOptimizationWithGap.kt index 6c7472ad2b3..5b84ac18c1c 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationWithGap.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationWithGap.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME // CHECK_CASES_COUNT: function=foo count=4 // CHECK_IF_COUNT: function=foo count=1 diff --git a/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt b/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt index fb15b54ff76..48ebea48731 100644 --- a/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt +++ b/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR var x = 0 fun inc(): Int { x++ diff --git a/compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt b/compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt index 7c8b0e7c371..18ec8a99651 100644 --- a/compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt +++ b/compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR var subjectEvaluated = 0 fun String.foo() = length.also { ++subjectEvaluated } diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt index c5ed7e0eab6..1fd0b4a9d3d 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS_IR fun dense(x: Int): Int { return when (val xx = x) { diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt index 5e8be00bc84..65a9becfd38 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS_IR fun sparse(x: Int): Int { return when (val xx = (x % 4) * 100) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt b/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt index a0a8ce8077f..7dc7f9e6f36 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // FILE: 1.kt //WITH_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt index dbf2eba622d..39030f50187 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt index 90362bdeafa..98758c630e1 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt index dcfc3f6a1ac..8849e4c20a2 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // FILE: 1.kt package test diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt index 1427466e70b..a8397c84885 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt @@ -68,7 +68,13 @@ private val runtimeSourcesCommon = listOfKtFilesFrom( // Full version is defined in stdlib // This file is useful for smaller subset of runtime sources - "libraries/stdlib/js/irRuntime/rangeExtensions.kt" + "libraries/stdlib/js/irRuntime/rangeExtensions.kt", + + // Mostly array-specific stuff + "libraries/stdlib/js/src/kotlin/builtins.kt", + + // Inlining of js fun doesn't update the variables inside + "libraries/stdlib/js/src/kotlin/jsTypeOf.kt" ) @@ -152,7 +158,7 @@ abstract class BasicIrBoxTest( filesToCompile, config.configuration, FqName((testPackage?.let { "$it." } ?: "") + testFunction), - listOf(runtimeResult!!.moduleDescriptor)) + listOf(runtimeResult!!)) outputFile.write(result.generatedCode) } diff --git a/js/js.translator/testData/_commonFiles/asserts.kt b/js/js.translator/testData/_commonFiles/asserts.kt index 360c80c0d5d..59a50e3507b 100644 --- a/js/js.translator/testData/_commonFiles/asserts.kt +++ b/js/js.translator/testData/_commonFiles/asserts.kt @@ -34,3 +34,12 @@ fun testTrue(f: () -> Boolean) { fun testFalse(f: () -> Boolean) { assertFalse(f(), f.toString()) } + +fun assertFails(block: () -> Unit): Throwable { + try { + block() + } catch (t: Throwable) { + return t + } + fail("Expected an exception to be thrown, but was completed successfully.") +} \ No newline at end of file diff --git a/js/js.translator/testData/box/closure/closureArrayListInstance.kt b/js/js.translator/testData/box/closure/closureArrayListInstance.kt index a8f23d53710..bd296fe2c60 100644 --- a/js/js.translator/testData/box/closure/closureArrayListInstance.kt +++ b/js/js.translator/testData/box/closure/closureArrayListInstance.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt b/js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt index a6b623ec9e6..517509efb72 100644 --- a/js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt +++ b/js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1286 // KT-4218 Nested function literal on singleton object fails diff --git a/js/js.translator/testData/box/closure/closureThisAndReceiver.kt b/js/js.translator/testData/box/closure/closureThisAndReceiver.kt index 6a0cfc2f5ac..0a0b5c90169 100644 --- a/js/js.translator/testData/box/closure/closureThisAndReceiver.kt +++ b/js/js.translator/testData/box/closure/closureThisAndReceiver.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1292 package foo diff --git a/js/js.translator/testData/box/closure/iteratingCallbacks.kt b/js/js.translator/testData/box/closure/iteratingCallbacks.kt index 3c974ce55d7..1537573a16e 100644 --- a/js/js.translator/testData/box/closure/iteratingCallbacks.kt +++ b/js/js.translator/testData/box/closure/iteratingCallbacks.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/closure/lambdaInLocalFun.kt b/js/js.translator/testData/box/closure/lambdaInLocalFun.kt index 262b13a14c4..7ee051a6ed7 100644 --- a/js/js.translator/testData/box/closure/lambdaInLocalFun.kt +++ b/js/js.translator/testData/box/closure/lambdaInLocalFun.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1288 package foo diff --git a/js/js.translator/testData/box/closure/localParameterInCallback.kt b/js/js.translator/testData/box/closure/localParameterInCallback.kt index 192e6c94772..18bdda29212 100644 --- a/js/js.translator/testData/box/closure/localParameterInCallback.kt +++ b/js/js.translator/testData/box/closure/localParameterInCallback.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/coroutines/localVarOptimization.kt b/js/js.translator/testData/box/coroutines/localVarOptimization.kt index 227cd79ec29..19babaa4423 100644 --- a/js/js.translator/testData/box/coroutines/localVarOptimization.kt +++ b/js/js.translator/testData/box/coroutines/localVarOptimization.kt @@ -2,6 +2,10 @@ // DECLARES_VARIABLE: function=doResume name=k // PROPERTY_READ_COUNT: name=local$o count=1 // PROPERTY_WRITE_COUNT: name=local$o count=2 + +// Unmute when JS_IR supports release coroutines +// IGNORE_BACKEND: JS_IR + import kotlin.coroutines.* var next: () -> Unit = {} diff --git a/js/js.translator/testData/box/coroutines/nativeExceptions.kt b/js/js.translator/testData/box/coroutines/nativeExceptions.kt index 5ca2be257ce..af549c23947 100644 --- a/js/js.translator/testData/box/coroutines/nativeExceptions.kt +++ b/js/js.translator/testData/box/coroutines/nativeExceptions.kt @@ -1,4 +1,8 @@ // EXPECTED_REACHABLE_NODES: 1250 + +// Unmute when JS_IR supports release coroutines +// IGNORE_BACKEND: JS_IR + import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* diff --git a/js/js.translator/testData/box/dataClass/hashcode.kt b/js/js.translator/testData/box/dataClass/hashcode.kt index 4485c0f0085..dfa211f2175 100644 --- a/js/js.translator/testData/box/dataClass/hashcode.kt +++ b/js/js.translator/testData/box/dataClass/hashcode.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1545 package foo diff --git a/js/js.translator/testData/box/dynamic/getByBrackets.kt b/js/js.translator/testData/box/dynamic/getByBrackets.kt index d33ed6549c4..93cd1cd282e 100644 --- a/js/js.translator/testData/box/dynamic/getByBrackets.kt +++ b/js/js.translator/testData/box/dynamic/getByBrackets.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1237 package foo diff --git a/js/js.translator/testData/box/examples/basicmethod.kt b/js/js.translator/testData/box/examples/basicmethod.kt index 27cc2d91783..8e5aed07fbc 100644 --- a/js/js.translator/testData/box/examples/basicmethod.kt +++ b/js/js.translator/testData/box/examples/basicmethod.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1535 interface Tr { diff --git a/js/js.translator/testData/box/examples/initializerBlockDImpl.kt b/js/js.translator/testData/box/examples/initializerBlockDImpl.kt index 12cc1ced446..6b3efadfcdc 100644 --- a/js/js.translator/testData/box/examples/initializerBlockDImpl.kt +++ b/js/js.translator/testData/box/examples/initializerBlockDImpl.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1517 class World() { diff --git a/js/js.translator/testData/box/examples/overloadBinaryOperator.kt b/js/js.translator/testData/box/examples/overloadBinaryOperator.kt index d8f98a84002..d4089611a9d 100644 --- a/js/js.translator/testData/box/examples/overloadBinaryOperator.kt +++ b/js/js.translator/testData/box/examples/overloadBinaryOperator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1518 class ArrayWrapper() { diff --git a/js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt b/js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt index a6cd577c14e..4e8b23f3204 100644 --- a/js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt +++ b/js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1519 class ArrayWrapper() { diff --git a/js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt b/js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt index eaa808f5b51..8522b8ee20a 100644 --- a/js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt +++ b/js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1519 class ArrayWrapper() { diff --git a/js/js.translator/testData/box/examples/overloadUnaryOperator.kt b/js/js.translator/testData/box/examples/overloadUnaryOperator.kt index 705b5267bca..f4f154dafdc 100644 --- a/js/js.translator/testData/box/examples/overloadUnaryOperator.kt +++ b/js/js.translator/testData/box/examples/overloadUnaryOperator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1519 class ArrayWrapper() { diff --git a/js/js.translator/testData/box/expression/cast/castToAny.kt b/js/js.translator/testData/box/expression/cast/castToAny.kt index 11ab7ddcb1f..0bd553fe62f 100644 --- a/js/js.translator/testData/box/expression/cast/castToAny.kt +++ b/js/js.translator/testData/box/expression/cast/castToAny.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1298 package foo diff --git a/js/js.translator/testData/box/expression/cast/castToArray.kt b/js/js.translator/testData/box/expression/cast/castToArray.kt index 99c791139f0..b3c3ee272be 100644 --- a/js/js.translator/testData/box/expression/cast/castToArray.kt +++ b/js/js.translator/testData/box/expression/cast/castToArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/expression/equals/arrays.kt b/js/js.translator/testData/box/expression/equals/arrays.kt index e87a4e6da0f..1be157902b6 100644 --- a/js/js.translator/testData/box/expression/equals/arrays.kt +++ b/js/js.translator/testData/box/expression/equals/arrays.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1280 package foo diff --git a/js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt b/js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt index 698c4dd90a5..fa5b4e4e53e 100644 --- a/js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt +++ b/js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1515 // KT-3518 Null pointer during null comparison in JS Backend package foo diff --git a/js/js.translator/testData/box/expression/equals/kt2370.kt b/js/js.translator/testData/box/expression/equals/kt2370.kt index 008582410c7..eadda1c7f85 100644 --- a/js/js.translator/testData/box/expression/equals/kt2370.kt +++ b/js/js.translator/testData/box/expression/equals/kt2370.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt b/js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt index 454a26cf16b..207b1e56237 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt +++ b/js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1515 fun foo(arg: Any): Boolean { return arg == "x" diff --git a/js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt b/js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt index 4beb457ca4b..4ce4bc3604f 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt +++ b/js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 package foo diff --git a/js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt b/js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt index 8a1d6415b36..f108a985519 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt +++ b/js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 package foo diff --git a/js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt b/js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt index 4f3137fa9ee..bfae74eb2fe 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt +++ b/js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt b/js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt index 22444e6b75d..98271629ad5 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt +++ b/js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1298 package foo diff --git a/js/js.translator/testData/box/expression/for/forIteratesOverArray.kt b/js/js.translator/testData/box/expression/for/forIteratesOverArray.kt index d365eecc1f1..40e19c1632c 100644 --- a/js/js.translator/testData/box/expression/for/forIteratesOverArray.kt +++ b/js/js.translator/testData/box/expression/for/forIteratesOverArray.kt @@ -1,5 +1,4 @@ -// IGNORE_BACKEND: JS_IR -// EXPECTED_REACHABLE_NODES: 1231 +// EXPECTED_REACHABLE_NODES: 1294 package foo val a1 = arrayOfNulls(10) diff --git a/js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt b/js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt index b8363225d09..ddca98cbcc0 100644 --- a/js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt +++ b/js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1516 public fun > bar(collection: C, f: (T) -> Unit) { for (item in collection) f(item) } diff --git a/js/js.translator/testData/box/expression/for/forOnEmptyArray.kt b/js/js.translator/testData/box/expression/for/forOnEmptyArray.kt index 47e2600871d..96ec084c48d 100644 --- a/js/js.translator/testData/box/expression/for/forOnEmptyArray.kt +++ b/js/js.translator/testData/box/expression/for/forOnEmptyArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1219 package foo diff --git a/js/js.translator/testData/box/expression/for/forWithEmptyBody.kt b/js/js.translator/testData/box/expression/for/forWithEmptyBody.kt index babb310e078..1faab20be80 100644 --- a/js/js.translator/testData/box/expression/for/forWithEmptyBody.kt +++ b/js/js.translator/testData/box/expression/for/forWithEmptyBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt b/js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt index 6c2cf524f74..e7d9280e6f3 100644 --- a/js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt +++ b/js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1297 package foo diff --git a/js/js.translator/testData/box/expression/for/labeledFor.kt b/js/js.translator/testData/box/expression/for/labeledFor.kt index 51b403eebe1..be0f023ca8b 100644 --- a/js/js.translator/testData/box/expression/for/labeledFor.kt +++ b/js/js.translator/testData/box/expression/for/labeledFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1219 package foo diff --git a/js/js.translator/testData/box/expression/for/overArrayWithIndex.kt b/js/js.translator/testData/box/expression/for/overArrayWithIndex.kt index afb066d47df..8cb93906c09 100644 --- a/js/js.translator/testData/box/expression/for/overArrayWithIndex.kt +++ b/js/js.translator/testData/box/expression/for/overArrayWithIndex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1284 // CHECK_CONTAINS_NO_CALLS: test1 except=toString // CHECK_CONTAINS_NO_CALLS: test2 except=toString diff --git a/js/js.translator/testData/box/expression/function/KT-921.kt b/js/js.translator/testData/box/expression/function/KT-921.kt index 174168fea61..3369de98221 100644 --- a/js/js.translator/testData/box/expression/function/KT-921.kt +++ b/js/js.translator/testData/box/expression/function/KT-921.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1535 var log = "" diff --git a/js/js.translator/testData/box/expression/function/expressionAsFunction.kt b/js/js.translator/testData/box/expression/function/expressionAsFunction.kt index 4f1ca7b240f..d723fb54040 100644 --- a/js/js.translator/testData/box/expression/function/expressionAsFunction.kt +++ b/js/js.translator/testData/box/expression/function/expressionAsFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1523 package foo diff --git a/js/js.translator/testData/box/expression/function/vararg.kt b/js/js.translator/testData/box/expression/function/vararg.kt index 7d2cbf4a9a4..4ccf9e2ba19 100644 --- a/js/js.translator/testData/box/expression/function/vararg.kt +++ b/js/js.translator/testData/box/expression/function/vararg.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1310 package foo diff --git a/js/js.translator/testData/box/expression/misc/KT-1361-2.kt b/js/js.translator/testData/box/expression/misc/KT-1361-2.kt index bab94e9f28b..81664c0a612 100644 --- a/js/js.translator/testData/box/expression/misc/KT-1361-2.kt +++ b/js/js.translator/testData/box/expression/misc/KT-1361-2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1294 package foo diff --git a/js/js.translator/testData/box/expression/misc/KT-2314.kt b/js/js.translator/testData/box/expression/misc/KT-2314.kt index e0914878e90..5f8cd03c378 100644 --- a/js/js.translator/testData/box/expression/misc/KT-2314.kt +++ b/js/js.translator/testData/box/expression/misc/KT-2314.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/expression/misc/KT-5058.kt b/js/js.translator/testData/box/expression/misc/KT-5058.kt index f1dbcef401b..a4f96ca9a7c 100644 --- a/js/js.translator/testData/box/expression/misc/KT-5058.kt +++ b/js/js.translator/testData/box/expression/misc/KT-5058.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1281 package foo diff --git a/js/js.translator/testData/box/expression/misc/elvisReturnNested.kt b/js/js.translator/testData/box/expression/misc/elvisReturnNested.kt index 8eaff98d65a..a6457c700ce 100644 --- a/js/js.translator/testData/box/expression/misc/elvisReturnNested.kt +++ b/js/js.translator/testData/box/expression/misc/elvisReturnNested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1283 /* * Issue: KT-4159 Kotlin to JS compiler crashes on code with ?: return diff --git a/js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt b/js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt index 800d236678e..5ad17b09473 100644 --- a/js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt +++ b/js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1284 /* * Issue: KT-4159 Kotlin to JS compiler crashes on code with ?: return diff --git a/js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt b/js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt index 0a0436a6c32..e3fcb8b1ce3 100644 --- a/js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt +++ b/js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1548 package foo diff --git a/js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt b/js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt index ed338ae4952..9dc33d0b63c 100644 --- a/js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt +++ b/js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1280 package foo diff --git a/js/js.translator/testData/box/expression/when/whenEqualsPattern.kt b/js/js.translator/testData/box/expression/when/whenEqualsPattern.kt index a73670afb10..8d1094bc8bf 100644 --- a/js/js.translator/testData/box/expression/when/whenEqualsPattern.kt +++ b/js/js.translator/testData/box/expression/when/whenEqualsPattern.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1533 package foo diff --git a/js/js.translator/testData/box/extensionFunction/generic.kt b/js/js.translator/testData/box/extensionFunction/generic.kt index f217ce89416..3a3551d85d2 100644 --- a/js/js.translator/testData/box/extensionFunction/generic.kt +++ b/js/js.translator/testData/box/extensionFunction/generic.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1515 package foo diff --git a/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt b/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt index d9677310891..68885aed151 100644 --- a/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt +++ b/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1282 package foo diff --git a/js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt b/js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt index e2dea72e0d3..4e903568ab0 100644 --- a/js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt +++ b/js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1294 package foo diff --git a/js/js.translator/testData/box/inheritance/overrideAnyMethods.kt b/js/js.translator/testData/box/inheritance/overrideAnyMethods.kt index 4d729064cae..8a7038812f1 100644 --- a/js/js.translator/testData/box/inheritance/overrideAnyMethods.kt +++ b/js/js.translator/testData/box/inheritance/overrideAnyMethods.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/inline/arrayLiteralAliasing.kt b/js/js.translator/testData/box/inline/arrayLiteralAliasing.kt index e3bfa899d78..49598031a1c 100644 --- a/js/js.translator/testData/box/inline/arrayLiteralAliasing.kt +++ b/js/js.translator/testData/box/inline/arrayLiteralAliasing.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1534 /* This tests that variables (aliases) are created for array literals. diff --git a/js/js.translator/testData/box/inline/astCopy.kt b/js/js.translator/testData/box/inline/astCopy.kt index f2f102ee53a..58f583db7b6 100644 --- a/js/js.translator/testData/box/inline/astCopy.kt +++ b/js/js.translator/testData/box/inline/astCopy.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1281 package foo diff --git a/js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt b/js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt index b4737fd43c5..41e94c9c64e 100644 --- a/js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt +++ b/js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1283 package foo diff --git a/js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt b/js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt index 81264e57151..0a8850e0e37 100644 --- a/js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt +++ b/js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1292 package foo diff --git a/js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt b/js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt index e0fdd7042e2..26b21096b75 100644 --- a/js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt +++ b/js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1400 package foo diff --git a/js/js.translator/testData/box/inline/kt26117.kt b/js/js.translator/testData/box/inline/kt26117.kt index 770b527e67b..c0a09e4c88c 100644 --- a/js/js.translator/testData/box/inline/kt26117.kt +++ b/js/js.translator/testData/box/inline/kt26117.kt @@ -1,5 +1,4 @@ // EXPECTED_REACHABLE_NODES: 1529 -// IGNORE_BACKEND: JS_IR // TODO remove stdlib dependency diff --git a/js/js.translator/testData/box/inline/vararg.kt b/js/js.translator/testData/box/inline/vararg.kt index 0578c13327f..145da95a996 100644 --- a/js/js.translator/testData/box/inline/vararg.kt +++ b/js/js.translator/testData/box/inline/vararg.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt index 8b425275387..9c6b3dba08b 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1286 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt index 0d9d3f3871f..d3a02681791 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1286 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt index 259ab4709b6..4227b6c7636 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1286 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt index e56b4144d74..7b451738467 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1524 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt index d56b5635d99..1c78f002a7e 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt index 2cc4ba78ed6..80cb044f056 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt b/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt index 050dafc9223..e624c11bee7 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt b/js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt index 0dc053f41c1..7bb0d2a30d9 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1289 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt b/js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt index 67eb74b4566..9dc91b02805 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1292 package foo diff --git a/js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt b/js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt index 5cea5ea2cc6..2f955dbabd9 100644 --- a/js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt +++ b/js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1288 // See KT-7043, KT-11711 package foo diff --git a/js/js.translator/testData/box/inlineMultiFile/closureChain.kt b/js/js.translator/testData/box/inlineMultiFile/closureChain.kt index a6478cf025a..c6333ccb0a2 100644 --- a/js/js.translator/testData/box/inlineMultiFile/closureChain.kt +++ b/js/js.translator/testData/box/inlineMultiFile/closureChain.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 /* * Copy of JVM-backend test diff --git a/js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt b/js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt index e8ce5dd19ce..9354461360a 100644 --- a/js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt +++ b/js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1526 package foo diff --git a/js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt b/js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt index eae4c9dd82e..cc90f28ff18 100644 --- a/js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt +++ b/js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1283 // CHECK_VARS_COUNT: function=test1 count=0 // CHECK_VARS_COUNT: function=test2 count=0 diff --git a/js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt b/js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt index c7fb9420fa2..a392a8f056c 100644 --- a/js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt +++ b/js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1525 package foo diff --git a/js/js.translator/testData/box/java/abstractList/iterator.kt b/js/js.translator/testData/box/java/abstractList/iterator.kt index acfb61e414b..14bba461818 100644 --- a/js/js.translator/testData/box/java/abstractList/iterator.kt +++ b/js/js.translator/testData/box/java/abstractList/iterator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1340 package foo diff --git a/js/js.translator/testData/box/java/arrayList/access.kt b/js/js.translator/testData/box/java/arrayList/access.kt index d3cca65d0ba..6b43760e098 100644 --- a/js/js.translator/testData/box/java/arrayList/access.kt +++ b/js/js.translator/testData/box/java/arrayList/access.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/arrayAccess.kt b/js/js.translator/testData/box/java/arrayList/arrayAccess.kt index f9dff2490c1..ad71b23e704 100644 --- a/js/js.translator/testData/box/java/arrayList/arrayAccess.kt +++ b/js/js.translator/testData/box/java/arrayList/arrayAccess.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt b/js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt index 84152bf51d9..f264df71e95 100644 --- a/js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt +++ b/js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt b/js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt index a1a08136b72..133256ce95c 100644 --- a/js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt +++ b/js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1516 package foo diff --git a/js/js.translator/testData/box/java/arrayList/containsAll.kt b/js/js.translator/testData/box/java/arrayList/containsAll.kt index 83e6e710401..0d2dfb5f6eb 100644 --- a/js/js.translator/testData/box/java/arrayList/containsAll.kt +++ b/js/js.translator/testData/box/java/arrayList/containsAll.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/emptyList.kt b/js/js.translator/testData/box/java/arrayList/emptyList.kt index 619c9d16d84..07df8565156 100644 --- a/js/js.translator/testData/box/java/arrayList/emptyList.kt +++ b/js/js.translator/testData/box/java/arrayList/emptyList.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/indexOOB.kt b/js/js.translator/testData/box/java/arrayList/indexOOB.kt index 794de26c0da..5148da89b84 100644 --- a/js/js.translator/testData/box/java/arrayList/indexOOB.kt +++ b/js/js.translator/testData/box/java/arrayList/indexOOB.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/java/arrayList/indexOf.kt b/js/js.translator/testData/box/java/arrayList/indexOf.kt index a8b11820c6f..7c5e9bc4f37 100644 --- a/js/js.translator/testData/box/java/arrayList/indexOf.kt +++ b/js/js.translator/testData/box/java/arrayList/indexOf.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1520 package foo diff --git a/js/js.translator/testData/box/java/arrayList/isEmpty.kt b/js/js.translator/testData/box/java/arrayList/isEmpty.kt index 106c1b039e2..8985e6104fb 100644 --- a/js/js.translator/testData/box/java/arrayList/isEmpty.kt +++ b/js/js.translator/testData/box/java/arrayList/isEmpty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/iterate.kt b/js/js.translator/testData/box/java/arrayList/iterate.kt index 6925a03e6e8..2217c0f0633 100644 --- a/js/js.translator/testData/box/java/arrayList/iterate.kt +++ b/js/js.translator/testData/box/java/arrayList/iterate.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/remove.kt b/js/js.translator/testData/box/java/arrayList/remove.kt index 680ba9f63c7..a1e11b72436 100644 --- a/js/js.translator/testData/box/java/arrayList/remove.kt +++ b/js/js.translator/testData/box/java/arrayList/remove.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt b/js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt index c0a2ff5b2b0..efadb4dec3d 100644 --- a/js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt +++ b/js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/jsCode/forIn.kt b/js/js.translator/testData/box/jsCode/forIn.kt index f191288643d..9759b5a5135 100644 --- a/js/js.translator/testData/box/jsCode/forIn.kt +++ b/js/js.translator/testData/box/jsCode/forIn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1283 package foo diff --git a/js/js.translator/testData/box/jsCode/literal.kt b/js/js.translator/testData/box/jsCode/literal.kt index 6f9e9f279a3..8a0e19bceee 100644 --- a/js/js.translator/testData/box/jsCode/literal.kt +++ b/js/js.translator/testData/box/jsCode/literal.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1284 package foo diff --git a/js/js.translator/testData/box/multideclaration/multiValForArray.kt b/js/js.translator/testData/box/multideclaration/multiValForArray.kt index ddafd96dc8d..121a67ff4a9 100644 --- a/js/js.translator/testData/box/multideclaration/multiValForArray.kt +++ b/js/js.translator/testData/box/multideclaration/multiValForArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 package foo diff --git a/js/js.translator/testData/box/multideclaration/multiValInFor.kt b/js/js.translator/testData/box/multideclaration/multiValInFor.kt index 57454cc5314..c726e2611af 100644 --- a/js/js.translator/testData/box/multideclaration/multiValInFor.kt +++ b/js/js.translator/testData/box/multideclaration/multiValInFor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1518 package foo diff --git a/js/js.translator/testData/box/number/longArray.kt b/js/js.translator/testData/box/number/longArray.kt index c445e2da715..e2ff9a6b17f 100644 --- a/js/js.translator/testData/box/number/longArray.kt +++ b/js/js.translator/testData/box/number/longArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1287 package foo diff --git a/js/js.translator/testData/box/number/longBinaryOperations.kt b/js/js.translator/testData/box/number/longBinaryOperations.kt index b8fe2c9c691..f1ce1ffcc76 100644 --- a/js/js.translator/testData/box/number/longBinaryOperations.kt +++ b/js/js.translator/testData/box/number/longBinaryOperations.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1230 package foo diff --git a/js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt b/js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt index 2b6292fae82..40bb522f8f9 100644 --- a/js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt +++ b/js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1525 package foo diff --git a/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt b/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt index 791844c5770..d7727db916a 100644 --- a/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt +++ b/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1519 package foo diff --git a/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt b/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt index ab9126180b2..902bbcffedd 100644 --- a/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt +++ b/js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1518 package foo diff --git a/js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt b/js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt index ca692024159..f09d1d3dfea 100644 --- a/js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt +++ b/js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1514 package foo diff --git a/js/js.translator/testData/box/range/intDownTo.kt b/js/js.translator/testData/box/range/intDownTo.kt index cc0a9fdc955..2a720ecca99 100644 --- a/js/js.translator/testData/box/range/intDownTo.kt +++ b/js/js.translator/testData/box/range/intDownTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1522 package foo diff --git a/js/js.translator/testData/box/range/intUpTo.kt b/js/js.translator/testData/box/range/intUpTo.kt index 1f6270ffcf8..44b2bcf953d 100644 --- a/js/js.translator/testData/box/range/intUpTo.kt +++ b/js/js.translator/testData/box/range/intUpTo.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1513 package foo diff --git a/js/js.translator/testData/box/range/reverse.kt b/js/js.translator/testData/box/range/reverse.kt index a5ff0531334..2e87ac3d896 100644 --- a/js/js.translator/testData/box/range/reverse.kt +++ b/js/js.translator/testData/box/range/reverse.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1522 package foo diff --git a/js/js.translator/testData/box/reified/vararg.kt b/js/js.translator/testData/box/reified/vararg.kt index 048962e2f2e..77a94992b21 100644 --- a/js/js.translator/testData/box/reified/vararg.kt +++ b/js/js.translator/testData/box/reified/vararg.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1525 package foo diff --git a/js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt b/js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt index 509f81a540d..fb2acaad6d2 100644 --- a/js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt +++ b/js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1534 // KT-5192 JS compiler fails to generate correct code for List implementation package foo diff --git a/js/js.translator/testData/box/standardClasses/any.kt b/js/js.translator/testData/box/standardClasses/any.kt index 81705558f3b..454b3ed5d04 100644 --- a/js/js.translator/testData/box/standardClasses/any.kt +++ b/js/js.translator/testData/box/standardClasses/any.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 // CHECK_CALLED_IN_SCOPE: function=isType scope=box package foo diff --git a/js/js.translator/testData/box/standardClasses/array.kt b/js/js.translator/testData/box/standardClasses/array.kt index 66576607cb4..898997944e2 100644 --- a/js/js.translator/testData/box/standardClasses/array.kt +++ b/js/js.translator/testData/box/standardClasses/array.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1280 package foo diff --git a/js/js.translator/testData/box/standardClasses/arrayAccess.kt b/js/js.translator/testData/box/standardClasses/arrayAccess.kt index c55272d88ae..1718b025ab3 100644 --- a/js/js.translator/testData/box/standardClasses/arrayAccess.kt +++ b/js/js.translator/testData/box/standardClasses/arrayAccess.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1280 package foo diff --git a/js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt b/js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt index 59c4d6507c7..c762ae011a2 100644 --- a/js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt +++ b/js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt @@ -1,8 +1,10 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1283 package foo fun box(): String { + val a = IntArray(10) + if (a !is IntArray) return "fail" + val s = Array(3) { it.toString() } if (s.size != 3) return "Fail Array size: ${s.size}" if (s[1] != "1") return "Fail Array value: ${s[1]}" diff --git a/js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt b/js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt index afc796de35e..0b02a4e8965 100644 --- a/js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt +++ b/js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1285 package foo diff --git a/js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt b/js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt index 3f46bebca33..a87d08bb9bc 100644 --- a/js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt +++ b/js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1219 package foo diff --git a/js/js.translator/testData/box/standardClasses/arraySize.kt b/js/js.translator/testData/box/standardClasses/arraySize.kt index c87b16a8b16..659cd8193ca 100644 --- a/js/js.translator/testData/box/standardClasses/arraySize.kt +++ b/js/js.translator/testData/box/standardClasses/arraySize.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1284 package foo diff --git a/js/js.translator/testData/box/standardClasses/arraysIterator.kt b/js/js.translator/testData/box/standardClasses/arraysIterator.kt index cbbe704eb72..05dd012c655 100644 --- a/js/js.translator/testData/box/standardClasses/arraysIterator.kt +++ b/js/js.translator/testData/box/standardClasses/arraysIterator.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1402 package foo diff --git a/js/js.translator/testData/box/standardClasses/stringBuilder.kt b/js/js.translator/testData/box/standardClasses/stringBuilder.kt index d794259184e..6f288ff2d71 100644 --- a/js/js.translator/testData/box/standardClasses/stringBuilder.kt +++ b/js/js.translator/testData/box/standardClasses/stringBuilder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1280 package foo diff --git a/js/js.translator/testData/box/superCall/nativeSuperClass.kt b/js/js.translator/testData/box/superCall/nativeSuperClass.kt index 93902e8433b..cdae42dc9a1 100644 --- a/js/js.translator/testData/box/superCall/nativeSuperClass.kt +++ b/js/js.translator/testData/box/superCall/nativeSuperClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // EXPECTED_REACHABLE_NODES: 1523 package foo diff --git a/libraries/stdlib/js/irRuntime/arrays.kt b/libraries/stdlib/js/irRuntime/arrays.kt new file mode 100644 index 00000000000..0bda393bd63 --- /dev/null +++ b/libraries/stdlib/js/irRuntime/arrays.kt @@ -0,0 +1,95 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package kotlin.js + +import withType + +external fun Array(size: Int): Array + +internal fun fillArrayVal(array: Array, initValue: T): Array { + for (i in 0..array.size - 1) { + array[i] = initValue + } + return array +} + +internal inline fun arrayWithFun(size: Int, init: (Int) -> T) = fillArrayFun(Array(size), init) + +internal inline fun fillArrayFun(array: dynamic, init: (Int) -> T): Array { + val result = array.unsafeCast>() + var i = 0 + while (i != result.size) { + result[i] = init(i) + ++i + } + return result +} + +internal fun booleanArray(size: Int): BooleanArray = withType("BooleanArray", fillArrayVal(Array(size), false)).unsafeCast() + +internal fun booleanArrayOf(arr: Array): BooleanArray = withType("BooleanArray", arr.asDynamic().slice()).unsafeCast() + +internal fun charArray(size: Int): CharArray = withType("CharArray", fillArrayVal(Array(size), '\u0000')).unsafeCast() + +internal fun charArrayOf(arr: Array): CharArray = withType("CharArray", arr.asDynamic().slice()).unsafeCast() + +internal fun longArray(size: Int): LongArray = withType("LongArray", fillArrayVal(Array(size), 0L)).unsafeCast() + +internal fun longArrayOf(arr: Array): LongArray = withType("LongArray", arr.asDynamic().slice()).unsafeCast() + +internal fun arrayIterator(array: Array) = object : Iterator { + var index = 0 + override fun hasNext() = index != array.size + override fun next() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun booleanArrayIterator(array: BooleanArray) = object : BooleanIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextBoolean() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun byteArrayIterator(array: ByteArray) = object : ByteIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextByte() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun shortArrayIterator(array: ShortArray) = object : ShortIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextShort() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun charArrayIterator(array: CharArray) = object : CharIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextChar() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun intArrayIterator(array: IntArray) = object : IntIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextInt() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun floatArrayIterator(array: FloatArray) = object : FloatIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextFloat() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun doubleArrayIterator(array: DoubleArray) = object : DoubleIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextDouble() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} + +internal fun longArrayIterator(array: LongArray) = object : LongIterator() { + var index = 0 + override fun hasNext() = index != array.size + override fun nextLong() = if (index != array.size) array[index++] else throw NoSuchElementException("$index") +} diff --git a/libraries/stdlib/js/irRuntime/hacks.kt b/libraries/stdlib/js/irRuntime/hacks.kt index ac45db79a06..2233ddced09 100644 --- a/libraries/stdlib/js/irRuntime/hacks.kt +++ b/libraries/stdlib/js/irRuntime/hacks.kt @@ -5,6 +5,8 @@ package kotlin +import kotlin.js.* + // TODO: Ignore FunctionN interfaces public interface Function0 : Function { @@ -23,4 +25,22 @@ public interface Function3 : Function { public operator fun invoke(p1: P1, p2: P2, p3: P3): R } -public inline fun arrayOfNulls(size: Int): Array = js("[]") // FIXME: Implement +public inline fun arrayOfNulls(size: Int): Array = Array(size) + +public inline fun arrayOf(vararg a: T): Array = a.unsafeCast>() + +public inline fun booleanArrayOf(vararg a: Boolean) = a + +public inline fun byteArrayOf(vararg a: Byte) = a + +public inline fun shortArrayOf(vararg a: Short) = a + +public inline fun charArrayOf(vararg a: Char) = a + +public inline fun intArrayOf(vararg a: Int) = a + +public inline fun floatArrayOf(vararg a: Float) = a + +public inline fun doubleArrayOf(vararg a: Double) = a + +public inline fun longArrayOf(vararg a: Long) = a diff --git a/libraries/stdlib/js/irRuntime/kotlinHacks.kt b/libraries/stdlib/js/irRuntime/kotlinHacks.kt index 128df622035..45eb42cc97b 100644 --- a/libraries/stdlib/js/irRuntime/kotlinHacks.kt +++ b/libraries/stdlib/js/irRuntime/kotlinHacks.kt @@ -17,33 +17,6 @@ package kotlin */ public inline fun emptyArray(): Array = js("[]") -@library -public fun arrayOf(vararg elements: T): Array = definedExternally - -@library -public fun doubleArrayOf(vararg elements: Double): DoubleArray = definedExternally - -@library -public fun floatArrayOf(vararg elements: Float): FloatArray = definedExternally - -@library -public fun longArrayOf(vararg elements: Long): LongArray = definedExternally - -@library -public fun intArrayOf(vararg elements: Int): IntArray = definedExternally - -@library -public fun charArrayOf(vararg elements: Char): CharArray = definedExternally - -@library -public fun shortArrayOf(vararg elements: Short): ShortArray = definedExternally - -@library -public fun byteArrayOf(vararg elements: Byte): ByteArray = definedExternally - -@library -public fun booleanArrayOf(vararg elements: Boolean): BooleanArray = definedExternally - /** * Creates a new instance of the [Lazy] that uses the specified initialization function [initializer]. */ @@ -67,35 +40,36 @@ internal fun fillFrom(src: dynamic, dst: dynamic): dynamic { val srcLen: Int = src.length val dstLen: Int = dst.length var index: Int = 0 - while (index < srcLen && index < dstLen) dst[index] = src[index++] + val arr = dst.unsafeCast>() + while (index < srcLen && index < dstLen) arr[index] = src[index++] return dst } internal fun arrayCopyResize(source: dynamic, newSize: Int, defaultValue: Any?): dynamic { - val result = source.slice(0, newSize) + val result = source.slice(0, newSize).unsafeCast>() copyArrayType(source, result) var index: Int = source.length if (newSize > index) { - result.length = newSize + result.asDynamic().length = newSize while (index < newSize) result[index++] = defaultValue } return result } internal fun arrayPlusCollection(array: dynamic, collection: Collection): dynamic { - return TODO() - // val result = array.slice() - // result.length += collection.size - // copyArrayType(array, result) - // var index: Int = array.length - // for (element in collection) result[index++] = element - // return result + val result = array.slice().unsafeCast>() + result.asDynamic().length = result.size + collection.size + copyArrayType(array, result) + var index: Int = array.length + for (element in collection) result[index++] = element + return result } internal fun fillFromCollection(dst: dynamic, startIndex: Int, collection: Collection): dynamic { var index = startIndex - for (element in collection) dst[index++] = element + val arr = dst.unsafeCast>() + for (element in collection) arr[index++] = element return dst } diff --git a/libraries/stdlib/js/irRuntime/noPackageHacks.kt b/libraries/stdlib/js/irRuntime/noPackageHacks.kt new file mode 100644 index 00000000000..6250b967c9b --- /dev/null +++ b/libraries/stdlib/js/irRuntime/noPackageHacks.kt @@ -0,0 +1,54 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + + +import kotlin.js.* + +/** Concat regular Array's and TypedArray's into an Array. + */ +@PublishedApi +internal fun arrayConcat(vararg args: T): T { + val len = args.size + val typed = js("Array(len)").unsafeCast>() + for (i in 0 until len) { + val arr = args[i] + if (arr !is Array<*>) { + typed[i] = js("[]").slice.call(arr) + } else { + typed[i] = arr + } + } + return js("[]").concat.apply(js("[]"), typed); +} + +/** Concat primitive arrays. Main use: prepare vararg arguments. + */ +@PublishedApi +internal fun primitiveArrayConcat(vararg args: T): T { + var size = 0 + for (i in 0 until args.size) { + size += args[i].unsafeCast>().size + } + val a = args[0] + val result = js("new a.constructor(size)").unsafeCast>() + if (a.asDynamic().`$type$` != null) { + withType(a.asDynamic().`$type$`, result) + } + + size = 0 + for (i in 0 until args.size) { + val arr = args[i].unsafeCast>() + for (j in 0 until arr.size) { + result[size++] = arr[j] + } + } + return result.unsafeCast() +} + +@PublishedApi +internal inline fun withType(type: String, array: dynamic): dynamic { + array.`$type$` = type + return array +} \ No newline at end of file diff --git a/libraries/stdlib/js/irRuntime/typeCheckUtils.kt b/libraries/stdlib/js/irRuntime/typeCheckUtils.kt index 9bffde33c60..e6da97c7c4e 100644 --- a/libraries/stdlib/js/irRuntime/typeCheckUtils.kt +++ b/libraries/stdlib/js/irRuntime/typeCheckUtils.kt @@ -72,7 +72,9 @@ public fun isInterface(ctor: dynamic, IType: dynamic): Boolean { } */ -fun typeOf(obj: dynamic) = js("typeof obj").unsafeCast() +fun typeOf(obj: dynamic): String = js("typeof obj").unsafeCast() + +fun jsTypeOf(a: Any?): String = js("typeof a").unsafeCast() fun instanceOf(obj: dynamic, jsClass: dynamic) = js("obj instanceof jsClass").unsafeCast() @@ -101,14 +103,14 @@ public fun isChar(c: Any): Boolean { } // TODO: Distinguish Boolean/Byte and Short/Char -public fun isBooleanArray(a: dynamic) = js("a instanceof Int8Array") -public fun isByteArray(a: dynamic) = js("a instanceof Int8Array") -public fun isShortArray(a: dynamic) = js("a instanceof Int16Array") -public fun isCharArray(a: dynamic) = js("a instanceof Uint16Array") -public fun isIntArray(a: dynamic) = js("a instanceof Int32Array") -public fun isFloatArray(a: dynamic) = js("a instanceof Float32Array") -public fun isDoubleArray(a: dynamic) = js("a instanceof Float64Array") -public fun isLongArray(a: dynamic) = isArray(a) // TODO: Implement +public fun isBooleanArray(a: dynamic): Boolean = isArray(a) && a.asDynamic().`$type$` == "BooleanArray" +public fun isByteArray(a: dynamic): Boolean = js("a instanceof Int8Array").unsafeCast() +public fun isShortArray(a: dynamic): Boolean = js("a instanceof Int16Array").unsafeCast() +public fun isCharArray(a: dynamic): Boolean = isArray(a) && a.asDynamic().`$type$` == "CharArray" +public fun isIntArray(a: dynamic): Boolean = js("a instanceof Int32Array").unsafeCast() +public fun isFloatArray(a: dynamic): Boolean = js("a instanceof Float32Array").unsafeCast() +public fun isDoubleArray(a: dynamic): Boolean = js("a instanceof Float64Array").unsafeCast() +public fun isLongArray(a: dynamic): Boolean = isArray(a) && a.asDynamic().`$type$` == "LongArray" internal fun jsIn(x: String, y: dynamic): Boolean = js("x in y") diff --git a/libraries/stdlib/js/src/kotlin/collections/InternalMap.kt b/libraries/stdlib/js/src/kotlin/collections/InternalMap.kt index bf0dc1b932e..84747566456 100644 --- a/libraries/stdlib/js/src/kotlin/collections/InternalMap.kt +++ b/libraries/stdlib/js/src/kotlin/collections/InternalMap.kt @@ -21,8 +21,9 @@ internal interface InternalMap : MutableIterable