diff --git a/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsLoweringPhases.kt b/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsLoweringPhases.kt index 3e5bdaae467d0..a24286740190d 100644 --- a/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsLoweringPhases.kt +++ b/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsLoweringPhases.kt @@ -617,6 +617,13 @@ private val callsLoweringPhase = makeBodyLoweringPhase( description = "Handle intrinsics" ) +private val doWhileRemoverPhase = makeBodyLoweringPhase( + ::DoWhileRemover, + name = "DoWhileRemover", + description = "Remove do-while that Python doesn't have (replace with while)", + prerequisite = setOf(blockDecomposerLoweringPhase, suspendFunctionsLoweringPhase), +) + private val objectDeclarationLoweringPhase = makeDeclarationTransformerPhase( ::ObjectDeclarationLowering, name = "ObjectDeclarationLowering", @@ -728,6 +735,7 @@ private val loweringList = listOf( objectUsageLoweringPhase, captureStackTraceInThrowablesPhase, callsLoweringPhase, + doWhileRemoverPhase, cleanupLoweringPhase, validateIrAfterLowering ) diff --git a/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/lower/DoWhileRemover.kt b/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/lower/DoWhileRemover.kt new file mode 100644 index 0000000000000..4a7d77e55d9d5 --- /dev/null +++ b/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/lower/DoWhileRemover.kt @@ -0,0 +1,68 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * 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.py.lower + +import org.jetbrains.kotlin.backend.common.BodyLoweringPass +import org.jetbrains.kotlin.backend.common.lower.createIrBuilder +import org.jetbrains.kotlin.ir.backend.py.PyIrBackendContext +import org.jetbrains.kotlin.ir.backend.py.ir.JsIrArithBuilder +import org.jetbrains.kotlin.ir.backend.py.ir.JsIrBuilder +import org.jetbrains.kotlin.ir.builders.createTmpVariable +import org.jetbrains.kotlin.ir.builders.irComposite +import org.jetbrains.kotlin.ir.builders.irGet +import org.jetbrains.kotlin.ir.builders.irSet +import org.jetbrains.kotlin.ir.declarations.IrDeclaration +import org.jetbrains.kotlin.ir.expressions.IrBody +import org.jetbrains.kotlin.ir.expressions.IrDoWhileLoop +import org.jetbrains.kotlin.ir.expressions.IrExpression +import org.jetbrains.kotlin.ir.expressions.impl.IrWhileLoopImpl +import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid +import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid + +class DoWhileTransformer(private val context: PyIrBackendContext, private val irSymbol: IrSymbol) : IrElementTransformerVoid() { + + private val calculator = JsIrArithBuilder(context) + private val constTrue get() = JsIrBuilder.buildBoolean(context.irBuiltIns.booleanType, true) + private val constFalse get() = JsIrBuilder.buildBoolean(context.irBuiltIns.booleanType, false) + + /* + Transform: + + do: + + while () + + To: + + firstIterationLoopName = true + while firstIterationLoopName or (): + firstIterationLoopName = false + + */ + override fun visitDoWhileLoop(loop: IrDoWhileLoop): IrExpression { + return context.createIrBuilder(irSymbol).irComposite { + val tmp = createTmpVariable(constTrue, nameHint = "firstIteration") + val newCondition = calculator.oror(irGet(tmp), loop.condition) + val newBody = irComposite { + +irSet(tmp, constFalse) + loop.body?.unaryPlus() + } + + +IrWhileLoopImpl(loop.startOffset, loop.endOffset, loop.type, loop.origin).apply { + condition = newCondition + body = newBody + label = loop.label + } + } + } +} + +class DoWhileRemover(private val context: PyIrBackendContext) : BodyLoweringPass { + override fun lower(irBody: IrBody, container: IrDeclaration) { + irBody.transformChildrenVoid(DoWhileTransformer(context, container.symbol)) + } +} diff --git a/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/transformers/irToPy/IrElementToPyStatementTransformer.kt b/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/transformers/irToPy/IrElementToPyStatementTransformer.kt index eba9d5ee1267f..7a429efe8817d 100644 --- a/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/transformers/irToPy/IrElementToPyStatementTransformer.kt +++ b/compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/transformers/irToPy/IrElementToPyStatementTransformer.kt @@ -215,33 +215,9 @@ class IrElementToPyStatementTransformer : BaseIrElementToPyNodeTransformer { - // transform - // - // do { } while () - // - // like: - // - // while True: - // - // if not : - // break - // - // TODO: support continue inside - val scopeContext = context.newScope() - val body = loop.body?.accept(this, scopeContext).orEmpty() - val condition = If( - test = UnaryOp(Not, IrElementToPyExpressionTransformer().visitExpression(loop.condition, scopeContext)), - body = listOf(Break), - orelse = emptyList(), - ) - - return While( - test = Constant(value = constant("True"), kind = null), - body = body + condition, - orelse = emptyList(), - ) - .let { scopeContext.extractStatements() + it } + override fun visitDoWhileLoop(loop: IrDoWhileLoop, context: PyGenerationContext): List { // todo + return listOf(Expr(value = Name(id = identifier("visitDoWhileLoop $loop".toValidPythonSymbol()), ctx = Load))) +// error("DoWhile should have been eliminated in a lowering before executing ToPyTransformer") } override fun visitDynamicOperatorExpression(expression: IrDynamicOperatorExpression, context: PyGenerationContext): List { diff --git a/python/README.md b/python/README.md index 1e5f9aa2f6ae5..e972ebedb421f 100644 --- a/python/README.md +++ b/python/README.md @@ -92,10 +92,12 @@ It will generate various reports and summaries: ![git-history-plot](box.tests/reports/git-history-plot.svg) -Current status: **2463**/5970 passed +Current status: **2468**/5970 passed #### History (newest on top) +* after fully supporting do-while (with continue/break): **2468**/5970 (+5) + * after supporting static fields initialization: **2463**/5970 (+98: +102 passed, +4 failed because no support for unsigned numbers, chars, property delegates, any-to-string conversions) * after supporting integer multiplication: **2365**/5970 (+23) diff --git a/python/box.tests/reports/pythonTest/box-tests-report.tsv b/python/box.tests/reports/pythonTest/box-tests-report.tsv index baf0d8676f8a9..ae45c8f4f728b 100644 --- a/python/box.tests/reports/pythonTest/box-tests-report.tsv +++ b/python/box.tests/reports/pythonTest/box-tests-report.tsv @@ -945,14 +945,14 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testCompareBoxedIntegerToZero Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testConditionOfEmptyIf Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueInExpr Failed PythonExecution AttributeError: 'NoneType' object has no attribute 'hasNext_0_k_' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueInFor Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueInFor Failed PythonExecution AttributeError: 'int' object has no attribute 'compareTo_wiekkq_k_' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueInForCondition Failed PythonExecution AttributeError: 'ArrayAsCollection' object has no attribute 'toArray' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueInWhen Failed PythonExecution AttributeError: 'NoneType' object has no attribute '__setitem__' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueInWhile Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueToLabelInFor Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testContinueToLabelInFor Failed PythonExecution AttributeError: 'int' object has no attribute 'compareTo_wiekkq_k_' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testDoWhile Failed PythonExecution TypeError: can only concatenate str (not "int") to str org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testDoWhileFib Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testDoWhileWithContinue Failed AssertionFailed org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail 1, expected 1, but 102]> +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testDoWhileWithContinue Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testEmptyDoWhile Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testEmptyFor Failed PythonExecution AttributeError: 'NoneType' object has no attribute 'hasNext_0_k_' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures.testEmptyWhile Failed PythonExecution IndentationError: expected an indented block @@ -1026,7 +1026,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testBreakInExpr Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testBreakInLoopConditions Failed AssertionFailed org.junit.ComparisonFailure: expected:<[OK]> but was:<[FAIL3]> org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testContinueInDoWhile Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testContinueInExpr Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testContinueInExpr Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testInlineWithStack Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testInnerLoopWithStack Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testKt14581 Succeeded @@ -1035,7 +1035,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testKt17384 Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testKt9022And Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testKt9022Or Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testPathologicalDoWhile Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testPathologicalDoWhile Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testPopSizes Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testTryFinally1 Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions.testTryFinally2 Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined @@ -1177,7 +1177,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testEmptyCommonConstraintSystemForCoroutineInferenceCall Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testEpam Failed PythonExecution SyntaxError: invalid syntax org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testFalseUnitCoercion Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testGenerate Failed PythonExecution NameError: name 'kotlin_CharSequence' is not defined +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testGenerate Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testHandleException Failed PythonExecution NameError: name 'kotlin_Array_kotlin_Any__' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testHandleResultCallEmptyBody Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testHandleResultNonUnitExpression Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' @@ -1187,7 +1187,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInlineGenericFunCalledFromSubclass Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInlineSuspendFunction Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInlineSuspendLambdaNonLocalReturn Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInlinedTryCatchFinally Failed PythonExecution NameError: name 'kotlin_Array_kotlin_Any__' is not defined +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInlinedTryCatchFinally Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInnerSuspensionCalls Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testInstanceOfContinuation Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testIterateOverArray Failed PythonExecution NameError: name 'js' is not defined @@ -1210,7 +1210,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testKt44781 Failed PythonExecution AttributeError: '_no_name_provided__1_1' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testKt45377 Failed PythonExecution AttributeError: '_no_name_provided__1_1' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testKt46813 Failed PythonExecution AttributeError: '_no_name_provided__1_1' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testLastExpressionIsLoop Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testLastExpressionIsLoop Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testLastStatementInc Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testLastStementAssignment Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testLastUnitExpression Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' @@ -1225,9 +1225,9 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testMultipleInvokeCallsInsideInlineLambda3 Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNestedTryCatch Failed PythonExecution NameError: name 'kotlin_Array_kotlin_Any__' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNoSuspensionPoints Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNonLocalReturn Failed PythonExecution AttributeError: '_no_name_provided__1_2' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNonLocalReturnFromInlineLambda Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNonLocalReturnFromInlineLambdaDeep Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNonLocalReturn Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNonLocalReturnFromInlineLambda Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNonLocalReturnFromInlineLambdaDeep Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testNullableSuspendFunctionType Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testOverrideDefaultArgument Failed PythonExecution SyntaxError: invalid syntax org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testRecursiveSuspend Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' @@ -1242,15 +1242,15 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendCoroutineFromStateMachine Failed PythonExecution SyntaxError: invalid syntax org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendDefaultImpl Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendDelegation Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendFromInlineLambda Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendFromInlineLambda Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendFunImportedFromObject Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendFunctionAsSupertype Failed Unknown java.lang.IllegalStateException: UNRESOLVED_REFERENCE: Unresolved reference: listOfNotNull (158,20) in org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendFunctionAsSupertypeCall Failed Unknown java.lang.IllegalStateException: UNRESOLVED_REFERENCE: Unresolved reference: listOfNotNull (42,20) in org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendFunctionMethodReference Failed PythonExecution NameError: name 'invoke' is not defined -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendInCycle Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendInCycle Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendInTheMiddleOfObjectConstruction Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendInTheMiddleOfObjectConstructionEvaluationOrder Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendInTheMiddleOfObjectConstructionWithJumpOut Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendInTheMiddleOfObjectConstructionWithJumpOut Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendLambdaInInterface Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspendLambdaWithArgumentRearrangement Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testSuspensionInsideSafeCall Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' @@ -1261,7 +1261,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testTryFinallyInsideInlineLambda Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testTryFinallyWithHandleResult Failed PythonExecution NameError: name 'kotlin_Array_kotlin_Any__' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testVarCaptuedInCoroutineIntrinsic Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testVarValueConflictsWithTable Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testVarValueConflictsWithTable Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testVarValueConflictsWithTableSameSort Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines.testVarargCallFromSuspend Failed Unknown java.lang.IllegalStateException: UNRESOLVED_REFERENCE: Unresolved reference: toList (66,65) in org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$Bridges.testAllFilesPresentInBridges Succeeded @@ -1273,13 +1273,13 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testBreakFinally Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testBreakStatement Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testComplexChainSuspend Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testDoWhileStatement Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testDoWhileWithInline Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testDoWhileStatement Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testDoWhileWithInline Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testDoubleBreak Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testFinallyCatch Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testForContinue Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testForStatement Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testForWithStep Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testForWithStep Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testIfStatement Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testKt22694_1_3 Failed PythonExecution AttributeError: 'ArrayAsCollection' object has no attribute 'toArray' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$ControlFlow.testLabeledWhile Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' @@ -1300,7 +1300,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testDelegate Failed PythonExecution NameError: name 'Unexpected_operator_EQ' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testDestructuringInLambdas Failed PythonExecution NameError: name 'js' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testFunInterface Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testInlineSuspendFinally Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testInlineSuspendFinally Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testInterfaceMethodWithBody Failed AssertionFailed org.junit.ComparisonFailure: expected:<[OK]> but was:<[None]> org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testInterfaceMethodWithBodyGeneric Failed AssertionFailed org.junit.ComparisonFailure: expected:<[OK]> but was:<[None]> org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$FeatureIntersection.testOverrideInInlineClass Failed PythonExecution NameError: name 'js' is not defined @@ -1540,7 +1540,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$StackUnwinding.testRethrowInFinally Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$StackUnwinding.testRethrowInFinallyWithSuspension Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$StackUnwinding.testSimple Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$StackUnwinding.testSuspendInCycle Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$StackUnwinding.testSuspendInCycle Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$SuspendConversion.testAllFilesPresentInSuspendConversion Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$SuspendConversion.testIntersectionTypeToSubtypeConversion Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$SuspendConversion.testOnArgument Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' @@ -1591,7 +1591,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$UnitTypeReturn.testUnitSafeCall Failed PythonExecution AttributeError: '_no_name_provided__11' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testAllFilesPresentInVarSpilling Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testFakeInlinerVariables Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testKt19475 Failed PythonExecution NameError: name 'kotlin_Array_kotlin_Any__' is not defined +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testKt19475 Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testKt38925 Failed PythonExecution AttributeError: 'Companion_23' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testLvtWithInlineOnly Failed Unknown java.lang.IllegalStateException: UNRESOLVED_REFERENCE: Unresolved reference: println (29,5) in org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Coroutines$VarSpilling.testNullSpilling Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' @@ -2982,7 +2982,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Jv org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$JvmStatic.testAllFilesPresentInJvmStatic Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$JvmStatic$ProtectedInSuperClass.testAllFilesPresentInProtectedInSuperClass Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels.testAllFilesPresentInLabels Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels.testControlLabelClashesWithFuncitonName Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels.testControlLabelClashesWithFuncitonName Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels.testInfixCallLabelling Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels.testLabeledDeclarations Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels.testPropertyAccessor Succeeded @@ -3631,8 +3631,8 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ra org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testForInStringVarUpdatedInLoopBody Failed PythonExecution NameError: name 'js' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testForIntRange Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testForNullableIntInRangeWithImplicitReceiver Succeeded -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt37370 Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt37370a Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt37370 Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt37370a Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt47492 Failed Unknown java.lang.IllegalStateException: UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt47492a Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges.testKt47492b Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined @@ -4313,7 +4313,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ra org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned.testInMixedUnsignedRange Failed PythonExecution NameError: name 'kotlin_UByte' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned.testKt35004 Failed PythonExecution NameError: name 'kotlin_ULong' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned.testKt36953 Failed PythonExecution NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned.testKt36953_continue Failed PythonExecution There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned.testKt36953_continue Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned.testOutOfBoundsInMixedContains Failed PythonExecution NameError: name 'kotlin_UInt' is not defined org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned$Expression.testAllFilesPresentInExpression Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned$Expression.testEmptyDownto Failed PythonExecution NameError: name 'kotlin_Array_kotlin_Any__' is not defined @@ -5878,7 +5878,7 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testMaxStackWithCrossinline Succeeded org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testMultipleLocals Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testMultipleSuspensionPoints Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testNonLocalReturn Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' +org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testNonLocalReturn Failed KotlinCompilation java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testNonSuspendCrossinline Failed PythonExecution SyntaxError: invalid syntax org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testReturnValue Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenInlineTestGenerated$Suspend.testTryCatchReceiver Failed PythonExecution AttributeError: 'Companion_19' object has no attribute 'constructor' diff --git a/python/box.tests/reports/pythonTest/failed-tests.txt b/python/box.tests/reports/pythonTest/failed-tests.txt index d02939ef032ff..ef697d871f675 100644 --- a/python/box.tests/reports/pythonTest/failed-tests.txt +++ b/python/box.tests/reports/pythonTest/failed-tests.txt @@ -625,8 +625,6 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Co org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testBreakFromOuter FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testBreakInLoopConditions FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testContinueInDoWhile FAILED -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testContinueInExpr FAILED -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testPathologicalDoWhile FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testPopSizes FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testTryFinally1 FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$ControlStructures$BreakContinueInExpressions > testTryFinally2 FAILED @@ -1865,7 +1863,6 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Jd org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Jdk > testHashMap FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Jdk > testIteratingOverHashMap FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Jdk > testKt1397 FAILED -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels > testControlLabelClashesWithFuncitonName FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Labels > testPropertyInClassAccessor FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$LazyCodegen > testExceptionInFieldInitializer FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$LazyCodegen > testSafeAssign FAILED @@ -2151,7 +2148,6 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ra org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testForInRangeLiteralWithMixedTypeBounds FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testForInStringVarUpdatedInLoopBody FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testKt37370 FAILED -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testKt37370a FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testKt47492 FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testKt47492b FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges > testMultiAssignmentIterationOverIntRange FAILED @@ -2749,7 +2745,6 @@ org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ra org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned > testInMixedUnsignedRange FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned > testKt35004 FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned > testKt36953 FAILED -org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned > testKt36953_continue FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned > testOutOfBoundsInMixedContains FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned$Expression > testEmptyDownto FAILED org.jetbrains.kotlin.python.test.ir.semantics.IrPythonCodegenBoxTestGenerated$Ranges$Unsigned$Expression > testEmptyRange FAILED diff --git a/python/box.tests/reports/pythonTest/failure-count.tsv b/python/box.tests/reports/pythonTest/failure-count.tsv index e8ea7ef8443e2..29783e70ed95a 100644 --- a/python/box.tests/reports/pythonTest/failure-count.tsv +++ b/python/box.tests/reports/pythonTest/failure-count.tsv @@ -1,8 +1,8 @@ 507 NameError: name 'js' is not defined -483 NameError: name 'kotlin_Array_kotlin_Any__' is not defined -275 AttributeError: 'Companion_19' object has no attribute 'constructor' +481 NameError: name 'kotlin_Array_kotlin_Any__' is not defined +267 AttributeError: 'Companion_19' object has no attribute 'constructor' 203 NameError: name 'Unexpected_operator_EQ' is not defined -198 NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined +199 NameError: name 'visitTry_org_jetbrains_kotlin_ir_expressions_impl_IrTryImpl' is not defined 117 NameError: name 'undefined' is not defined 105 kotlin.NotImplementedError: An operation is not implemented. 100 AttributeError: 'int' object has no attribute 'data' @@ -10,24 +10,25 @@ 79 NameError: name 'kotlin_UInt' is not defined 78 NameError: name 'kotlin_Boolean' is not defined 50 NameError: name 'kotlin_Int' is not defined -42 AttributeError: 'int' object has no attribute 'compareTo_wiekkq_k_' +44 AttributeError: 'int' object has no attribute 'compareTo_wiekkq_k_' 39 AttributeError: '_no_name_provided__12' object has no attribute 'constructor' 36 SyntaxError: invalid syntax 30 AttributeError: 'ArrayAsCollection' object has no attribute 'toArray' 29 TypeError: 'NoneType' object is not callable 29 org.junit.ComparisonFailure: expected:<[OK]> but was:<[fail]> -24 AttributeError: '_no_name_provided__11' object has no attribute 'constructor' 24 AttributeError: 'int' object has no attribute 'toString' 23 AttributeError: 'CheckStateMachineContinuation' object has no attribute 'constructor' 23 kotlin.NotImplementedError: An operation is not implemented: IrSpreadElementImpl is not supported yet here -22 AttributeError: 'Companion_23' object has no attribute 'constructor' +21 AttributeError: '_no_name_provided__11' object has no attribute 'constructor' 21 NameError: name '_init_' is not defined +20 AttributeError: 'Companion_23' object has no attribute 'constructor' 20 NameError: name 'foo' is not defined 20 NameError: name 'kotlin_Result_T_' is not defined 19 RecursionError: maximum recursion depth exceeded 19 UnboundLocalError: local variable 'test1' referenced before assignment 18 AttributeError: '_no_name_provided__1_1' object has no attribute 'constructor' 18 TypeError: can only concatenate str (not "int") to str +17 java.lang.IllegalStateException: org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl@... for VAR IR_TEMPORARY_VARIABLE name:firstIteration type:kotlin.Boolean [val] has unexpected parent org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFunction@... 16 TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' 15 AttributeError: 'NoneType' object has no attribute '__setitem__' 15 AttributeError: '_no_name_provided__13' object has no attribute 'constructor' @@ -36,18 +37,17 @@ 14 TypeError: object of type 'NoneType' has no len() 12 UnboundLocalError: local variable 'test0' referenced before assignment 11 AttributeError: 'NoneType' object has no attribute 'hasNext_0_k_' -10 AttributeError: '_no_name_provided__1_2' object has no attribute 'constructor' 10 ImportError: cannot import name 'box' from 'compiled_module' ) -10 There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed 10 TypeError: unsupported operand type(s) for +: 'M' and 'int' 10 TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' +9 AttributeError: '_no_name_provided__1_2' object has no attribute 'constructor' 9 AttributeError: 'tuple' object has no attribute '__setitem__' -9 NameError: name 'kotlin_CharSequence' is not defined 9 TypeError: unsupported operand type(s) for &: 'float' and 'int' 9 java.lang.IllegalStateException: UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 8 AttributeError: 'M' object has no attribute 'i' 8 AttributeError: 'NoneType' object has no attribute 'invoke_0_k_' 8 NameError: name 'Object' is not defined +8 NameError: name 'kotlin_CharSequence' is not defined 8 NameError: name 'kotlin_UByte' is not defined 8 NameError: name 'kotlin_ULong' is not defined 8 java.lang.IllegalArgumentException: List has more than one element. @@ -93,6 +93,7 @@ 3 NameError: name 'visitExpression_other__inToPyStatementTransformer_org_jetbrains_kotlin_ir_expressions_impl_IrGetFieldImpl' is not defined 3 NameError: name 'visitExpression_other__inToPyStatementTransformer_org_jetbrains_kotlin_ir_expressions_impl_IrGetValueImpl' is not defined 3 SyntaxError: EOL while scanning string literal +3 There was a problem when extracting the contents of STDERR. Details: java.io.IOException: Stream closed 3 java.lang.IllegalStateException: UNRESOLVED_REFERENCE: Unresolved reference: setOf (62,29) in 3 org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail #1]> 3 org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail #2]> @@ -352,7 +353,6 @@ 1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[A(string=OK)]> 1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[FAIL3]> 1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[FAIL]> -1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail 1, expected 1, but 102]> 1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail 3 &&]> 1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail 4: A.bNonConst === B.bNonConst]> 1 org.junit.ComparisonFailure: expected:<[OK]> but was:<[Fail equals]> diff --git a/python/experiments/generated/out_ir.py b/python/experiments/generated/out_ir.py index e92d62bcf12cd..14acb41b4cc4d 100644 --- a/python/experiments/generated/out_ir.py +++ b/python/experiments/generated/out_ir.py @@ -18,15 +18,14 @@ def indexOf(self, element): inductionVariable = 0 last = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable <= last): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if element == self[index]: return index - if not (inductionVariable <= last): - break - return -1 @@ -44,15 +43,14 @@ def indexOf_0(self, element): inductionVariable = 0 last = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable <= last): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if element == self[index]: return index - if not (inductionVariable <= last): - break - return -1 @@ -70,15 +68,14 @@ def indexOf_1(self, element): inductionVariable = 0 last = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable <= last): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if element == self[index]: return index - if not (inductionVariable <= last): - break - return -1 @@ -96,15 +93,14 @@ def indexOf_2(self, element): inductionVariable = 0 last = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable <= last): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if element == self[index]: return index - if not (inductionVariable <= last): - break - return -1 @@ -123,30 +119,28 @@ def indexOf_3(self, element): inductionVariable = 0 last = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable <= last): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if self[index] == None: return index - if not (inductionVariable <= last): - break - else: inductionVariable_0 = 0 last_0 = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable_0 <= last_0: - while True: + firstIteration_0 = True + while (True) if (firstIteration_0) else (inductionVariable_0 <= last_0): + firstIteration_0 = False index_0 = inductionVariable_0 inductionVariable_0 = (((inductionVariable_0 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if element == self[index_0]: return index_0 - if not (inductionVariable_0 <= last_0): - break - @@ -156,29 +150,27 @@ def lastIndexOf(self, element): if element == None: inductionVariable = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if 0 <= inductionVariable: - while True: + firstIteration = True + while (True) if (firstIteration) else (0 <= inductionVariable): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + -1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if self[index] == None: return index - if not (0 <= inductionVariable): - break - else: inductionVariable_0 = (((len(self) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if 0 <= inductionVariable_0: - while True: + firstIteration_0 = True + while (True) if (firstIteration_0) else (0 <= inductionVariable_0): + firstIteration_0 = False index_0 = inductionVariable_0 inductionVariable_0 = (((inductionVariable_0 + -1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if element == self[index_0]: return index_0 - if not (0 <= inductionVariable_0): - break - @@ -771,7 +763,9 @@ def iterator_0_k_(self): pass def contains_2bq_k_(self, element): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False if isInterface(self, Collection): tmp = kotlin_collections_Collection_kotlin_Any__(self).isEmpty_0_k_() elif True: @@ -790,14 +784,13 @@ def contains_2bq_k_(self, element): tmp_ret_0 = False - if not False: - break - return tmp_ret_0 def containsAll_dxd4eo_k_(self, elements): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False if isInterface(elements, Collection): tmp = kotlin_collections_Collection_kotlin_Any__(elements).isEmpty_0_k_() elif True: @@ -816,9 +809,6 @@ def containsAll_dxd4eo_k_(self, elements): tmp_ret_0 = True - if not False: - break - return tmp_ret_0 @@ -1099,7 +1089,9 @@ def iterator_0_k_(self): return IteratorImpl(self) def indexOf_2bq_k_(self, element): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False index_1 = 0 tmp0_iterator_2 = self.iterator_0_k_() while tmp0_iterator_2.hasNext_0_k_(): @@ -1112,14 +1104,13 @@ def indexOf_2bq_k_(self, element): index_1 = (((tmp1_4 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 tmp_ret_0 = -1 - if not False: - break - return tmp_ret_0 def lastIndexOf_2bq_k_(self, element): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False iterator_1 = self.listIterator_ha5a7z_k_(self._get_size__0_k_()) while iterator_1.hasPrevious_0_k_(): tmp0__anonymous__2 = iterator_1.previous_0_k_() @@ -1129,9 +1120,6 @@ def lastIndexOf_2bq_k_(self, element): tmp_ret_0 = -1 - if not False: - break - return tmp_ret_0 @@ -1358,7 +1346,9 @@ def filterInPlace(self, predicate, predicateResultToRemove): inductionVariable = 0 last = _get_lastIndex__4(self) if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (not (readIndex == last)): + firstIteration = False readIndex = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 element = self.get_ha5a7z_k_(readIndex) @@ -1370,21 +1360,17 @@ def filterInPlace(self, predicate, predicateResultToRemove): tmp1 = writeIndex writeIndex = (((tmp1 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 - if not not (readIndex == last): - break - if writeIndex < self._get_size__0_k_(): inductionVariable_0 = _get_lastIndex__4(self) if writeIndex <= inductionVariable_0: - while True: + firstIteration_0 = True + while (True) if (firstIteration_0) else (not (removeIndex == writeIndex)): + firstIteration_0 = False removeIndex = inductionVariable_0 inductionVariable_0 = (((inductionVariable_0 + -1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 self.removeAt_ha5a7z_k_(removeIndex) - if not not (removeIndex == writeIndex): - break - return True @@ -2832,13 +2818,12 @@ def run(block): def repeat(times, action): inductionVariable = 0 if inductionVariable < times: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < times): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 action(index) - if not (inductionVariable < times): - break - @@ -3291,7 +3276,9 @@ def UByteArray__contains_impl_0(this, element): return UByteArray__contains_impl(tmp, (unboxIntrinsic(element)) if (isinstance(element, UByte)) else (THROW_CCE())) def UByteArray__containsAll_impl(this, elements): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False tmp0_all_0 = (kotlin_collections_Collection___(elements)) if (isInterface(elements, Collection)) else (THROW_CCE()) if isInterface(tmp0_all_0, Collection): tmp = kotlin_collections_Collection_kotlin_Any__(tmp0_all_0).isEmpty_0_k_() @@ -3318,9 +3305,6 @@ def UByteArray__containsAll_impl(this, elements): tmp_ret_0 = True - if not False: - break - return tmp_ret_0 @@ -3753,7 +3737,9 @@ def UIntArray__contains_impl_0(this, element): return UIntArray__contains_impl(tmp, (unboxIntrinsic(element)) if (isinstance(element, UInt)) else (THROW_CCE())) def UIntArray__containsAll_impl(this, elements): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False tmp0_all_0 = (kotlin_collections_Collection___(elements)) if (isInterface(elements, Collection)) else (THROW_CCE()) if isInterface(tmp0_all_0, Collection): tmp = kotlin_collections_Collection_kotlin_Any__(tmp0_all_0).isEmpty_0_k_() @@ -3780,9 +3766,6 @@ def UIntArray__containsAll_impl(this, elements): tmp_ret_0 = True - if not False: - break - return tmp_ret_0 @@ -4578,7 +4561,9 @@ def ULongArray__contains_impl_0(this, element): return ULongArray__contains_impl(tmp, (unboxIntrinsic(element)) if (isinstance(element, ULong)) else (THROW_CCE())) def ULongArray__containsAll_impl(this, elements): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False tmp0_all_0 = (kotlin_collections_Collection___(elements)) if (isInterface(elements, Collection)) else (THROW_CCE()) if isInterface(tmp0_all_0, Collection): tmp = kotlin_collections_Collection_kotlin_Any__(tmp0_all_0).isEmpty_0_k_() @@ -4605,9 +4590,6 @@ def ULongArray__containsAll_impl(this, elements): tmp_ret_0 = True - if not False: - break - return tmp_ret_0 @@ -5385,7 +5367,9 @@ def UShortArray__contains_impl_0(this, element): return UShortArray__contains_impl(tmp, (unboxIntrinsic(element)) if (isinstance(element, UShort)) else (THROW_CCE())) def UShortArray__containsAll_impl(this, elements): - while True: + firstIteration = True + while (True) if (firstIteration) else (False): + firstIteration = False tmp0_all_0 = (kotlin_collections_Collection___(elements)) if (isInterface(elements, Collection)) else (THROW_CCE()) if isInterface(tmp0_all_0, Collection): tmp = kotlin_collections_Collection_kotlin_Any__(tmp0_all_0).isEmpty_0_k_() @@ -5412,9 +5396,6 @@ def UShortArray__containsAll_impl(this, elements): tmp_ret_0 = True - if not False: - break - return tmp_ret_0 @@ -7604,25 +7585,23 @@ def arrayCopy_0(source, destination, destinationOffset, startIndex, endIndex): elif (True) if (not (source is destination)) else (destinationOffset <= startIndex): inductionVariable = 0 if inductionVariable < rangeSize: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < rangeSize): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 destination.__setitem__((((destinationOffset + index) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000, source[(((startIndex + index) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000]) - if not (inductionVariable < rangeSize): - break - else: inductionVariable_0 = (((rangeSize - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if 0 <= inductionVariable_0: - while True: + firstIteration_0 = True + while (True) if (firstIteration_0) else (0 <= inductionVariable_0): + firstIteration_0 = False index_0 = inductionVariable_0 inductionVariable_0 = (((inductionVariable_0 + -1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 destination.__setitem__((((destinationOffset + index_0) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000, source[(((startIndex + index_0) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000]) - if not (0 <= inductionVariable_0): - break - @@ -8055,15 +8034,14 @@ def indexOf_2bq_k_(self, element): inductionVariable = 0 last = _get_lastIndex__4(self) if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (not (index == last)): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if self.get_ha5a7z_k_(index) == element: return index - if not not (index == last): - break - return -1 @@ -8071,15 +8049,14 @@ def indexOf_2bq_k_(self, element): def lastIndexOf_2bq_k_(self, element): inductionVariable = _get_lastIndex__4(self) if 0 <= inductionVariable: - while True: + firstIteration = True + while (True) if (firstIteration) else (0 <= inductionVariable): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + -1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if self.get_ha5a7z_k_(index) == element: return index - if not (0 <= inductionVariable): - break - return -1 @@ -8098,14 +8075,13 @@ def removeRange_rvwcgf_k_(self, fromIndex, toIndex): tmp0_repeat_0 = (((toIndex - fromIndex) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 inductionVariable = 0 if inductionVariable < tmp0_repeat_0: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < tmp0_repeat_0): + firstIteration = False index_2 = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 iterator.next_0_k_() iterator.remove_sv8swh_k_() - if not (inductionVariable < tmp0_repeat_0): - break - @@ -8307,7 +8283,9 @@ def remove_2bq_k_(self, element): inductionVariable = 0 last = (((len(self.array) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable <= last): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if self.array[index] == element: @@ -8318,9 +8296,6 @@ def remove_2bq_k_(self, element): tmp1_this._set_modCount__majfzk_k_((((tmp2 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000) return True - if not (inductionVariable <= last): - break - return False @@ -9832,14 +9807,13 @@ def setLength_majfzk_k_(self, newLength): else: inductionVariable = self._get_length__0_k_() if inductionVariable < newLength: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < newLength): + firstIteration = False i = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 tmp1_this = self tmp1_this.string = tmp1_this.string + Char_0(0) - if not (inductionVariable < newLength): - break - @@ -9907,15 +9881,14 @@ def toCharArray_tnuj0b_k_(self, destination, destinationOffset, startIndex, endI dstIndex = destinationOffset inductionVariable = startIndex if inductionVariable < endIndex: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < endIndex): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 tmp1 = dstIndex dstIndex = (((tmp1 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 destination.__setitem__(tmp1, charSequenceGet(self.string, index)) - if not (inductionVariable < endIndex): - break - @@ -10045,7 +10018,9 @@ def compareTo(self, other, ignoreCase): inductionVariable = 0 if inductionVariable < min: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < min): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 thisChar = charSequenceGet(self, index) @@ -10067,9 +10042,6 @@ def compareTo(self, other, ignoreCase): - if not (inductionVariable < min): - break - return (((n1 - n2) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 @@ -10100,13 +10072,12 @@ def concatToString_0(self, startIndex, endIndex): result = '' inductionVariable = startIndex if inductionVariable < endIndex: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < endIndex): + firstIteration = False index = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 result = result + self[index] - if not (inductionVariable < endIndex): - break - return result @@ -10827,13 +10798,12 @@ def fillArrayVal(array, initValue): tmp0_repeat_0 = len(array) inductionVariable = 0 if inductionVariable < tmp0_repeat_0: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < tmp0_repeat_0): + firstIteration = False index_2 = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 array.__setitem__(index_2, initValue) - if not (inductionVariable < tmp0_repeat_0): - break - return array @@ -10842,13 +10812,12 @@ def Array_0(size): result = list() inductionVariable = 0 if inductionVariable < size: - while True: + firstIteration = True + while (True) if (firstIteration) else (inductionVariable < size): + firstIteration = False index_2 = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 result.append(None) - if not (inductionVariable < size): - break - return result @@ -11500,14 +11469,13 @@ def getStringHashCode(str): inductionVariable = 0 last = (((length - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (not (i == last)): + firstIteration = False i = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 code = kotlin_Int(str.charCodeAt(i)) hash = (((((((hash * 31) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000) + code) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 - if not not (i == last): - break - return hash @@ -12399,7 +12367,9 @@ def arrayConcat(*args): inductionVariable = 0 last = (((len - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (not (i == last)): + firstIteration = False i = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 arr = args[i] @@ -12408,9 +12378,6 @@ def arrayConcat(*args): elif True: typed.__setitem__(i, arr) - if not not (i == last): - break - return T(js('[]').concat.apply(js('[]'), typed)) @@ -12420,15 +12387,14 @@ def primitiveArrayConcat(*args): inductionVariable = 0 last = (((len(args) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable <= last: - while True: + firstIteration = True + while (True) if (firstIteration) else (not (i == last)): + firstIteration = False i = inductionVariable inductionVariable = (((inductionVariable + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 tmp = size_local tmp0_unsafeCast_0 = args[i] size_local = (((tmp + len((tmp0_unsafeCast_0))) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 - if not not (i == last): - break - a = args[0] @@ -12442,7 +12408,9 @@ def primitiveArrayConcat(*args): inductionVariable_0 = 0 last_0 = (((len(args) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable_0 <= last_0: - while True: + firstIteration_0 = True + while (True) if (firstIteration_0) else (not (i_0 == last_0)): + firstIteration_0 = False i_0 = inductionVariable_0 inductionVariable_0 = (((inductionVariable_0 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 tmp3_unsafeCast_0 = args[i_0] @@ -12450,19 +12418,7 @@ def primitiveArrayConcat(*args): inductionVariable_1 = 0 last_1 = (((len(arr) - 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 if inductionVariable_1 <= last_1: - while True: - j = inductionVariable_1 - inductionVariable_1 = (((inductionVariable_1 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 - tmp3 = size_local - size_local = (((tmp3 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 - result.__setitem__(tmp3, arr[j]) - if not not (j == last_1): - break - - - - if not not (i_0 == last_0): - break + visitDoWhileLoop_org_jetbrains_kotlin_ir_expressions_impl_IrDoWhileLoopImpl @@ -13612,7 +13568,14 @@ def complexFunction_x2__Expr__Return__0(): return l() def a(a1, *a2): - pass + i = 0 + firstIteration = True + while (True) if (firstIteration) else (tmp0 < 3): + firstIteration = False + visitDoWhileLoop_org_jetbrains_kotlin_ir_expressions_impl_IrDoWhileLoopImpl + tmp0 = i + i = (((tmp0 + 1) + 0x8000_0000) & 0xffff_ffff) - 0x8000_0000 + def b(): a(1, *(2, 3)) diff --git a/python/experiments/python.kt b/python/experiments/python.kt index 35fb7c8f48b67..4affc75714c59 100644 --- a/python/experiments/python.kt +++ b/python/experiments/python.kt @@ -34,7 +34,8 @@ fun lambdaAndCapturing(): Int { } fun a(a1: Int, vararg a2: Int) { - + var i = 0 + do continue while (i++ < 3) } fun b() {