[JS IR] Emit original names for local vars to sourcemaps
#KT-35655 Fixed
This commit is contained in:
committed by
Space Team
parent
8efa72ca36
commit
7b7c517dbb
+22
-11
@@ -6,18 +6,24 @@
|
||||
package org.jetbrains.kotlin.ir.backend.js.transformers.irToJs
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.compilationException
|
||||
import org.jetbrains.kotlin.ir.expressions.IrCall
|
||||
import org.jetbrains.kotlin.ir.backend.js.utils.JsGenerationContext
|
||||
import org.jetbrains.kotlin.ir.declarations.IrValueParameter
|
||||
import org.jetbrains.kotlin.ir.expressions.IrCall
|
||||
import org.jetbrains.kotlin.ir.util.file
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
|
||||
private typealias Replacement = Pair<JsExpression, IrValueParameter>
|
||||
|
||||
class FunctionWithJsFuncAnnotationInliner(private val jsFuncCall: IrCall, private val context: JsGenerationContext) {
|
||||
private val function = getJsFunctionImplementation()
|
||||
private val replacements = collectReplacementsForCall()
|
||||
|
||||
fun generateResultStatement(): List<JsStatement> {
|
||||
val irFunction = jsFuncCall.symbol.owner
|
||||
val newContext = context.newFile(irFunction.file, irFunction, context.localNames)
|
||||
return function.body.statements
|
||||
.run {
|
||||
SimpleJsCodeInliner(replacements)
|
||||
SimpleJsCodeInliner(replacements, newContext)
|
||||
.apply { acceptList(this@run) }
|
||||
.withTemporaryVariablesForExpressions(this)
|
||||
}
|
||||
@@ -27,9 +33,10 @@ class FunctionWithJsFuncAnnotationInliner(private val jsFuncCall: IrCall, privat
|
||||
context.staticContext.backendContext.getJsCodeForFunction(jsFuncCall.symbol)?.deepCopy()
|
||||
?: compilationException("JS function not found", jsFuncCall)
|
||||
|
||||
private fun collectReplacementsForCall(): Map<JsName, JsExpression> {
|
||||
private fun collectReplacementsForCall(): Map<JsName, Replacement> {
|
||||
val translatedArguments = Array(jsFuncCall.valueArgumentsCount) {
|
||||
jsFuncCall.getValueArgument(it)!!.accept(IrElementToJsExpressionTransformer(), context)
|
||||
jsFuncCall.getValueArgument(it)!!
|
||||
.accept(IrElementToJsExpressionTransformer(), context) to jsFuncCall.symbol.owner.valueParameters[it]
|
||||
}
|
||||
return function.parameters
|
||||
.mapIndexed { i, param -> param.name to translatedArguments[i] }
|
||||
@@ -37,15 +44,19 @@ class FunctionWithJsFuncAnnotationInliner(private val jsFuncCall: IrCall, privat
|
||||
}
|
||||
}
|
||||
|
||||
private class SimpleJsCodeInliner(private val replacements: Map<JsName, JsExpression>): RecursiveJsVisitor() {
|
||||
private val temporaryNamesForExpressions = mutableMapOf<JsName, JsExpression>()
|
||||
private class SimpleJsCodeInliner(private val replacements: Map<JsName, Replacement>, val context: JsGenerationContext) :
|
||||
RecursiveJsVisitor()
|
||||
{
|
||||
private val temporaryNamesForExpressions = mutableMapOf<JsName, Replacement>()
|
||||
|
||||
fun withTemporaryVariablesForExpressions(statements: List<JsStatement>): List<JsStatement> {
|
||||
if (temporaryNamesForExpressions.isEmpty()) {
|
||||
return statements
|
||||
}
|
||||
|
||||
val variableDeclarations = temporaryNamesForExpressions.map { JsVars(JsVars.JsVar(it.key, it.value)) }
|
||||
val variableDeclarations = temporaryNamesForExpressions.map {
|
||||
JsVars(JsVars.JsVar(it.key, it.value.first).withSource(it.value.second, context, useNameOf = it.value.second))
|
||||
}
|
||||
return variableDeclarations + statements
|
||||
}
|
||||
|
||||
@@ -55,16 +66,16 @@ private class SimpleJsCodeInliner(private val replacements: Map<JsName, JsExpres
|
||||
nameRef.name = nameRef.name?.getReplacement() ?: return
|
||||
}
|
||||
|
||||
private fun JsName.declareNewTemporaryFor(expression: JsExpression): JsName {
|
||||
private fun JsName.declareNewTemporaryFor(expression: JsExpression, irValueParameter: IrValueParameter): JsName {
|
||||
return JsName(ident, true)
|
||||
.also { temporaryNamesForExpressions[it] = expression }
|
||||
.also { temporaryNamesForExpressions[it] = expression to irValueParameter }
|
||||
}
|
||||
|
||||
private fun JsName.getReplacement(): JsName? {
|
||||
val expression = replacements[this] ?: return null
|
||||
val (expression, irValueParameter) = replacements[this] ?: return null
|
||||
return when {
|
||||
expression is JsNameRef && expression.qualifier == null -> expression.name!!
|
||||
else -> declareNewTemporaryFor(expression)
|
||||
else -> declareNewTemporaryFor(expression, irValueParameter)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -148,7 +148,8 @@ class IrElementToJsStatementTransformer : BaseIrElementToJsNodeTransformer<JsSta
|
||||
}
|
||||
}
|
||||
|
||||
return jsVar(varName, value, context).withSource(declaration, context)
|
||||
val jsInitializer = value?.accept(IrElementToJsExpressionTransformer(), context)
|
||||
return JsVars(JsVars.JsVar(varName, jsInitializer).withSource(declaration, context, useNameOf = declaration))
|
||||
}
|
||||
|
||||
override fun visitDelegatingConstructorCall(expression: IrDelegatingConstructorCall, context: JsGenerationContext): JsStatement {
|
||||
@@ -214,4 +215,3 @@ class IrElementToJsStatementTransformer : BaseIrElementToJsNodeTransformer<JsSta
|
||||
return label?.let { JsLabel(it, loopStatement) } ?: loopStatement
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-10
@@ -6,10 +6,12 @@
|
||||
package org.jetbrains.kotlin.ir.backend.js.transformers.irToJs
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.compilationException
|
||||
import org.jetbrains.kotlin.backend.common.lower.BOUND_VALUE_PARAMETER
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.IrFileEntry
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext
|
||||
import org.jetbrains.kotlin.ir.backend.js.JsLoweredDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.backend.js.JsStatementOrigins
|
||||
import org.jetbrains.kotlin.ir.backend.js.sourceMapsInfo
|
||||
import org.jetbrains.kotlin.ir.backend.js.utils.*
|
||||
@@ -38,11 +40,6 @@ fun jsUndefined(context: IrNamer, backendContext: JsIrBackendContext): JsExpress
|
||||
}
|
||||
}
|
||||
|
||||
fun jsVar(name: JsName, initializer: IrExpression?, context: JsGenerationContext): JsVars {
|
||||
val jsInitializer = initializer?.accept(IrElementToJsExpressionTransformer(), context)
|
||||
return JsVars(JsVars.JsVar(name, jsInitializer))
|
||||
}
|
||||
|
||||
fun <T : JsNode> IrWhen.toJsNode(
|
||||
tr: BaseIrElementToJsNodeTransformer<T, JsGenerationContext>,
|
||||
context: JsGenerationContext,
|
||||
@@ -113,7 +110,7 @@ fun translateFunction(declaration: IrFunction, name: JsName?, context: JsGenerat
|
||||
|
||||
val functionContext = context.newDeclaration(declaration, localNameGenerator)
|
||||
|
||||
val functionParams = declaration.valueParameters.map { functionContext.getNameForValueDeclaration(it) }
|
||||
val functionParams = declaration.valueParameters.map { it to functionContext.getNameForValueDeclaration(it) }
|
||||
val body = declaration.body?.accept(IrElementToJsStatementTransformer(), functionContext) as? JsBlock ?: JsBlock()
|
||||
|
||||
val function = JsFunction(emptyScope, body, "member function ${name ?: "annon"}")
|
||||
@@ -121,12 +118,12 @@ fun translateFunction(declaration: IrFunction, name: JsName?, context: JsGenerat
|
||||
|
||||
function.name = name
|
||||
|
||||
fun JsFunction.addParameter(parameter: JsName) {
|
||||
parameters.add(JsParameter(parameter))
|
||||
fun JsFunction.addParameter(parameter: JsName, irValueParameter: IrValueParameter) {
|
||||
parameters.add(JsParameter(parameter).withSource(irValueParameter, functionContext, useNameOf = irValueParameter))
|
||||
}
|
||||
|
||||
declaration.extensionReceiverParameter?.let { function.addParameter(functionContext.getNameForValueDeclaration(it)) }
|
||||
functionParams.forEach { function.addParameter(it) }
|
||||
declaration.extensionReceiverParameter?.let { function.addParameter(functionContext.getNameForValueDeclaration(it), it) }
|
||||
functionParams.forEach { (irValueParameter, name) -> function.addParameter(name, irValueParameter) }
|
||||
check(!declaration.isSuspend) { "All Suspend functions should be lowered" }
|
||||
|
||||
return function
|
||||
@@ -621,6 +618,19 @@ private fun IrDeclarationWithName.originalNameForUseInSourceMap(policy: SourceMa
|
||||
return it.asString()
|
||||
}
|
||||
}
|
||||
|
||||
is IrValueDeclaration -> if (origin !in nameMappingOriginAllowList) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return name.asString()
|
||||
}
|
||||
|
||||
private val nameMappingOriginAllowList = setOf(
|
||||
IrDeclarationOrigin.DEFINED,
|
||||
IrDeclarationOrigin.FOR_LOOP_VARIABLE,
|
||||
IrDeclarationOrigin.CATCH_PARAMETER,
|
||||
IrDeclarationOrigin.CONTINUATION,
|
||||
BOUND_VALUE_PARAMETER,
|
||||
JsLoweredDeclarationOrigin.JS_SHADOWED_DEFAULT_PARAMETER,
|
||||
)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// This file is compiled into each stepping test.
|
||||
|
||||
package testUtils
|
||||
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
|
||||
external interface ValueDescriptionForSteppingTests {
|
||||
var isNull: Boolean?
|
||||
var isReferenceType: Boolean?
|
||||
var valueDescription: String?
|
||||
var typeName: String?
|
||||
}
|
||||
|
||||
external object JSON {
|
||||
fun stringify(o: Any?): String
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is only called from the debugger
|
||||
*/
|
||||
@JsExport
|
||||
fun makeValueDescriptionForSteppingTests(value: Any?): ValueDescriptionForSteppingTests? {
|
||||
val jsTypeName = jsTypeOf(value)
|
||||
val displayedTypeName = when (jsTypeName) {
|
||||
"undefined" -> return null
|
||||
"string", "object", "function" -> if (value == null) jsTypeName else {
|
||||
val klass = value::class
|
||||
// Fully qualified names are not yet supported in Kotlin/JS reflection
|
||||
knownFqNames[klass] ?: klass.simpleName ?: "<anonymous>"
|
||||
}
|
||||
else -> jsTypeName
|
||||
}
|
||||
return js("{}").unsafeCast<ValueDescriptionForSteppingTests>().apply {
|
||||
isNull = value == null
|
||||
isReferenceType = jsTypeName == "object" || jsTypeName == "function"
|
||||
valueDescription = when (jsTypeName) {
|
||||
"string" -> JSON.stringify(value)
|
||||
else -> value.toString()
|
||||
}
|
||||
typeName = displayedTypeName
|
||||
}
|
||||
}
|
||||
|
||||
private val minimalFqNames = mapOf(
|
||||
Long::class to "kotlin.Long",
|
||||
String::class to "kotlin.String",
|
||||
Array::class to "kotlin.Array",
|
||||
RuntimeException::class to "kotlin.RuntimeException",
|
||||
ArithmeticException::class to "kotlin.ArithmeticException",
|
||||
)
|
||||
|
||||
private val knownFqNames = minimalFqNames + stdlibFqNames
|
||||
|
||||
private object EmptyContinuation: Continuation<Any?> {
|
||||
override val context: CoroutineContext
|
||||
get() = EmptyCoroutineContext
|
||||
|
||||
override fun resumeWith(result: Result<Any?>) {
|
||||
result.getOrThrow()
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun makeEmptyContinuation(): dynamic = EmptyContinuation
|
||||
@@ -0,0 +1,94 @@
|
||||
// This file is compiled into each stepping test only if the WITH_STDLIB directive is NOT specified.
|
||||
|
||||
package testUtils
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
inline fun <T, S> Array<T>.map(noinline transform: (T) -> S): Array<S> = asDynamic().map(transform).unsafeCast<Array<S>>()
|
||||
|
||||
inline fun <T> Array<T>.some(noinline predicate: (T) -> Boolean): Boolean = asDynamic().some(predicate).unsafeCast<Boolean>()
|
||||
|
||||
internal data class Pair<A, B>(val first: A, val second: B)
|
||||
|
||||
internal infix fun <A, B> A.to(that: B) = Pair(this, that)
|
||||
|
||||
/**
|
||||
* A simple polyfill. We don't need fancy hashsets, since we don't deal with many values in the helpers.
|
||||
*/
|
||||
private class ArraySet<T>(private val array: Array<T>) : Set<T> {
|
||||
override val size: Int
|
||||
get() = array.size
|
||||
|
||||
override fun contains(element: T) = array.some { it == element }
|
||||
|
||||
override fun containsAll(elements: Collection<T>): Boolean {
|
||||
for (element in elements) {
|
||||
if (!contains(element)) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun isEmpty() = size == 0
|
||||
|
||||
override fun iterator(): Iterator<T> = array.iterator()
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple polyfill. We don't need fancy hashmaps, since we don't deal with many values in the helpers.
|
||||
*/
|
||||
private class ArrayMap<Key, Value>(private val array: Array<Pair<Key, Value>>): Map<Key, Value> {
|
||||
|
||||
private class Entry<Key, Value>(override val key: Key, override val value: Value) : Map.Entry<Key, Value>
|
||||
|
||||
override val entries: Set<Map.Entry<Key, Value>>
|
||||
get() = ArraySet(array.map { Entry(it.first, it.second) })
|
||||
|
||||
override val keys: Set<Key>
|
||||
get() = ArraySet(array.map { it.first })
|
||||
|
||||
override val values: Collection<Value>
|
||||
get() = ArraySet(array.map { it.second })
|
||||
|
||||
override val size: Int
|
||||
get() = array.size
|
||||
|
||||
override fun containsKey(key: Key) = array.some { it.first == key }
|
||||
|
||||
override fun containsValue(value: Value) = array.some { it.second == value }
|
||||
|
||||
override fun get(key: Key): Value? {
|
||||
for ((first, second) in array) {
|
||||
if (first == key) return second
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun isEmpty() = size == 0
|
||||
|
||||
fun put(key: Key, value: Value): Value? {
|
||||
for (i in 0 until size) {
|
||||
val entry = array[i]
|
||||
if (entry.first == key) {
|
||||
array[i] = key to value
|
||||
return entry.second
|
||||
}
|
||||
}
|
||||
array.asDynamic().push(key to value)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
internal fun <Key, Value> mapOf(vararg pairs: Pair<Key, Value>): Map<Key, Value> = ArrayMap(arrayOf(*pairs))
|
||||
|
||||
internal operator fun <K, V> Map<out K, V>.plus(map: Map<out K, V>): Map<K, V> {
|
||||
val newMap = ArrayMap<K, V>(arrayOf())
|
||||
for (entry in this.entries) {
|
||||
newMap.put(entry.key, entry.value)
|
||||
}
|
||||
for (entry in map.entries) {
|
||||
newMap.put(entry.key, entry.value)
|
||||
}
|
||||
return newMap
|
||||
}
|
||||
|
||||
internal val stdlibFqNames = mapOf<KClass<*>, String>()
|
||||
@@ -0,0 +1,13 @@
|
||||
// This file is compiled into each stepping test only if the WITH_STDLIB directive IS specified.
|
||||
|
||||
package testUtils
|
||||
|
||||
import kotlin.collections.AbstractMutableMap
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
internal val stdlibFqNames = mapOf(
|
||||
Pair::class to "kotlin.Pair",
|
||||
Triple::class to "kotlin.Triple",
|
||||
HashMap::class to "kotlin.collections.HashMap",
|
||||
AbstractMutableMap.SimpleEntry::class to "kotlin.collections.AbstractMutableMap.SimpleEntry"
|
||||
)
|
||||
+7
-3
@@ -13,9 +13,13 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:6 box:
|
||||
// test.kt:11 box: o:java.lang.String="O":java.lang.String
|
||||
// test.kt:13 box: o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
// test.kt:13 box: o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:11 box: o="O":kotlin.String
|
||||
// test.kt:13 box: o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
+15
-4
@@ -4,16 +4,27 @@ fun box() {
|
||||
var a = 1
|
||||
a --
|
||||
a /= a
|
||||
throw ArithmeticException() // Division by 0 doesn't throw in JS, so throw explicitly
|
||||
} catch(e : Throwable) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:3 box:
|
||||
// test.kt:4 box:
|
||||
// test.kt:5 box: a:int=1:int
|
||||
// test.kt:6 box: a:int=0:int
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box: e:java.lang.Throwable=java.lang.ArithmeticException
|
||||
// test.kt:10 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:9 box: e:java.lang.Throwable=java.lang.ArithmeticException
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:4 box:
|
||||
// test.kt:5 box: a=1:number
|
||||
// test.kt:5 box: a=1:number
|
||||
// test.kt:6 box: a=0:number
|
||||
// test.kt:7 box: a=0:number
|
||||
// test.kt:8 box: a=0:number
|
||||
// test.kt:8 box: a=0:number
|
||||
// test.kt:9 box: a=0:number, e=kotlin.ArithmeticException
|
||||
|
||||
+17
-4
@@ -16,7 +16,7 @@ fun box() {
|
||||
Derived(4, 5)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:15 box:
|
||||
// test.kt:7 <init>: p:int=3:int
|
||||
// test.kt:6 <init>:
|
||||
@@ -25,9 +25,8 @@ fun box() {
|
||||
// test.kt:8 <init>: p:int=3:int
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:9 <init>: p:int=3:int, a:int=2:int
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:15 box:
|
||||
|
||||
// test.kt:16 box:
|
||||
// test.kt:11 <init>: p1:int=4:int, p2:int=5:int
|
||||
// test.kt:6 <init>:
|
||||
@@ -35,4 +34,18 @@ fun box() {
|
||||
// test.kt:6 <init>:
|
||||
// test.kt:11 <init>: p1:int=4:int, p2:int=5:int
|
||||
// test.kt:16 box:
|
||||
// test.kt:17 box:
|
||||
// test.kt:17 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:15 box:
|
||||
// test.kt:7 Derived_init_$Init$: p=3:number
|
||||
// test.kt:6 <init>:
|
||||
// test.kt:4 <init>: i=1:number
|
||||
// test.kt:6 <init>:
|
||||
// test.kt:8 Derived_init_$Init$: p=3:number
|
||||
// test.kt:16 box:
|
||||
// test.kt:11 Derived_init_$Init$: p1=4:number, p2=5:number
|
||||
// test.kt:6 <init>:
|
||||
// test.kt:4 <init>: i=1:number
|
||||
// test.kt:6 <init>:
|
||||
// test.kt:17 box:
|
||||
|
||||
@@ -7,8 +7,14 @@ fun box() {
|
||||
F("foo")
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 <init>: a:java.lang.String="foo":java.lang.String
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 <init>: a="foo":kotlin.String
|
||||
// test.kt:4 <init>: a="foo":kotlin.String
|
||||
// test.kt:8 box:
|
||||
|
||||
+16
-2
@@ -7,7 +7,7 @@ fun box() {
|
||||
val b = a.copy(b = 3.0)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:3 <init>: a:double=1.0:double, b:double=2.0:double
|
||||
// test.kt:6 box:
|
||||
@@ -15,4 +15,18 @@ fun box() {
|
||||
// test.kt:3 <init>: a:double=1.0:double, b:double=3.0:double
|
||||
// test.kt:-1 copy: a:double=1.0:double, b:double=3.0:double
|
||||
// test.kt:7 box: a:someClass=someClass
|
||||
// test.kt:8 box: a:someClass=someClass, b:someClass=someClass
|
||||
// test.kt:8 box: a:someClass=someClass, b:someClass=someClass
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:3 <init>: a=1:number, b=2:number
|
||||
// test.kt:3 <init>: a=1:number, b=2:number
|
||||
// test.kt:3 <init>: a=1:number, b=2:number
|
||||
// test.kt:7 box: a=someClass
|
||||
// test.kt:1 copy$default: b=3:number
|
||||
// test.kt:1 copy$default: a=1:number, b=3:number
|
||||
// test.kt:1 copy: a=1:number, b=3:number
|
||||
// test.kt:3 <init>: a=1:number, b=3:number
|
||||
// test.kt:3 <init>: a=1:number, b=3:number
|
||||
// test.kt:3 <init>: a=1:number, b=3:number
|
||||
// test.kt:8 box: a=someClass, b=someClass
|
||||
|
||||
@@ -9,10 +9,14 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:7 box: p:kotlin.Pair=kotlin.Pair
|
||||
// test.kt:9 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:7 box: p=kotlin.Pair
|
||||
// test.kt:7 box: p=kotlin.Pair
|
||||
// test.kt:7 box: p=kotlin.Pair, o="O":kotlin.String
|
||||
// test.kt:9 box: p=kotlin.Pair, o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
+15
-6
@@ -17,20 +17,29 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:15 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
|
||||
// test.kt:15 box:
|
||||
|
||||
// test.kt:16 box: p:MyPair=MyPair
|
||||
// test.kt:6 component1:
|
||||
// test.kt:16 box: p:MyPair=MyPair
|
||||
// test.kt:10 component2:
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:16 box: p:MyPair=MyPair
|
||||
// test.kt:17 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:16 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String
|
||||
// test.kt:17 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:17 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:15 box:
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:16 box: p=MyPair
|
||||
// test.kt:16 box: p=MyPair
|
||||
// test.kt:6 component1:
|
||||
// test.kt:16 box: p=MyPair, o="O":kotlin.String
|
||||
// test.kt:10 component2:
|
||||
// test.kt:17 box: p=MyPair, o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
Vendored
+17
-11
@@ -24,23 +24,29 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:15 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
|
||||
// test.kt:15 box:
|
||||
|
||||
// test.kt:23 box: p:MyPair=MyPair
|
||||
// test.kt:6 component1:
|
||||
// test.kt:18 box: p:MyPair=MyPair
|
||||
// test.kt:10 component2:
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:23 box: p:MyPair=MyPair
|
||||
// test.kt:6 component1:
|
||||
// test.kt:18 box: p:MyPair=MyPair
|
||||
// test.kt:10 component2:
|
||||
// test.kt:20 box: p:MyPair=MyPair
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:20 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:24 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:23 box: p:MyPair=MyPair
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:15 box:
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:23 box: p=MyPair
|
||||
// test.kt:18 box: p=MyPair
|
||||
// test.kt:6 component1:
|
||||
// test.kt:18 box: p:MyPair=MyPair
|
||||
// test.kt:20 box: p=MyPair, o="O":kotlin.String
|
||||
// test.kt:10 component2:
|
||||
// test.kt:20 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String
|
||||
// test.kt:24 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
// test.kt:24 box: p=MyPair, o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
+12
-9
@@ -17,17 +17,20 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
|
||||
// test.kt:15 box: p:kotlin.Pair=kotlin.Pair
|
||||
// test.kt:10 box: p:kotlin.Pair=kotlin.Pair
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:15 box: p:kotlin.Pair=kotlin.Pair
|
||||
// test.kt:10 box: p:kotlin.Pair=kotlin.Pair
|
||||
// test.kt:12 box: p:kotlin.Pair=kotlin.Pair
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:12 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:17 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:15 box: p:kotlin.Pair=kotlin.Pair
|
||||
// test.kt:10 box: p:kotlin.Pair=kotlin.Pair
|
||||
// test.kt:12 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String
|
||||
// test.kt:17 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:15 box: p=kotlin.Pair
|
||||
// test.kt:10 box: p=kotlin.Pair
|
||||
// test.kt:12 box: p=kotlin.Pair, o="O":kotlin.String
|
||||
// test.kt:17 box: p=kotlin.Pair, o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
+8
-1
@@ -9,7 +9,14 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:7 box: p:kotlin.Triple=kotlin.Triple
|
||||
// test.kt:9 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:7 box: p=kotlin.Triple
|
||||
// test.kt:7 box: p=kotlin.Triple
|
||||
// test.kt:7 box: p=kotlin.Triple, o="O":kotlin.String
|
||||
// test.kt:9 box: p=kotlin.Triple, o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
+10
-12
@@ -19,22 +19,20 @@ fun box(): String {
|
||||
return o + k
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
|
||||
// test.kt:17 box: p:kotlin.Triple=kotlin.Triple
|
||||
// test.kt:12 box: p:kotlin.Triple=kotlin.Triple
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:14 box: p:kotlin.Triple=kotlin.Triple
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:14 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:19 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
|
||||
// test.kt:17 box: p:kotlin.Triple=kotlin.Triple
|
||||
// test.kt:12 box: p:kotlin.Triple=kotlin.Triple
|
||||
// test.kt:14 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String
|
||||
|
||||
// test.kt:19 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
|
||||
// test.kt:17 box: p=kotlin.Triple
|
||||
// test.kt:12 box: p=kotlin.Triple
|
||||
// test.kt:14 box: p=kotlin.Triple, o="O":kotlin.String
|
||||
// test.kt:19 box: p=kotlin.Triple, o="O":kotlin.String, k="K":kotlin.String
|
||||
|
||||
@@ -8,9 +8,21 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:6 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:7 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String, b:java.lang.String="23":java.lang.String
|
||||
// test.kt:6 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:9 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:6 box: map=kotlin.collections.HashMap
|
||||
// test.kt:6 box: map=kotlin.collections.HashMap
|
||||
// test.kt:6 box: map=kotlin.collections.HashMap
|
||||
// test.kt:6 box: map=kotlin.collections.HashMap
|
||||
// test.kt:6 box: map=kotlin.collections.HashMap, a="1":kotlin.String
|
||||
// test.kt:7 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
|
||||
// test.kt:6 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
|
||||
// test.kt:9 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
|
||||
|
||||
@@ -20,29 +20,33 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:6 box:
|
||||
// test.kt:16 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:11 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:13 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:19 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String, b:java.lang.String="23":java.lang.String
|
||||
|
||||
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// test.kt:21 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:16 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// test.kt:11 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:13 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String
|
||||
|
||||
// test.kt:19 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String, b:java.lang.String="23":java.lang.String
|
||||
|
||||
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:21 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:6 box:
|
||||
// test.kt:16 box: map=kotlin.collections.HashMap
|
||||
// test.kt:16 box: map=kotlin.collections.HashMap
|
||||
// test.kt:16 box: map=kotlin.collections.HashMap
|
||||
// test.kt:11 box: map=kotlin.collections.HashMap
|
||||
// test.kt:13 box: map=kotlin.collections.HashMap, a="1":kotlin.String
|
||||
// test.kt:19 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
|
||||
// test.kt:16 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
|
||||
// test.kt:21 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
|
||||
|
||||
@@ -9,7 +9,6 @@ fun box() {
|
||||
foo(A("O", 123)) { (x, y) -> x + y }
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="O":java.lang.String, y:int=123:int
|
||||
@@ -28,4 +27,18 @@ fun box() {
|
||||
// test.kt:9 invoke: x:java.lang.String="O":java.lang.String, y:int=123:int
|
||||
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 box:
|
||||
// test.kt:10 box:
|
||||
// test.kt:10 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:9 box:
|
||||
// test.kt:6 foo: a=A, block=Function1
|
||||
// test.kt:9 box$lambda:
|
||||
// test.kt:1 component1:
|
||||
// test.kt:9 box$lambda: x="O":kotlin.String
|
||||
// test.kt:1 component2:
|
||||
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number
|
||||
// test.kt:10 box:
|
||||
|
||||
+15
-3
@@ -17,8 +17,6 @@ fun box() {
|
||||
foo(MyPair("X", "Y")) { (x, y) -> x + y }
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:17 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
|
||||
@@ -45,4 +43,18 @@ fun box() {
|
||||
// test.kt:17 invoke: x:java.lang.String="O":java.lang.String, y:java.lang.String="K":java.lang.String
|
||||
// test.kt:14 foo: a:MyPair=MyPair, block:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:17 box:
|
||||
// test.kt:18 box:
|
||||
// test.kt:18 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:17 box:
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:17 box:
|
||||
// test.kt:14 foo: a=MyPair, block=Function1
|
||||
// test.kt:17 box$lambda:
|
||||
// test.kt:6 component1:
|
||||
// test.kt:17 box$lambda: x="O":kotlin.String
|
||||
// test.kt:10 component2:
|
||||
// test.kt:17 box$lambda: x="O":kotlin.String, y="K":kotlin.String
|
||||
// test.kt:18 box:
|
||||
|
||||
+15
-3
@@ -26,8 +26,6 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:17 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
|
||||
@@ -57,4 +55,18 @@ fun box() {
|
||||
// test.kt:25 invoke: x:java.lang.String="O":java.lang.String, y:java.lang.String="K":java.lang.String
|
||||
// test.kt:14 foo: a:MyPair=MyPair, block:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:17 box:
|
||||
// test.kt:27 box:
|
||||
// test.kt:27 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:17 box:
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
|
||||
// test.kt:17 box:
|
||||
// test.kt:14 foo: a=MyPair, block=Function1
|
||||
// test.kt:20 box$lambda:
|
||||
// test.kt:6 component1:
|
||||
// test.kt:22 box$lambda: x="O":kotlin.String
|
||||
// test.kt:10 component2:
|
||||
// test.kt:25 box$lambda: x="O":kotlin.String, y="K":kotlin.String
|
||||
// test.kt:27 box:
|
||||
|
||||
@@ -20,8 +20,6 @@ fun box() {
|
||||
return
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="O":java.lang.String, y:int=123:int
|
||||
@@ -45,4 +43,18 @@ fun box() {
|
||||
// test.kt:17 invoke: x:java.lang.String="O":java.lang.String, y:int=123:int
|
||||
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 box:
|
||||
// test.kt:20 box:
|
||||
// test.kt:20 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:9 box:
|
||||
// test.kt:6 foo: a=A, block=Function1
|
||||
// test.kt:12 box$lambda:
|
||||
// test.kt:1 component1:
|
||||
// test.kt:14 box$lambda: x="O":kotlin.String
|
||||
// test.kt:1 component2:
|
||||
// test.kt:17 box$lambda: x="O":kotlin.String, y=123:number
|
||||
// test.kt:20 box:
|
||||
|
||||
+23
-3
@@ -9,8 +9,6 @@ fun box() {
|
||||
foo(A("O", 123), A("K", 877)) { (x, y), (z, w) -> (x + z) + (y + w) }
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x:java.lang.String="O":java.lang.String, y:int=123:int
|
||||
@@ -33,4 +31,26 @@ fun box() {
|
||||
// test.kt:9 invoke: x:java.lang.String="O":java.lang.String, y:int=123:int, z:java.lang.String="K":java.lang.String, w:int=877:int
|
||||
// test.kt:6 foo: a:A=A, b:A=A, block:kotlin.jvm.functions.Function2=TestKt$box$1
|
||||
// test.kt:9 box:
|
||||
// test.kt:10 box:
|
||||
// test.kt:10 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
|
||||
// test.kt:9 box:
|
||||
// test.kt:4 <init>: x="K":kotlin.String, y=877:number
|
||||
// test.kt:4 <init>: x="K":kotlin.String, y=877:number
|
||||
// test.kt:4 <init>: x="K":kotlin.String, y=877:number
|
||||
// test.kt:9 box:
|
||||
// test.kt:6 foo: a=A, b=A, block=Function2
|
||||
// test.kt:9 box$lambda:
|
||||
// test.kt:1 component1:
|
||||
// test.kt:9 box$lambda: x="O":kotlin.String
|
||||
// test.kt:1 component2:
|
||||
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number
|
||||
// test.kt:1 component1:
|
||||
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number, z="K":kotlin.String
|
||||
// test.kt:1 component2:
|
||||
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number, z="K":kotlin.String, w=877:number
|
||||
// test.kt:10 box:
|
||||
|
||||
+8
-3
@@ -5,7 +5,7 @@ fun box() {
|
||||
}("O", "K")
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:4 box: a:java.lang.String="O":java.lang.String, b:java.lang.String="K":java.lang.String
|
||||
@@ -14,5 +14,10 @@ fun box() {
|
||||
// test.kt:5 box:
|
||||
// test.kt:4 invoke: a:java.lang.String="O":java.lang.String, b:java.lang.String="K":java.lang.String
|
||||
// test.kt:5 box:
|
||||
// EXPECTATIONS
|
||||
// test.kt:6 box:
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:3 box:
|
||||
// test.kt:4 box$lambda: a="O":kotlin.String, b="K":kotlin.String
|
||||
// test.kt:6 box:
|
||||
|
||||
+20
-2
@@ -16,7 +16,7 @@ fun box() {
|
||||
} while (x < z)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:8 box: x:int=0:int
|
||||
// test.kt:9 box: x:int=0:int, z:int=2:int
|
||||
@@ -30,4 +30,22 @@ fun box() {
|
||||
// test.kt:9 box: x:int=2:int, z:int=2:int
|
||||
// test.kt:15 box: x:int=2:int, z:int=2:int
|
||||
// test.kt:16 box: x:int=2:int, z:int=2:int
|
||||
// test.kt:17 box: x:int=2:int
|
||||
// test.kt:17 box: x:int=2:int
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:8 box: x=0:number
|
||||
// test.kt:9 box: x=0:number, z=2:number
|
||||
// test.kt:9 box: x=0:number, z=2:number
|
||||
// test.kt:9 box: x=1:number, z=2:number
|
||||
// test.kt:3 shouldContinue: i=0:number
|
||||
// test.kt:10 box: x=1:number, z=2:number
|
||||
// test.kt:16 box: x=1:number, z=2:number
|
||||
// test.kt:8 box: x=1:number, z=2:number
|
||||
// test.kt:9 box: x=1:number, z=2:number
|
||||
// test.kt:9 box: x=1:number, z=2:number
|
||||
// test.kt:9 box: x=2:number, z=2:number
|
||||
// test.kt:3 shouldContinue: i=1:number
|
||||
// test.kt:15 box: x=2:number, z=2:number
|
||||
// test.kt:16 box: x=2:number, z=2:number, y=12:number
|
||||
// test.kt:17 box: x=2:number, z=2:number, y=12:number
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ fun box() {
|
||||
// EXPECTATIONS
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 foo:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
|
||||
+11
-2
@@ -16,8 +16,6 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:6 box:
|
||||
// test.kt:12 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
@@ -33,3 +31,14 @@ fun box() {
|
||||
// test.kt:15 box: map:java.util.Map=java.util.Collections$SingletonMap, e:java.util.Map$Entry=java.util.AbstractMap$SimpleImmutableEntry
|
||||
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
// test.kt:17 box: map:java.util.Map=java.util.Collections$SingletonMap
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:6 box:
|
||||
// test.kt:12 box: map=kotlin.collections.HashMap
|
||||
// test.kt:12 box: map=kotlin.collections.HashMap
|
||||
// test.kt:12 box: map=kotlin.collections.HashMap
|
||||
// test.kt:15 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
|
||||
// test.kt:15 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
|
||||
// test.kt:12 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
|
||||
// test.kt:17 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
|
||||
|
||||
+11
-2
@@ -10,7 +10,7 @@ fun box() {
|
||||
y++
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:2 <init>:
|
||||
// test.kt:8 box:
|
||||
@@ -18,4 +18,13 @@ fun box() {
|
||||
// test.kt:4 box: a:A=A, this_$iv:A=A, $i$f$getS:int=0:int
|
||||
// test.kt:9 box: a:A=A
|
||||
// test.kt:10 box: a:A=A, y:int=1:int
|
||||
// test.kt:11 box: a:A=A, y:int=2:int
|
||||
// test.kt:11 box: a:A=A, y:int=2:int
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:2 <init>:
|
||||
// test.kt:4 box: a=A
|
||||
// test.kt:9 box: a=A
|
||||
// test.kt:10 box: a=A, y=1:number
|
||||
// test.kt:10 box: a=A, y=1:number
|
||||
// test.kt:11 box: a=A, y=2:number
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FILE: a.kt
|
||||
@JsExport
|
||||
fun exclamate(s: String) =
|
||||
"$s!"
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@JsFun("""
|
||||
function (a, b) {
|
||||
return _.exclamate(a) +
|
||||
_.exclamate(b);
|
||||
}
|
||||
""")
|
||||
external fun exclamateAndConcat(`a!`: String, `b!`: String): String
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@JsPolyfill("""
|
||||
if (typeof String.prototype.myAwesomePolyfill === "undefined") {
|
||||
Object.defineProperty(String.prototype, "myAwesomePolyfill", {
|
||||
value: function () {
|
||||
return this + "!";
|
||||
}
|
||||
});
|
||||
}
|
||||
""")
|
||||
internal inline fun String.myAwesomePolyfill(): Boolean =
|
||||
asDynamic()
|
||||
.myAwesomePolyfill()
|
||||
|
||||
val walter1VarDecl = "var walter1 = _.exclamate('Walter');"
|
||||
val jesse1VarDecl = "var jesse1 = _.exclamate(jesse);"
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
|
||||
|
||||
fun box() {
|
||||
|
||||
exclamateAndConcat(
|
||||
"hello",
|
||||
"world")
|
||||
val jesse = "Jesse"
|
||||
js(
|
||||
"_.exclamate(jesse);") // Local variable is captured
|
||||
js(
|
||||
"_.exclamate('Walter');") // No local variables captured
|
||||
js(
|
||||
walter1VarDecl +
|
||||
"_.exclamate(walter1);")
|
||||
js(
|
||||
jesse1VarDecl +
|
||||
"_.exclamate(jesse1);")
|
||||
|
||||
"foo".myAwesomePolyfill()
|
||||
|
||||
js("""
|
||||
function localFun(hello, world) {
|
||||
return '' + hello + ', ' + world + '!';
|
||||
}
|
||||
""")
|
||||
|
||||
js("localFun('hello', 'world')")
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// test.kt:41 box:
|
||||
// test.kt:42 box: a!="hello":kotlin.String
|
||||
// a.kt:11 box: a!="hello":kotlin.String, b!="world":kotlin.String
|
||||
// a.kt:6 exclamate: s="hello":kotlin.String
|
||||
// a.kt:12 box: a!="hello":kotlin.String, b!="world":kotlin.String
|
||||
// a.kt:6 exclamate: s="world":kotlin.String
|
||||
// test.kt:43 box: a!="hello":kotlin.String, b!="world":kotlin.String
|
||||
// test.kt:45 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String
|
||||
// a.kt:6 exclamate: s="Jesse":kotlin.String
|
||||
// test.kt:47 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String
|
||||
// a.kt:6 exclamate: s="Walter":kotlin.String
|
||||
// test.kt:49 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String
|
||||
// a.kt:6 exclamate: s="Walter":kotlin.String
|
||||
// test.kt:49 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String
|
||||
// a.kt:6 exclamate: s="Walter!":kotlin.String
|
||||
// test.kt:52 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String
|
||||
// a.kt:6 exclamate: s="Jesse":kotlin.String
|
||||
// test.kt:52 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
|
||||
// a.kt:6 exclamate: s="Jesse!":kotlin.String
|
||||
// a.kt:29 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
|
||||
// a.kt:22 value:
|
||||
// test.kt:63 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
|
||||
// test.kt:59 localFun: hello="hello":kotlin.String, world="world":kotlin.String
|
||||
// test.kt:64 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
|
||||
+6
-5
@@ -1,3 +1,4 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// FILE: test.kt
|
||||
class C {
|
||||
@@ -9,9 +10,9 @@ fun box() {
|
||||
C().foo(4)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// test.kt:9 box:
|
||||
// test.kt:3 <init>:
|
||||
// test.kt:9 box:
|
||||
// test.kt:5 foo: firstParam:int=4:int, secondParam:java.lang.String="":java.lang.String
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:10 box:
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:10 box:
|
||||
// test.kt:6 foo: firstParam:int=4:int, secondParam:java.lang.String="":java.lang.String
|
||||
// test.kt:11 box:
|
||||
|
||||
+10
-5
@@ -27,27 +27,32 @@ fun box() {
|
||||
// variables local to the function, and hence need no name mangling to
|
||||
// properly figure in the debugger.
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:13 box:
|
||||
// test.kt:5 foo:
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:6 foo: x:int=1:int
|
||||
// test.kt:9 foo: x:int=1:int, $fun$bar$1:TestKt$foo$1=TestKt$foo$1
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:9 foo: x:int=1:int
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:7 invoke:
|
||||
// test.kt:8 invoke: y:int=1:int
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:7 foo$bar: x:int=1:int
|
||||
// test.kt:8 foo$bar: x:int=1:int, y:int=1:int
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:10 foo: x:int=1:int, $fun$bar$1:TestKt$foo$1=TestKt$foo$1
|
||||
// test.kt:14 box:
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:10 foo: x:int=1:int
|
||||
// test.kt:14 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:13 box:
|
||||
// test.kt:5 foo:
|
||||
// test.kt:9 foo: x=1:number
|
||||
// test.kt:7 foo$bar: x=1:number
|
||||
// test.kt:8 foo$bar: x=1:number, y=1:number
|
||||
// test.kt:10 foo: x=1:number
|
||||
// test.kt:14 box:
|
||||
|
||||
@@ -18,14 +18,13 @@ fun box() {
|
||||
// - the _declaration_ of the local function does not figure in the byte code
|
||||
// of the outer function and hence, has no line number
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:10 box:
|
||||
// test.kt:5 foo:
|
||||
// test.kt:7 foo: $fun$bar$1:TestKt$foo$1=TestKt$foo$1
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// EXPECTATIONS JVM_IR JS_IR
|
||||
// test.kt:10 box:
|
||||
// test.kt:7 foo:
|
||||
// test.kt:11 box:
|
||||
// test.kt:11 box:
|
||||
|
||||
+10
-2
@@ -11,11 +11,19 @@ fun box() {
|
||||
x.Bar()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:10 box:
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:10 box:
|
||||
// test.kt:11 box: x:Foo=Foo
|
||||
// test.kt:5 <init>:
|
||||
// test.kt:11 box: x:Foo=Foo
|
||||
// test.kt:12 box: x:Foo=Foo
|
||||
// test.kt:12 box: x:Foo=Foo
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:10 box:
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:11 box: x=Foo
|
||||
// test.kt:5 <init>:
|
||||
// test.kt:5 <init>:
|
||||
// test.kt:12 box: x=Foo
|
||||
|
||||
+7
-1
@@ -10,10 +10,16 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
|
||||
// test.kt:10 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg=Function1
|
||||
// test.kt:10 box$lambda: $this$blockFun="OK":kotlin.String
|
||||
// test.kt:11 box:
|
||||
|
||||
+9
-2
@@ -10,10 +10,17 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:4 foo: block:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 invoke: $this$foo:long=1:long
|
||||
// test.kt:4 foo: block:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:8 box:
|
||||
// test.kt:11 box:
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:4 foo: block=Function1
|
||||
// test.kt:4 foo: block=Function1
|
||||
// test.kt:9 box$lambda: $this$foo=kotlin.Long
|
||||
// test.kt:11 box:
|
||||
|
||||
+7
-2
@@ -7,7 +7,12 @@ fun box() {
|
||||
"OK".test()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 test: $this$test:java.lang.String="OK":java.lang.String
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 test: <this>="OK":kotlin.String
|
||||
// test.kt:8 box:
|
||||
|
||||
@@ -7,7 +7,12 @@ fun box() {
|
||||
"OK".foo(42)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 foo: $this$foo:java.lang.String="OK":java.lang.String, a:int=42:int
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:4 foo: <this>="OK":kotlin.String, a=42:number
|
||||
// test.kt:8 box:
|
||||
|
||||
+7
-1
@@ -10,10 +10,16 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
|
||||
// test.kt:10 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg=Function1
|
||||
// test.kt:10 box$lambda: $this$blockFun="OK":kotlin.String
|
||||
// test.kt:11 box:
|
||||
|
||||
+7
-1
@@ -10,10 +10,16 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 invoke: $this$label:java.lang.String="OK":java.lang.String
|
||||
// test.kt:10 invoke: $this$label:java.lang.String="OK":java.lang.String
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg=Function1
|
||||
// test.kt:10 box$lambda: $this$label="OK":kotlin.String
|
||||
// test.kt:11 box:
|
||||
|
||||
Vendored
+7
-1
@@ -10,10 +10,16 @@ fun box() {
|
||||
})
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:9 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
|
||||
// test.kt:10 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
|
||||
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
|
||||
// test.kt:11 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:5 blockFun: blockArg=Function1
|
||||
// test.kt:10 box$lambda: $this$blockFun="OK":kotlin.String
|
||||
// test.kt:11 box:
|
||||
|
||||
+7
-1
@@ -9,10 +9,16 @@ suspend fun box() {
|
||||
A().foo()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:5 foo: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:10 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:9 box: $completion=EmptyContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:9 box: $completion=EmptyContinuation
|
||||
// test.kt:5 foo: $completion=EmptyContinuation
|
||||
|
||||
+13
-1
@@ -14,7 +14,7 @@ suspend fun box() {
|
||||
A().foo1(42)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
@@ -29,3 +29,15 @@ suspend fun box() {
|
||||
// test.kt:10 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:15 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:14 box: $completion=EmptyContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:14 box: $completion=EmptyContinuation
|
||||
// test.kt:14 box: $completion=EmptyContinuation
|
||||
// test.kt:7 doResume:
|
||||
// test.kt:5 foo: $completion=$foo1COROUTINE$0
|
||||
// test.kt:8 doResume:
|
||||
// test.kt:5 foo: $completion=$foo1COROUTINE$0
|
||||
// test.kt:9 doResume:
|
||||
// test.kt:10 doResume: dead=kotlin.Long
|
||||
|
||||
@@ -4,5 +4,8 @@
|
||||
suspend fun box() {}
|
||||
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:4 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:4 box: $completion=EmptyContinuation
|
||||
|
||||
+7
-1
@@ -10,10 +10,16 @@ suspend fun box() {
|
||||
}
|
||||
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:6 foo: $this$foo:A=A, $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:10 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:9 box: $completion=EmptyContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:9 box: $completion=EmptyContinuation
|
||||
// test.kt:6 foo: <this>=A, $completion=EmptyContinuation
|
||||
|
||||
+11
-1
@@ -12,7 +12,7 @@ suspend fun box() {
|
||||
foo1(42)
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:5 foo1:
|
||||
// test.kt:6 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
@@ -25,3 +25,13 @@ suspend fun box() {
|
||||
// test.kt:9 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:13 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:12 box: $completion=EmptyContinuation
|
||||
// test.kt:12 box: $completion=EmptyContinuation
|
||||
// test.kt:6 doResume:
|
||||
// test.kt:4 foo: $completion=$foo1COROUTINE$0
|
||||
// test.kt:7 doResume:
|
||||
// test.kt:4 foo: $completion=$foo1COROUTINE$0
|
||||
// test.kt:8 doResume:
|
||||
// test.kt:9 doResume: dead=kotlin.Long
|
||||
|
||||
+13
-1
@@ -16,7 +16,7 @@ suspend fun box() {
|
||||
|
||||
// The lambda object constructor has a local variables table on the IR backend.
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
@@ -31,3 +31,15 @@ suspend fun box() {
|
||||
// test.kt:11 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:15 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:14 box: $completion=EmptyContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:14 box: $completion=EmptyContinuation
|
||||
// test.kt:14 box: $completion=EmptyContinuation
|
||||
// test.kt:8 doResume:
|
||||
// test.kt:6 foo: <this>=A, $completion=$foo1COROUTINE$0
|
||||
// test.kt:9 doResume:
|
||||
// test.kt:6 foo: <this>=A, $completion=$foo1COROUTINE$0
|
||||
// test.kt:10 doResume:
|
||||
// test.kt:11 doResume: dead=kotlin.Long
|
||||
|
||||
+10
-1
@@ -18,7 +18,7 @@ suspend fun box() {
|
||||
hasLocal()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:10 box:
|
||||
// test.kt:12 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
// test.kt:8 h: $completion:kotlin.coroutines.Continuation=TestKt$box$1
|
||||
@@ -31,3 +31,12 @@ suspend fun box() {
|
||||
// test.kt:4 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$hasLocal:int=0:int
|
||||
// test.kt:5 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$hasLocal:int=0:int, x$iv:int=41:int
|
||||
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:12 doResume:
|
||||
// test.kt:8 h: $completion=$boxCOROUTINE$0
|
||||
// test.kt:4 doResume:
|
||||
// test.kt:5 doResume: x=41:number
|
||||
// test.kt:4 doResume: x=41:number
|
||||
// test.kt:5 doResume: x=41:number, x=41:number
|
||||
// test.kt:19 doResume: x=41:number, x=41:number
|
||||
|
||||
+30
-1
@@ -20,7 +20,7 @@ suspend fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:10 box:
|
||||
// test.kt:12 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
// test.kt:6 h: $completion:kotlin.coroutines.Continuation=TestKt$box$1
|
||||
@@ -45,3 +45,32 @@ suspend fun box() {
|
||||
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, x:int=1:int
|
||||
// test.kt:18 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, x:int=1:int
|
||||
// test.kt:21 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:12 doResume:
|
||||
// test.kt:6 h: $completion=$boxCOROUTINE$0
|
||||
// test.kt:13 doResume:
|
||||
// test.kt:13 doResume:
|
||||
// test.kt:13 doResume:
|
||||
// test.kt:13 doResume: x=0:number
|
||||
// test.kt:14 doResume: x=0:number
|
||||
// test.kt:8 f: x=0:number
|
||||
// test.kt:13 doResume: x=0:number
|
||||
// test.kt:13 doResume: x=0:number
|
||||
// test.kt:13 doResume: x=1:number
|
||||
// test.kt:14 doResume: x=1:number
|
||||
// test.kt:8 f: x=1:number
|
||||
// test.kt:13 doResume: x=1:number
|
||||
// test.kt:18 doResume: x=1:number
|
||||
// test.kt:18 doResume: x=1:number
|
||||
// test.kt:18 doResume: x=1:number
|
||||
// test.kt:18 doResume: x=1:number, x=0:number
|
||||
// test.kt:19 doResume: x=1:number, x=0:number
|
||||
// test.kt:8 f: x=0:number
|
||||
// test.kt:18 doResume: x=1:number, x=0:number
|
||||
// test.kt:18 doResume: x=1:number, x=0:number
|
||||
// test.kt:18 doResume: x=1:number, x=1:number
|
||||
// test.kt:19 doResume: x=1:number, x=1:number
|
||||
// test.kt:8 f: x=1:number
|
||||
// test.kt:18 doResume: x=1:number, x=1:number
|
||||
// test.kt:21 doResume: x=1:number, x=1:number
|
||||
|
||||
+22
-2
@@ -26,14 +26,16 @@ suspend fun box() {
|
||||
val a = suspendBar()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// FIXME(JS_IR): KT-54657
|
||||
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:25 box:
|
||||
// test.kt:26 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int
|
||||
// test.kt:14 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int, $this$extensionFun$iv$iv:AtomicInt=AtomicInt, $i$f$extensionFun:int=0:int
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:14 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int, $this$extensionFun$iv$iv:AtomicInt=AtomicInt, $i$f$extensionFun:int=0:int
|
||||
// test.kt:15 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int, $this$extensionFun$iv$iv:AtomicInt=AtomicInt, $i$f$extensionFun:int=0:int
|
||||
// test.kt:6 getValue:
|
||||
@@ -46,3 +48,21 @@ suspend fun box() {
|
||||
// test.kt:23 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int
|
||||
// test.kt:26 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
// test.kt:27 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:19 doResume:
|
||||
// test.kt:10 <init properties test.kt>:
|
||||
// test.kt:8 atomic: i=0:number
|
||||
// test.kt:6 <init>: value=0:number
|
||||
// test.kt:6 <init>: value=0:number
|
||||
// test.kt:11 <init properties test.kt>:
|
||||
// test.kt:10 <get-state>$accessor$1gle43a:
|
||||
// test.kt:10 <get-state>:
|
||||
// test.kt:14 doResume:
|
||||
// test.kt:11 <get-a>$accessor$1gle43a:
|
||||
// test.kt:11 <get-a>:
|
||||
// test.kt:37 doResume:
|
||||
// test.kt:37 doResume:
|
||||
// test.kt:37 doResume:
|
||||
// test.kt:26 doResume:
|
||||
// test.kt:27 doResume: a=Unit
|
||||
|
||||
@@ -5,6 +5,10 @@ suspend fun box() {
|
||||
var x = 1
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:5 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:6 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1, x:int=1:int
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:5 box: $completion=EmptyContinuation
|
||||
// test.kt:6 box: $completion=EmptyContinuation, x=1:number
|
||||
|
||||
@@ -13,33 +13,41 @@ suspend fun box() = foo(A()) { (x_param, _, y_param) ->
|
||||
x_param + y_param
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:10 foo: a:A=A, block:kotlin.jvm.functions.Function2=TestKt$box$2, $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:5 component1:
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit, $dstr$x_param$_u24__u24$y_param:A=A
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 component3:
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit, x_param:java.lang.String="O":java.lang.String
|
||||
// test.kt:13 invokeSuspend: $result:java.lang.Object=kotlin.Unit, x_param:java.lang.String="O":java.lang.String, y_param:java.lang.String="K":java.lang.String
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit, $dstr$x_param$_u24__u24$y_param:A=A
|
||||
// test.kt:13 invokeSuspend: $result:java.lang.Object=kotlin.Unit, $dstr$x_param$_u24__u24$y_param:A=A, x_param:java.lang.String="O":java.lang.String, y_param:java.lang.String="K":java.lang.String
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:-1 invoke: p1:A=A, p2:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:-1 invoke:
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:10 foo: a:A=A, block:kotlin.jvm.functions.Function2=TestKt$box$2, $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:12 box: $completion=EmptyContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:12 box: $completion=EmptyContinuation
|
||||
// test.kt:12 box$slambda:
|
||||
// test.kt:12 box: $completion=EmptyContinuation
|
||||
// test.kt:10 foo: a=A, block=Function2, $completion=EmptyContinuation
|
||||
// test.kt:12 doResume:
|
||||
// test.kt:5 component1:
|
||||
// test.kt:12 doResume: x_param="O":kotlin.String
|
||||
// test.kt:7 component3:
|
||||
// test.kt:13 doResume: x_param="O":kotlin.String, y_param="K":kotlin.String
|
||||
|
||||
+14
-1
@@ -18,7 +18,7 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box: result:java.lang.String="":java.lang.String
|
||||
// test.kt:9 box: result:java.lang.String="":java.lang.String, x:java.lang.String="A":java.lang.String
|
||||
@@ -28,3 +28,16 @@ fun box() {
|
||||
// test.kt:15 box: result:java.lang.String="y":java.lang.String, x:java.lang.String="A":java.lang.String
|
||||
// test.kt:16 box: result:java.lang.String="y":java.lang.String, x:java.lang.String="A":java.lang.String, z:java.lang.String="z":java.lang.String
|
||||
// test.kt:19 box: result:java.lang.String="yz":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box: result="":kotlin.String
|
||||
// test.kt:8 box: result="":kotlin.String
|
||||
// test.kt:8 box: result="":kotlin.String
|
||||
// test.kt:8 box: result="":kotlin.String
|
||||
// test.kt:10 box: result="":kotlin.String, x="A":kotlin.String
|
||||
// test.kt:11 box: result="":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:12 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:15 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:16 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:19 box: result="yz":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
|
||||
+18
-1
@@ -36,7 +36,7 @@ fun box() {
|
||||
val localX = x
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:35 box:
|
||||
// test.kt:20 compute:
|
||||
// test.kt:21 compute:
|
||||
@@ -53,3 +53,20 @@ fun box() {
|
||||
// test.kt:35 box:
|
||||
// test.kt:36 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
|
||||
// test.kt:37 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:35 box:
|
||||
// test.kt:21 compute:
|
||||
// test.kt:22 compute: y=42:number
|
||||
// test.kt:22 compute: y=42:number
|
||||
// test.kt:22 compute: y=42:number
|
||||
// test.kt:22 compute: y=42:number, i=0:number
|
||||
// test.kt:8 compute: y=42:number, i=0:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:10 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:24 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:28 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:29 compute: y=42:number, i=0:number, z=32:number, j=0:number, s2="OK":kotlin.String
|
||||
|
||||
+16
-1
@@ -23,7 +23,7 @@ fun box(): String {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:9 box: i:int=0:int
|
||||
@@ -35,3 +35,18 @@ fun box(): String {
|
||||
// test.kt:15 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String, z:java.lang.String="z":java.lang.String
|
||||
// test.kt:17 box: i:int=0:int
|
||||
// test.kt:21 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box: i=0:number
|
||||
// test.kt:10 box: i=0:number
|
||||
// test.kt:11 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:13 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException
|
||||
// test.kt:14 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
|
||||
// test.kt:15 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:17 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:21 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
|
||||
|
||||
+16
-1
@@ -23,7 +23,7 @@ fun box(): String {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:9 box: i:int=0:int
|
||||
@@ -35,3 +35,18 @@ fun box(): String {
|
||||
// test.kt:15 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String, z:java.lang.String="z":java.lang.String
|
||||
// test.kt:17 box: i:int=0:int
|
||||
// test.kt:21 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box: i=0:number
|
||||
// test.kt:10 box: i=0:number
|
||||
// test.kt:11 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:13 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException
|
||||
// test.kt:14 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
|
||||
// test.kt:15 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:17 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:21 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
|
||||
|
||||
+15
-1
@@ -22,7 +22,7 @@ fun box(): String {
|
||||
return "FAIL3"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:9 box: i:int=0:int
|
||||
@@ -33,3 +33,17 @@ fun box(): String {
|
||||
// test.kt:14 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String
|
||||
// test.kt:16 box: i:int=0:int
|
||||
// test.kt:20 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box:
|
||||
// test.kt:8 box: i=0:number
|
||||
// test.kt:10 box: i=0:number
|
||||
// test.kt:11 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:13 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException
|
||||
// test.kt:14 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
|
||||
// test.kt:16 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
|
||||
// test.kt:20 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
|
||||
|
||||
+11
-1
@@ -16,7 +16,7 @@ fun box(): String {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:4 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:6 box: i:int=0:int
|
||||
@@ -24,3 +24,13 @@ fun box(): String {
|
||||
// test.kt:8 box: i:int=0:int, x:java.lang.String="x":java.lang.String
|
||||
// test.kt:10 box: i:int=0:int
|
||||
// test.kt:14 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box: i=0:number
|
||||
// test.kt:7 box: i=0:number
|
||||
// test.kt:8 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:10 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:14 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
|
||||
+13
-2
@@ -16,7 +16,7 @@ fun box(): String {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:4 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:6 box: i:int=0:int
|
||||
@@ -27,5 +27,16 @@ fun box(): String {
|
||||
// test.kt:5 box: i:int=0:int
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:5 box: i:int=0:int
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:14 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box:
|
||||
// test.kt:5 box: i=0:number
|
||||
// test.kt:7 box: i=0:number
|
||||
// test.kt:8 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:10 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:5 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:14 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
|
||||
+11
-1
@@ -18,7 +18,7 @@ fun box(): String {
|
||||
return "FAIL2"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:7 box:
|
||||
// test.kt:8 box: i:int=0:int
|
||||
@@ -26,3 +26,13 @@ fun box(): String {
|
||||
// test.kt:10 box: i:int=0:int, x:java.lang.String="x":java.lang.String
|
||||
// test.kt:12 box: i:int=0:int
|
||||
// test.kt:16 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:7 box:
|
||||
// test.kt:7 box:
|
||||
// test.kt:7 box:
|
||||
// test.kt:7 box: i=0:number
|
||||
// test.kt:9 box: i=0:number
|
||||
// test.kt:10 box: i=0:number, x="x":kotlin.String
|
||||
// test.kt:12 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:16 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
|
||||
|
||||
+6
-1
@@ -14,8 +14,13 @@ fun box(): String {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 box:
|
||||
// test.kt:9 box:
|
||||
// test.kt:10 box: x:java.lang.String="x":java.lang.String
|
||||
// test.kt:12 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:9 box:
|
||||
// test.kt:10 box: x="x":kotlin.String
|
||||
// test.kt:12 box: x="x":kotlin.String
|
||||
|
||||
+22
-1
@@ -17,7 +17,7 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:7 box: result:java.lang.String="":java.lang.String
|
||||
// test.kt:8 box: result:java.lang.String="":java.lang.String, x:java.lang.String="A":java.lang.String
|
||||
@@ -35,3 +35,24 @@ fun box() {
|
||||
// test.kt:15 box: result:java.lang.String="yzy":java.lang.String, x:java.lang.String="B":java.lang.String, z:java.lang.String="z":java.lang.String
|
||||
// test.kt:7 box: result:java.lang.String="yzyz":java.lang.String
|
||||
// test.kt:18 box: result:java.lang.String="yzyz":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:6 box:
|
||||
// test.kt:7 box: result="":kotlin.String
|
||||
// test.kt:7 box: result="":kotlin.String
|
||||
// test.kt:7 box: result="":kotlin.String
|
||||
// test.kt:7 box: result="":kotlin.String
|
||||
// test.kt:9 box: result="":kotlin.String, x="A":kotlin.String
|
||||
// test.kt:10 box: result="":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:11 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:14 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:15 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:7 box: result="yz":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:7 box: result="yz":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:9 box: result="yz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:10 box: result="yz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:11 box: result="yzy":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:14 box: result="yzy":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:15 box: result="yzy":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:7 box: result="yzyz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
// test.kt:18 box: result="yzyz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
|
||||
+14
-1
@@ -23,7 +23,7 @@ fun box() {
|
||||
compute()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:23 box:
|
||||
// test.kt:7 compute:
|
||||
// test.kt:8 compute: result:java.lang.String="":java.lang.String
|
||||
@@ -36,3 +36,16 @@ fun box() {
|
||||
// test.kt:12 compute: result:java.lang.String="yz":java.lang.String, x:java.lang.String="A":java.lang.String, y:java.lang.String="y":java.lang.String
|
||||
// test.kt:23 box:
|
||||
// test.kt:24 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:23 box:
|
||||
// test.kt:7 compute:
|
||||
// test.kt:8 compute: result="":kotlin.String
|
||||
// test.kt:8 compute: result="":kotlin.String
|
||||
// test.kt:8 compute: result="":kotlin.String
|
||||
// test.kt:8 compute: result="":kotlin.String
|
||||
// test.kt:10 compute: result="":kotlin.String, x="A":kotlin.String
|
||||
// test.kt:11 compute: result="":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:12 compute: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:15 compute: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
|
||||
// test.kt:16 compute: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
|
||||
|
||||
+18
-1
@@ -29,7 +29,7 @@ fun box() {
|
||||
compute()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:29 box:
|
||||
// test.kt:7 compute:
|
||||
// test.kt:8 compute: result:java.lang.String="":java.lang.String
|
||||
@@ -47,3 +47,20 @@ fun box() {
|
||||
// test.kt:15 compute: result:java.lang.String="bcd":java.lang.String, a:java.lang.String="a":java.lang.String, b:java.lang.String="b":java.lang.String, i:int=0:int, e:java.lang.String="e":java.lang.String
|
||||
// test.kt:29 box:
|
||||
// test.kt:30 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:29 box:
|
||||
// test.kt:7 compute:
|
||||
// test.kt:9 compute: result="":kotlin.String
|
||||
// test.kt:11 compute: result="":kotlin.String, a="a":kotlin.String
|
||||
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String
|
||||
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String
|
||||
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String
|
||||
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number
|
||||
// test.kt:13 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number
|
||||
// test.kt:14 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String
|
||||
// test.kt:15 compute: result="b":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String
|
||||
// test.kt:18 compute: result="b":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String
|
||||
// test.kt:19 compute: result="b":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String, c="c":kotlin.String
|
||||
// test.kt:22 compute: result="bc":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String, c="c":kotlin.String
|
||||
// test.kt:23 compute: result="bc":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String, c="c":kotlin.String, d="d":kotlin.String
|
||||
|
||||
+14
-1
@@ -29,7 +29,7 @@ fun box() {
|
||||
val localX = x
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:28 box:
|
||||
// test.kt:13 compute:
|
||||
// test.kt:14 compute:
|
||||
@@ -41,3 +41,16 @@ fun box() {
|
||||
// test.kt:28 box:
|
||||
// test.kt:29 box: result:java.lang.String="b":java.lang.String
|
||||
// test.kt:30 box: result:java.lang.String="b":java.lang.String, localX:java.lang.String="OK":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:28 box:
|
||||
// test.kt:14 compute:
|
||||
// test.kt:14 compute:
|
||||
// test.kt:14 compute:
|
||||
// test.kt:14 compute:
|
||||
// test.kt:16 compute: a="a":kotlin.String
|
||||
// test.kt:16 compute: a="a":kotlin.String
|
||||
// test.kt:16 compute: a="a":kotlin.String
|
||||
// test.kt:16 compute: a="a":kotlin.String
|
||||
// test.kt:17 compute: a="a":kotlin.String, b="b":kotlin.String
|
||||
// test.kt:22 compute: a="a":kotlin.String, b="b":kotlin.String
|
||||
|
||||
+18
-1
@@ -43,7 +43,7 @@ fun box() {
|
||||
val localX = x
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:42 box:
|
||||
// test.kt:27 compute:
|
||||
// test.kt:28 compute:
|
||||
@@ -62,3 +62,20 @@ fun box() {
|
||||
// test.kt:42 box:
|
||||
// test.kt:43 box: result:java.lang.String="b":java.lang.String
|
||||
// test.kt:44 box: result:java.lang.String="b":java.lang.String, localX:java.lang.String="OK":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:42 box:
|
||||
// test.kt:28 compute:
|
||||
// test.kt:28 compute:
|
||||
// test.kt:28 compute:
|
||||
// test.kt:28 compute:
|
||||
// test.kt:17 compute: a="a":kotlin.String
|
||||
// test.kt:8 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String
|
||||
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
|
||||
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
|
||||
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
|
||||
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
|
||||
// test.kt:31 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String
|
||||
// test.kt:11 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String
|
||||
// test.kt:20 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String, h="h":kotlin.String
|
||||
// test.kt:36 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String, h="h":kotlin.String, g="g":kotlin.String
|
||||
|
||||
+19
-1
@@ -33,7 +33,7 @@ fun box() {
|
||||
val localX = x
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:32 box:
|
||||
// test.kt:13 compute:
|
||||
// test.kt:14 compute:
|
||||
@@ -49,3 +49,21 @@ fun box() {
|
||||
// test.kt:32 box:
|
||||
// test.kt:33 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
|
||||
// test.kt:34 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:32 box:
|
||||
// test.kt:14 compute:
|
||||
// test.kt:15 compute: y=42:number
|
||||
// test.kt:15 compute: y=42:number
|
||||
// test.kt:15 compute: y=42:number
|
||||
// test.kt:15 compute: y=42:number, i=0:number
|
||||
// test.kt:16 compute: y=42:number, i=0:number
|
||||
// test.kt:18 compute: y=42:number, i=0:number
|
||||
// test.kt:18 compute: y=42:number, i=0:number
|
||||
// test.kt:19 compute: y=42:number, i=0:number, e=kotlin.RuntimeException
|
||||
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
|
||||
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
|
||||
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
|
||||
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
|
||||
// test.kt:22 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
|
||||
// test.kt:26 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
|
||||
|
||||
+19
-1
@@ -35,7 +35,7 @@ fun box() {
|
||||
val localX = x
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:34 box:
|
||||
// test.kt:20 compute:
|
||||
// test.kt:21 compute:
|
||||
@@ -52,3 +52,21 @@ fun box() {
|
||||
// test.kt:34 box:
|
||||
// test.kt:35 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
|
||||
// test.kt:36 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:34 box:
|
||||
// test.kt:21 compute:
|
||||
// test.kt:22 compute: y=42:number
|
||||
// test.kt:22 compute: y=42:number
|
||||
// test.kt:22 compute: y=42:number
|
||||
// test.kt:22 compute: y=42:number, i=0:number
|
||||
// test.kt:8 compute: y=42:number, i=0:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
|
||||
// test.kt:9 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:10 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:12 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:12 compute: y=42:number, i=0:number, z=32:number, j=0:number
|
||||
// test.kt:24 compute: y=42:number, i=0:number, z=32:number, j=0:number, e=kotlin.RuntimeException
|
||||
// test.kt:28 compute: y=42:number, i=0:number, z=32:number, j=0:number, e=kotlin.RuntimeException
|
||||
|
||||
+21
-1
@@ -38,7 +38,7 @@ fun box() {
|
||||
val localX = x
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:37 box:
|
||||
// test.kt:13 compute:
|
||||
// test.kt:14 compute:
|
||||
@@ -58,3 +58,23 @@ fun box() {
|
||||
// test.kt:37 box:
|
||||
// test.kt:38 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
|
||||
// test.kt:39 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:37 box:
|
||||
// test.kt:15 compute:
|
||||
// test.kt:16 compute: y=42:number
|
||||
// test.kt:16 compute: y=42:number
|
||||
// test.kt:16 compute: y=42:number
|
||||
// test.kt:16 compute: y=42:number, i=0:number
|
||||
// test.kt:17 compute: y=42:number, i=0:number
|
||||
// test.kt:20 compute: y=42:number, i=0:number
|
||||
// test.kt:21 compute: y=42:number, i=0:number, s="NOPE":kotlin.String
|
||||
// test.kt:23 compute: y=42:number, i=0:number, s="NOPE":kotlin.String
|
||||
// test.kt:27 compute: y=42:number, i=0:number, s="NOPE":kotlin.String
|
||||
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String
|
||||
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String
|
||||
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String
|
||||
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String, j=0:number
|
||||
// test.kt:29 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String, j=0:number
|
||||
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="OK":kotlin.String, j=0:number
|
||||
// test.kt:31 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="OK":kotlin.String, j=0:number
|
||||
|
||||
+70
-13
@@ -23,49 +23,106 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:12 box:
|
||||
// test.kt:4 <init>: x:double=1.0:double, y:java.lang.String="":java.lang.String, z:char=0:char
|
||||
// test.kt:12 box:
|
||||
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function3=TestKt$box$1
|
||||
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:13 invoke: w:int=1:int
|
||||
// test.kt:15 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:15 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:4 <init>: x:double=1.0:double, y:java.lang.String="":java.lang.String, z:char=0:char
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:15 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char
|
||||
// test.kt:16 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:15 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char
|
||||
// test.kt:16 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:4 <init>: x:double=1.0:double, y:java.lang.String="":java.lang.String, z:char=0:char
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:16 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
|
||||
// test.kt:18 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:16 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
|
||||
// test.kt:18 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:8 getArrayOfA:
|
||||
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:18 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
|
||||
// test.kt:22 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
|
||||
// EXPECTATIONS JVM_IR
|
||||
// test.kt:18 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
|
||||
// test.kt:22 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
|
||||
|
||||
// EXPECTATIONS
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function3=TestKt$box$1
|
||||
// test.kt:12 box:
|
||||
// test.kt:24 box:
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:4 <init>: x=1:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:8 <init properties test.kt>:
|
||||
// test.kt:12 box:
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:4 <init>: x=1:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:12 box:
|
||||
// test.kt:6 foo: a=A, block=Function3
|
||||
// test.kt:13 box$lambda: w=1:number
|
||||
// test.kt:1 component1:
|
||||
// test.kt:13 box$lambda: w=1:number, x=1:number
|
||||
// test.kt:1 component3:
|
||||
// test.kt:15 box$lambda: w=1:number, x=1:number, y=48:number
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:4 <init>: x=1:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:15 box$lambda: w=1:number, x=1:number, y=48:number
|
||||
// test.kt:1 component1:
|
||||
// test.kt:15 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number
|
||||
// test.kt:1 component3:
|
||||
// test.kt:16 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:4 <init>: x=1:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
|
||||
// test.kt:16 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number
|
||||
// test.kt:1 component2:
|
||||
// test.kt:16 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String
|
||||
// test.kt:1 component3:
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:8 <get-arrayOfA>:
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
|
||||
// test.kt:1 component2:
|
||||
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number, q="":kotlin.String
|
||||
// test.kt:22 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number, q="":kotlin.String
|
||||
// test.kt:24 box:
|
||||
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
|
||||
// FILE: a.kt
|
||||
@JsExport
|
||||
fun exclamate(a: String) =
|
||||
"$a!"
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@JsFun("""
|
||||
function (a, b) {
|
||||
return _.exclamate(a) +
|
||||
_.exclamate(b);
|
||||
}
|
||||
""")
|
||||
external fun exclamateAndConcat(a: String, b: String): String
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@JsPolyfill("""
|
||||
if (typeof String.prototype.myAwesomePolyfill === "undefined") {
|
||||
Object.defineProperty(String.prototype, "myAwesomePolyfill", {
|
||||
value: function () {
|
||||
return this + "!";
|
||||
}
|
||||
});
|
||||
}
|
||||
""")
|
||||
internal inline fun String.myAwesomePolyfill(): Boolean =
|
||||
asDynamic()
|
||||
.myAwesomePolyfill()
|
||||
|
||||
val walter1VarDecl = "var walter1 = _.exclamate('Walter');"
|
||||
val jesse1VarDecl = "var jesse1 = _.exclamate(jesse);"
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
|
||||
|
||||
fun box() {
|
||||
|
||||
exclamateAndConcat(
|
||||
"hello",
|
||||
"world")
|
||||
val jesse = "Jesse"
|
||||
js(
|
||||
"_.exclamate(jesse);") // Local variable is captured
|
||||
js(
|
||||
"_.exclamate('Walter');") // No local variables captured
|
||||
js(
|
||||
walter1VarDecl +
|
||||
"_.exclamate(walter1);")
|
||||
js(
|
||||
jesse1VarDecl +
|
||||
"_.exclamate(jesse1);")
|
||||
|
||||
"foo".myAwesomePolyfill()
|
||||
}
|
||||
|
||||
// EXPECTATIONS
|
||||
// test.kt:41 box
|
||||
// test.kt:42 box
|
||||
// a.kt:11 box
|
||||
// a.kt:6 exclamate
|
||||
// a.kt:12 box
|
||||
// a.kt:6 exclamate
|
||||
// test.kt:43 box
|
||||
// test.kt:45 box
|
||||
// a.kt:6 exclamate
|
||||
// test.kt:47 box
|
||||
// a.kt:6 exclamate
|
||||
// test.kt:49 box
|
||||
// a.kt:6 exclamate
|
||||
// test.kt:49 box
|
||||
// a.kt:6 exclamate
|
||||
// test.kt:52 box
|
||||
// a.kt:6 exclamate
|
||||
// test.kt:52 box
|
||||
// a.kt:6 exclamate
|
||||
// a.kt:29 box
|
||||
// a.kt:22 value
|
||||
// test.kt:56 box
|
||||
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.js.resolve.diagnostics
|
||||
import com.google.gwt.dev.js.parserExceptions.AbortParsingException
|
||||
import com.google.gwt.dev.js.rhino.CodePosition
|
||||
import com.google.gwt.dev.js.rhino.ErrorReporter
|
||||
import com.google.gwt.dev.js.rhino.Utils.isEndOfLine
|
||||
import com.google.gwt.dev.js.rhino.offsetOf
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
@@ -148,35 +148,6 @@ class JsCodeErrorReporter(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates an offset from the start of a text for a position,
|
||||
* defined by line and offset in that line.
|
||||
*/
|
||||
private fun String.offsetOf(position: CodePosition): Int {
|
||||
var i = 0
|
||||
var lineCount = 0
|
||||
var offsetInLine = 0
|
||||
|
||||
while (i < length) {
|
||||
val c = this[i]
|
||||
|
||||
if (lineCount == position.line && offsetInLine == position.offset) {
|
||||
return i
|
||||
}
|
||||
|
||||
i++
|
||||
offsetInLine++
|
||||
|
||||
if (isEndOfLine(c.code)) {
|
||||
offsetInLine = 0
|
||||
lineCount++
|
||||
assert(lineCount <= position.line)
|
||||
}
|
||||
}
|
||||
|
||||
return length
|
||||
}
|
||||
|
||||
private val KtExpression.isConstantStringLiteral: Boolean
|
||||
get() = this is KtStringTemplateExpression && entries.all { it is KtLiteralStringTemplateEntry }
|
||||
|
||||
|
||||
@@ -26,3 +26,32 @@ class CodePosition(val line: Int, val offset: Int) : Comparable<CodePosition> {
|
||||
|
||||
override fun toString(): String = "($line, $offset)"
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates an offset from the start of a text for a position,
|
||||
* defined by line and offset in that line.
|
||||
*/
|
||||
fun String.offsetOf(position: CodePosition): Int {
|
||||
var i = 0
|
||||
var lineCount = 0
|
||||
var offsetInLine = 0
|
||||
|
||||
while (i < length) {
|
||||
val c = this[i]
|
||||
|
||||
if (lineCount == position.line && offsetInLine == position.offset) {
|
||||
return i
|
||||
}
|
||||
|
||||
i++
|
||||
offsetInLine++
|
||||
|
||||
if (Utils.isEndOfLine(c.code)) {
|
||||
offsetInLine = 0
|
||||
lineCount++
|
||||
assert(lineCount <= position.line)
|
||||
}
|
||||
}
|
||||
|
||||
return length
|
||||
}
|
||||
|
||||
@@ -158,6 +158,10 @@ fun main(args: Array<String>) {
|
||||
model("debug/stepping")
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsLocalVariableTest> {
|
||||
model("debug/localVariables")
|
||||
}
|
||||
|
||||
testClass<AbstractFir2IrJsTextTest>(
|
||||
suiteTestClassName = "Fir2IrJsTextTestGenerated"
|
||||
) {
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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.js.test
|
||||
|
||||
import org.jetbrains.kotlin.test.directives.ConfigurationDirectives
|
||||
import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives
|
||||
import org.jetbrains.kotlin.test.model.TestFile
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.AdditionalSourceProvider
|
||||
import org.jetbrains.kotlin.test.services.ModuleStructureExtractor
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
import java.io.File
|
||||
|
||||
class JsSteppingTestAdditionalSourceProvider(testServices: TestServices) : AdditionalSourceProvider(testServices) {
|
||||
|
||||
override fun produceAdditionalFiles(globalDirectives: RegisteredDirectives, module: TestModule): List<TestFile> {
|
||||
// HACK: For some reason if we add the same additional files to each module (not only the main one),
|
||||
// we get the 'Symbol already bound' exception during linking.
|
||||
// The craziest part is that we run most of the box tests with additional files, where we _do_ add the same additional files
|
||||
// to each module (using JsAdditionalSourceProvider), but the linker doesn't complain.
|
||||
// For some reason, it doesn't like _specifically_ the symbols defined in compiler/testData/debug/jsTestHelpers.
|
||||
return if (module.name == ModuleStructureExtractor.DEFAULT_MODULE_NAME) {
|
||||
buildList {
|
||||
if (containsDirective(globalDirectives, module, ConfigurationDirectives.WITH_STDLIB))
|
||||
add(File(WITH_STDLIB_HELPER_PATH).toTestFile())
|
||||
else
|
||||
add(File(MINIMAL_HELPER_PATH).toTestFile())
|
||||
add(File(COMMON_HELPER_PATH).toTestFile())
|
||||
}
|
||||
} else
|
||||
emptyList()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val HELPERS_DIR = "compiler/testData/debug/jsTestHelpers"
|
||||
private const val COMMON_HELPER_PATH = "$HELPERS_DIR/jsCommonTestHelpers.kt"
|
||||
private const val MINIMAL_HELPER_PATH = "$HELPERS_DIR/jsMinimalTestHelpers.kt"
|
||||
private const val WITH_STDLIB_HELPER_PATH = "$HELPERS_DIR/jsWithStdlibTestHelpers.kt"
|
||||
}
|
||||
}
|
||||
@@ -310,6 +310,9 @@ class Runtime(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
@SerialName("symbol")
|
||||
SYMBOL,
|
||||
|
||||
@SerialName("accessor")
|
||||
ACCESSOR,
|
||||
|
||||
@SerialName("bigint")
|
||||
BIGINT,
|
||||
}
|
||||
@@ -396,6 +399,10 @@ class Runtime(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
* Object class (constructor) name. Specified for [ValueType.OBJECT] type values only.
|
||||
*/
|
||||
val className: String? = null,
|
||||
/**
|
||||
* Remote object value in case of primitive values or JSON values (if it was requested).
|
||||
*/
|
||||
val value: JsonElement? = null,
|
||||
/**
|
||||
* String representation of the object.
|
||||
*/
|
||||
@@ -403,7 +410,7 @@ class Runtime(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
/**
|
||||
* Unique object identifier (for non-primitive values).
|
||||
*/
|
||||
val objectId: RemoteObjectId? = null
|
||||
val objectId: RemoteObjectId? = null,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -718,7 +725,11 @@ class Debugger(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
}
|
||||
|
||||
@Serializable
|
||||
private class EvaluateOnCallFrameRequestParams(val callFrameId: CallFrameId, val expression: String) : CDPRequestParams()
|
||||
private class EvaluateOnCallFrameRequestParams(
|
||||
val callFrameId: CallFrameId,
|
||||
val expression: String,
|
||||
val returnByValue: Boolean? = null,
|
||||
) : CDPRequestParams()
|
||||
|
||||
/**
|
||||
* Evaluates expression on a given call frame.
|
||||
@@ -727,15 +738,19 @@ class Debugger(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
*
|
||||
* @param callFrameId Call frame identifier to evaluate on.
|
||||
* @param expression Expression to evaluate.
|
||||
* @param returnByValue Whether the result is expected to be a JSON object that should be sent by value.
|
||||
*/
|
||||
suspend fun evaluateOnCallFrame(callFrameId: CallFrameId, expression: String) =
|
||||
requestEvaluator.evaluateRequest<Runtime.EvaluationResult> { messageId ->
|
||||
encodeCDPMethodCall<Runtime.EvaluationResult, EvaluateOnCallFrameRequestParams>(
|
||||
messageId,
|
||||
"Debugger.evaluateOnCallFrame",
|
||||
EvaluateOnCallFrameRequestParams(callFrameId, expression)
|
||||
)
|
||||
}
|
||||
suspend fun evaluateOnCallFrame(
|
||||
callFrameId: CallFrameId,
|
||||
expression: String,
|
||||
returnByValue: Boolean? = null,
|
||||
) = requestEvaluator.evaluateRequest<Runtime.EvaluationResult> { messageId ->
|
||||
encodeCDPMethodCall<Runtime.EvaluationResult, EvaluateOnCallFrameRequestParams>(
|
||||
messageId,
|
||||
"Debugger.evaluateOnCallFrame",
|
||||
EvaluateOnCallFrameRequestParams(callFrameId, expression, returnByValue)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Breakpoint identifier.
|
||||
@@ -803,6 +818,11 @@ class Debugger(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
*/
|
||||
val location: Location,
|
||||
|
||||
/**
|
||||
* Scope chain for this call frame.
|
||||
*/
|
||||
val scopeChain: List<Scope>,
|
||||
|
||||
/**
|
||||
* `this` object for this call frame.
|
||||
*/
|
||||
@@ -814,6 +834,66 @@ class Debugger(private val requestEvaluator: CDPRequestEvaluator) {
|
||||
val returnValue: Runtime.RemoteObject? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
class Scope private constructor(
|
||||
|
||||
/**
|
||||
* Scope type.
|
||||
*/
|
||||
val type: ScopeType,
|
||||
|
||||
/**
|
||||
* Object representing the scope. For [ScopeType.GLOBAL] and [Scopetype.WITH] scopes it represents the actual object;
|
||||
* for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
|
||||
*/
|
||||
val `object`: Runtime.RemoteObject,
|
||||
|
||||
val name: String? = null,
|
||||
|
||||
/**
|
||||
* Location in the source code where scope starts
|
||||
*/
|
||||
val startLocation: Location? = null,
|
||||
|
||||
/**
|
||||
* Location in the source code where scope ends
|
||||
*/
|
||||
val endLocation: Location? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
enum class ScopeType {
|
||||
@SerialName("global")
|
||||
GLOBAL,
|
||||
|
||||
@SerialName("local")
|
||||
LOCAL,
|
||||
|
||||
@SerialName("with")
|
||||
WITH,
|
||||
|
||||
@SerialName("closure")
|
||||
CLOSURE,
|
||||
|
||||
@SerialName("catch")
|
||||
CATCH,
|
||||
|
||||
@SerialName("block")
|
||||
BLOCK,
|
||||
|
||||
@SerialName("script")
|
||||
SCRIPT,
|
||||
|
||||
@SerialName("eval")
|
||||
EVAL,
|
||||
|
||||
@SerialName("module")
|
||||
MODULE,
|
||||
|
||||
@SerialName("wasm-expression-stack")
|
||||
WASM_EXPRESSION_STACK,
|
||||
}
|
||||
|
||||
@Serializable
|
||||
enum class PauseReason {
|
||||
|
||||
|
||||
@@ -16,8 +16,11 @@ try {
|
||||
vm.runInContext(code, sandbox, testFilePath);
|
||||
// language=JavaScript
|
||||
vm.runInContext(`
|
||||
const __continuation = main.testUtils.makeEmptyContinuation();
|
||||
// noinspection JSUnusedLocalSymbols (called in debugger, see JsDebugRunner)
|
||||
const __makeValueDescriptionForSteppingTests = main.testUtils.makeValueDescriptionForSteppingTests;
|
||||
debugger;
|
||||
main.box();
|
||||
main.box(__continuation);
|
||||
`,
|
||||
sandbox
|
||||
);
|
||||
|
||||
@@ -4,8 +4,16 @@
|
||||
*/
|
||||
package org.jetbrains.kotlin.js.test.handlers
|
||||
|
||||
import com.google.gwt.dev.js.ThrowExceptionOnErrorReporter
|
||||
import com.google.gwt.dev.js.rhino.CodePosition
|
||||
import com.google.gwt.dev.js.rhino.offsetOf
|
||||
import kotlinx.coroutines.withTimeout
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.decodeFromJsonElement
|
||||
import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.TranslationMode
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.parser.parseFunction
|
||||
import org.jetbrains.kotlin.js.parser.sourcemaps.*
|
||||
import org.jetbrains.kotlin.js.test.debugger.*
|
||||
import org.jetbrains.kotlin.js.test.utils.getAllFilesForRunner
|
||||
@@ -15,9 +23,7 @@ import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
import org.jetbrains.kotlin.test.services.configuration.JsEnvironmentConfigurator
|
||||
import org.jetbrains.kotlin.test.services.moduleStructure
|
||||
import org.jetbrains.kotlin.test.utils.SteppingTestLoggedData
|
||||
import org.jetbrains.kotlin.test.utils.checkSteppingTestResult
|
||||
import org.jetbrains.kotlin.test.utils.formatAsSteppingTestExpectation
|
||||
import org.jetbrains.kotlin.test.utils.*
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
import java.net.URISyntaxException
|
||||
@@ -39,7 +45,7 @@ import java.net.URISyntaxException
|
||||
* supported.
|
||||
*
|
||||
*/
|
||||
class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(testServices) {
|
||||
class JsDebugRunner(testServices: TestServices, private val localVariables: Boolean) : AbstractJsArtifactsCollector(testServices) {
|
||||
override fun processAfterAllModules(someAssertionWasFailed: Boolean) {
|
||||
if (someAssertionWasFailed) return
|
||||
|
||||
@@ -69,7 +75,7 @@ class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(t
|
||||
mainModule: TestModule,
|
||||
) {
|
||||
val originalFile = mainModule.files.first { !it.isAdditional }.originalFile
|
||||
val debuggerFacade = NodeJsDebuggerFacade(jsFilePath)
|
||||
val debuggerFacade = NodeJsDebuggerFacade(jsFilePath, localVariables)
|
||||
|
||||
val jsFile = File(jsFilePath)
|
||||
|
||||
@@ -105,7 +111,7 @@ class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(t
|
||||
repeatedlyStepInto { callFrame ->
|
||||
callFrame.isInFileUnderTest().also {
|
||||
if (it)
|
||||
addCallFrameInfoToLoggedItems(sourceMap, callFrame, loggedItems)
|
||||
addCallFrameInfoToLoggedItems(jsFile, sourceMap, callFrame, loggedItems)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +126,8 @@ class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(t
|
||||
)
|
||||
}
|
||||
|
||||
private fun addCallFrameInfoToLoggedItems(
|
||||
private suspend fun NodeJsDebuggerFacade.Context.addCallFrameInfoToLoggedItems(
|
||||
jsFile: File,
|
||||
sourceMap: SourceMap,
|
||||
topMostCallFrame: Debugger.CallFrame,
|
||||
loggedItems: MutableList<SteppingTestLoggedData>
|
||||
@@ -139,6 +146,7 @@ class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(t
|
||||
sourceLine + 1,
|
||||
originalFunctionName ?: topMostCallFrame.functionName,
|
||||
false,
|
||||
getLocalVariables(jsFile, sourceMap, topMostCallFrame),
|
||||
)
|
||||
loggedItems.add(SteppingTestLoggedData(sourceLine + 1, false, expectation))
|
||||
}
|
||||
@@ -164,7 +172,7 @@ class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(t
|
||||
*
|
||||
* @param jsFilePath the test file to execute and debug.
|
||||
*/
|
||||
private class NodeJsDebuggerFacade(jsFilePath: String) {
|
||||
private class NodeJsDebuggerFacade(jsFilePath: String, private val localVariables: Boolean) {
|
||||
|
||||
private val inspector =
|
||||
NodeJsInspectorClient("js/js.tests/test/org/jetbrains/kotlin/js/test/debugger/stepping_test_executor.js", listOf(jsFilePath))
|
||||
@@ -173,6 +181,8 @@ private class NodeJsDebuggerFacade(jsFilePath: String) {
|
||||
|
||||
private var pausedEvent: Debugger.Event.Paused? = null
|
||||
|
||||
private val sourceCache = mutableMapOf<URI, String>()
|
||||
|
||||
init {
|
||||
inspector.onEvent { event ->
|
||||
when (event) {
|
||||
@@ -220,6 +230,100 @@ private class NodeJsDebuggerFacade(jsFilePath: String) {
|
||||
}
|
||||
|
||||
suspend fun waitForResumeEvent() = waitForConditionToBecomeTrue { pausedEvent == null }
|
||||
|
||||
suspend fun getLocalVariables(
|
||||
jsFile: File,
|
||||
sourceMap: SourceMap,
|
||||
callFrame: Debugger.CallFrame
|
||||
): List<LocalVariableRecord>? {
|
||||
if (!localVariables) return null
|
||||
val functionScope = callFrame.scopeChain.find { it.type in setOf(Debugger.ScopeType.LOCAL, Debugger.ScopeType.CLOSURE) }
|
||||
?: return null
|
||||
val scopeStart = functionScope.startLocation?.toCodePosition() ?: error("Missing scope location")
|
||||
val scopeEnd = functionScope.endLocation?.toCodePosition() ?: error("Missing scope location")
|
||||
val jsFileURI = jsFile.makeURI()
|
||||
require(URI(scriptUrlByScriptId(functionScope.startLocation.scriptId)) == jsFileURI) {
|
||||
"Invalid scope location: $scopeStart. Expected scope location to be in $jsFile"
|
||||
}
|
||||
|
||||
val sourceText = sourceCache.getOrPut(jsFileURI, jsFile::readText)
|
||||
|
||||
val scopeText = sourceText.let {
|
||||
it.substring(it.offsetOf(scopeStart), it.offsetOf(scopeEnd))
|
||||
}
|
||||
|
||||
val prefix = "function"
|
||||
|
||||
// Function scope starts with an open paren, so we need to add the keyword to make it valid JavaScript.
|
||||
// TODO: This will not work with arrows. As of 2022 we don't generate them, but we might in the future.
|
||||
val parseableScopeText = prefix + scopeText
|
||||
val scope = JsProgram().scope
|
||||
val jsFunction = parseFunction(
|
||||
parseableScopeText,
|
||||
jsFile.name,
|
||||
CodePosition(scopeStart.line, scopeStart.offset - prefix.length),
|
||||
0,
|
||||
ThrowExceptionOnErrorReporter,
|
||||
scope
|
||||
) ?: error("Could not parse scope: \n$parseableScopeText")
|
||||
|
||||
val variables = mutableListOf<SourceInfoAwareJsNode /* JsVars.JsVar | JsParameter */>()
|
||||
|
||||
object : JsVisitor() {
|
||||
override fun visitElement(node: JsNode) {
|
||||
node.acceptChildren(this)
|
||||
}
|
||||
|
||||
override fun visit(x: JsVars.JsVar) {
|
||||
super.visit(x)
|
||||
variables.add(x)
|
||||
}
|
||||
|
||||
override fun visitParameter(x: JsParameter) {
|
||||
super.visitParameter(x)
|
||||
variables.add(x)
|
||||
}
|
||||
}.accept(jsFunction)
|
||||
|
||||
val nameMapping = variables.mapNotNull { variable ->
|
||||
if (variable !is HasName) error("Unexpected JsNode: $variable")
|
||||
|
||||
// Filter out variables declared in nested functions
|
||||
if (!jsFunction.scope.hasOwnName(variable.name.toString())) return@mapNotNull null
|
||||
|
||||
val location = variable.source
|
||||
if (location !is JsLocation?) error("JsLocation expected. Found instead: $location")
|
||||
if (location == null)
|
||||
null
|
||||
else sourceMap.segmentForGeneratedLocation(location.startLine, location.startChar)?.name?.let {
|
||||
it to variable.name.toString()
|
||||
}
|
||||
}
|
||||
|
||||
if (nameMapping.isEmpty()) return emptyList()
|
||||
|
||||
val expression = nameMapping.joinToString(separator = ",", prefix = "[", postfix = "]") { (_, generatedName) ->
|
||||
"__makeValueDescriptionForSteppingTests($generatedName)"
|
||||
}
|
||||
val evaluationResult = debugger.evaluateOnCallFrame(callFrame.callFrameId, expression, returnByValue = true)
|
||||
if (evaluationResult.exceptionDetails != null) {
|
||||
evaluationResult.exceptionDetails.rethrow()
|
||||
}
|
||||
|
||||
val valueDescriptions =
|
||||
Json.Default.decodeFromJsonElement<List<ValueDescription?>>(evaluationResult.result.value ?: error("missing value"))
|
||||
|
||||
return nameMapping.mapIndexedNotNull { i, (originalName, _) ->
|
||||
valueDescriptions[i]?.toLocalVariableRecord(originalName)
|
||||
}
|
||||
}
|
||||
|
||||
private fun Runtime.ExceptionDetails.rethrow(): Nothing {
|
||||
if (exception?.description != null) error(exception.description)
|
||||
if (scriptId == null) error(text)
|
||||
val scriptURL = scriptUrls[scriptId] ?: url ?: error(text)
|
||||
error("$text ($scriptURL:$lineNumber:$columnNumber)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,6 +332,8 @@ private fun File.makeURI(): URI = absoluteFile.toURI().withAuthority("")
|
||||
private fun URI.withAuthority(newAuthority: String?) =
|
||||
URI(scheme, newAuthority, path, query, fragment)
|
||||
|
||||
private fun Debugger.Location.toCodePosition() = CodePosition(lineNumber, columnNumber ?: -1)
|
||||
|
||||
private fun SourceMap.segmentForGeneratedLocation(lineNumber: Int, columnNumber: Int?): SourceMapSegment? {
|
||||
|
||||
val group = groups.getOrNull(lineNumber)?.takeIf { it.segments.isNotEmpty() } ?: return null
|
||||
@@ -245,3 +351,16 @@ private fun SourceMap.segmentForGeneratedLocation(lineNumber: Int, columnNumber:
|
||||
group.segments[candidateIndex - 1]
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable
|
||||
private class ValueDescription(val isNull: Boolean, val isReferenceType: Boolean, val valueDescription: String, val typeName: String) {
|
||||
fun toLocalVariableRecord(variableName: String) = LocalVariableRecord(
|
||||
variable = variableName,
|
||||
variableType = null, // In JavaScript variables are untyped
|
||||
value = when {
|
||||
isNull -> LocalNullValue
|
||||
isReferenceType -> LocalReference("", typeName)
|
||||
else -> LocalPrimitive(valueDescription, typeName)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.js.test.ir
|
||||
|
||||
import org.jetbrains.kotlin.js.test.AbstractJsBlackBoxCodegenTestBase
|
||||
import org.jetbrains.kotlin.js.test.JsAdditionalSourceProvider
|
||||
import org.jetbrains.kotlin.js.test.JsSteppingTestAdditionalSourceProvider
|
||||
import org.jetbrains.kotlin.js.test.converters.JsIrBackendFacade
|
||||
import org.jetbrains.kotlin.js.test.converters.JsKlibBackendFacade
|
||||
import org.jetbrains.kotlin.js.test.converters.incremental.RecompileModuleJsIrBackendFacade
|
||||
@@ -157,8 +158,25 @@ open class AbstractIrJsSteppingTest : AbstractJsIrTest(
|
||||
defaultDirectives {
|
||||
+JsEnvironmentConfigurationDirectives.NO_COMMON_FILES
|
||||
}
|
||||
useAdditionalSourceProviders(::JsSteppingTestAdditionalSourceProvider)
|
||||
jsArtifactsHandlersStep {
|
||||
useHandlers(::JsDebugRunner)
|
||||
useHandlers({ JsDebugRunner(it, localVariables = false) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open class AbstractIrJsLocalVariableTest : AbstractJsIrTest(
|
||||
pathToTestDir = "compiler/testData/debug/localVariables/",
|
||||
testGroupOutputDirPrefix = "debug/localVariables/"
|
||||
) {
|
||||
override fun TestConfigurationBuilder.configuration() {
|
||||
commonConfigurationForJsBlackBoxCodegenTest()
|
||||
defaultDirectives {
|
||||
+JsEnvironmentConfigurationDirectives.NO_COMMON_FILES
|
||||
}
|
||||
useAdditionalSourceProviders(::JsSteppingTestAdditionalSourceProvider)
|
||||
jsArtifactsHandlersStep {
|
||||
useHandlers({ JsDebugRunner(it, localVariables = true) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+455
@@ -0,0 +1,455 @@
|
||||
/*
|
||||
* 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.js.test.ir;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/debug/localVariables")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class IrJsLocalVariableTestGenerated extends AbstractIrJsLocalVariableTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInLocalVariables() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignment.kt")
|
||||
public void testAssignment() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/assignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("catchClause.kt")
|
||||
public void testCatchClause() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/catchClause.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("copyFunction.kt")
|
||||
public void testCopyFunction() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/copyFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("directInvoke.kt")
|
||||
public void testDirectInvoke() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/directInvoke.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("doWhile.kt")
|
||||
public void testDoWhile() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/doWhile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("emptyFun.kt")
|
||||
public void testEmptyFun() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/emptyFun.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("forLoopMultiline.kt")
|
||||
public void testForLoopMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/forLoopMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsCode.kt")
|
||||
public void testJsCode() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/jsCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFun.kt")
|
||||
public void testLocalFun() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/localFun.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFunUnused.kt")
|
||||
public void testLocalFunUnused() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/localFunUnused.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally.kt")
|
||||
public void testTryFinally() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally10.kt")
|
||||
public void testTryFinally10() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally11.kt")
|
||||
public void testTryFinally11() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally12.kt")
|
||||
public void testTryFinally12() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally13.kt")
|
||||
public void testTryFinally13() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally14.kt")
|
||||
public void testTryFinally14() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally15.kt")
|
||||
public void testTryFinally15() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally16.kt")
|
||||
public void testTryFinally16() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally17.kt")
|
||||
public void testTryFinally17() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally2.kt")
|
||||
public void testTryFinally2() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally3.kt")
|
||||
public void testTryFinally3() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally4.kt")
|
||||
public void testTryFinally4() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally4.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally5.kt")
|
||||
public void testTryFinally5() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally5.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally6.kt")
|
||||
public void testTryFinally6() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally7.kt")
|
||||
public void testTryFinally7() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally7.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally8.kt")
|
||||
public void testTryFinally8() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tryFinally9.kt")
|
||||
public void testTryFinally9() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/tryFinally9.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("underscoreNames.kt")
|
||||
public void testUnderscoreNames() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/underscoreNames.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/debug/localVariables/constructors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Constructors {
|
||||
@Test
|
||||
public void testAllFilesPresentInConstructors() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("multipleConstructors.kt")
|
||||
public void testMultipleConstructors() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/constructors/multipleConstructors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/constructors/property.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/debug/localVariables/destructuring")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Destructuring {
|
||||
@Test
|
||||
public void testAllFilesPresentInDestructuring() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/destructuring"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignment.kt")
|
||||
public void testAssignment() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/assignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignmentCustomComponentNs.kt")
|
||||
public void testAssignmentCustomComponentNs() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/assignmentCustomComponentNs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignmentCustomComponentNsMultiline.kt")
|
||||
public void testAssignmentCustomComponentNsMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/assignmentCustomComponentNsMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignmentMultiline.kt")
|
||||
public void testAssignmentMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/assignmentMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignmentUnderscoreNames.kt")
|
||||
public void testAssignmentUnderscoreNames() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/assignmentUnderscoreNames.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assignmentUnderscoreNamesMultiline.kt")
|
||||
public void testAssignmentUnderscoreNamesMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/assignmentUnderscoreNamesMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("forLoop.kt")
|
||||
public void testForLoop() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/forLoop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("forLoopMultiline.kt")
|
||||
public void testForLoopMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/forLoopMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambda.kt")
|
||||
public void testLambda() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/lambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaCustomComponentNs.kt")
|
||||
public void testLambdaCustomComponentNs() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/lambdaCustomComponentNs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaCustomComponentNsMultiline.kt")
|
||||
public void testLambdaCustomComponentNsMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/lambdaCustomComponentNsMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaMultiline.kt")
|
||||
public void testLambdaMultiline() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/lambdaMultiline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaMultipleDestructs.kt")
|
||||
public void testLambdaMultipleDestructs() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/destructuring/lambdaMultipleDestructs.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/debug/localVariables/receiverMangling")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReceiverMangling {
|
||||
@Test
|
||||
public void testAllFilesPresentInReceiverMangling() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/receiverMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedThisField.kt")
|
||||
public void testCapturedThisField() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/capturedThisField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labeledThisParameterLabel.kt")
|
||||
public void testLabeledThisParameterLabel() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/labeledThisParameterLabel.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaWithExtensionReceiver.kt")
|
||||
public void testLambdaWithExtensionReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/lambdaWithExtensionReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("receiverParameter.kt")
|
||||
public void testReceiverParameter() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/receiverParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCapturedReceiver.kt")
|
||||
public void testSimpleCapturedReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/simpleCapturedReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCapturedReceiverWithLabel.kt")
|
||||
public void testSimpleCapturedReceiverWithLabel() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/simpleCapturedReceiverWithLabel.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCapturedReceiverWithParenthesis.kt")
|
||||
public void testSimpleCapturedReceiverWithParenthesis() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/receiverMangling/simpleCapturedReceiverWithParenthesis.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/debug/localVariables/suspend")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Suspend {
|
||||
@Test
|
||||
public void testAllFilesPresentInSuspend() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineLocalsStateMachineTransform.kt")
|
||||
public void testInlineLocalsStateMachineTransform() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/inlineLocalsStateMachineTransform.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localsStateMachineTransform.kt")
|
||||
public void testLocalsStateMachineTransform() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/localsStateMachineTransform.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("mergeLvt.kt")
|
||||
public void testMergeLvt() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/mergeLvt.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("underscoreNames.kt")
|
||||
public void testUnderscoreNames() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/underscoreNames.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/debug/localVariables/suspend/completion")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Completion {
|
||||
@Test
|
||||
public void testAllFilesPresentInCompletion() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/suspend/completion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonStaticSimple.kt")
|
||||
public void testNonStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/nonStaticSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonStaticStateMachine.kt")
|
||||
public void testNonStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/nonStaticStateMachine.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticSimple.kt")
|
||||
public void testStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticSimpleReceiver.kt")
|
||||
public void testStaticSimpleReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticSimpleReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticStateMachine.kt")
|
||||
public void testStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticStateMachine.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticStateMachineReceiver.kt")
|
||||
public void testStaticStateMachineReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticStateMachineReceiver.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-6
@@ -247,12 +247,6 @@ public class IrJsSteppingTestGenerated extends AbstractIrJsSteppingTest {
|
||||
runTest("compiler/testData/debug/stepping/inlineSimpleCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsCode.kt")
|
||||
public void testJsCode() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/jsCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt15259.kt")
|
||||
public void testKt15259() throws Exception {
|
||||
|
||||
-6
@@ -205,12 +205,6 @@ public class JsIrLineNumberTestGenerated extends AbstractJsIrLineNumberTest {
|
||||
runTest("js/js.translator/testData/lineNumbers/isOperator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsCode.kt")
|
||||
public void testJsCode() throws Exception {
|
||||
runTest("js/js.translator/testData/lineNumbers/jsCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaWithClosure.kt")
|
||||
public void testLambdaWithClosure() throws Exception {
|
||||
|
||||
+2
-2
@@ -19,5 +19,5 @@ fun bar() {
|
||||
}
|
||||
}
|
||||
|
||||
// LINES(JS): 1 11 3 3 5 5 6 6 8 8 9 9 2 2 * 13 20 15 15 18 18
|
||||
// LINES(JS_IR): 1 1 3 3 * 5 5 5 6 6 * 8 8 8 9 9 * 13 13 15 15 17 17 17 18 18
|
||||
// LINES(JS): 1 11 3 3 5 5 6 6 8 8 9 9 2 2 * 13 20 15 15 18 18
|
||||
// LINES(JS_IR): 1 1 3 3 * 5 5 6 6 * 8 8 9 9 * 13 13 15 15 17 17 18 18
|
||||
|
||||
@@ -15,4 +15,4 @@ fun A.foo() {
|
||||
fun baz() = 23
|
||||
|
||||
// LINES(JS): 1 * 5 5 5 6 9 7 7 8 8 * 3 13 4 4 11 11 12 12 15 15 15
|
||||
// LINES(JS_IR): 1 1 3 3 4 4 11 11 12 12 15 15 15 15 5 5 * 6 7 7 8 8
|
||||
// LINES(JS_IR): 1 1 3 3 4 11 11 12 12 15 15 15 15 5 3 4 5 * 6 7 7 8 8
|
||||
|
||||
+2
-2
@@ -5,5 +5,5 @@ fun box(x: Int, y: Int): Int {
|
||||
return foo(y)
|
||||
}
|
||||
|
||||
// LINES(JS): 2 2 2 4 4 1 6 2 2 5 5
|
||||
// LINES(JS_IR): 1 1 5 5 2 4 4 4
|
||||
// LINES(JS): 2 2 2 4 4 1 6 2 2 5 5
|
||||
// LINES(JS_IR): 1 1 5 5 2 1 3 4 4 4
|
||||
|
||||
+2
-2
@@ -11,5 +11,5 @@ fun baz() = 1
|
||||
|
||||
fun bar() = 2
|
||||
|
||||
// LINES(JS): 1 3 3 2 2 4 3 4 4 4 5 5 2 8 8 10 10 10 12 12 12
|
||||
// LINES(JS_IR): 1 * 3 3 4 5 * 8 8 10 10 10 10 12 12 12 12
|
||||
// LINES(JS): 1 3 3 2 2 4 3 4 4 4 5 5 2 8 8 10 10 10 12 12 12
|
||||
// LINES(JS_IR): 1 2 * 3 4 5 * 8 8 10 10 10 10 12 12 12 12
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ suspend fun bar(): Unit {
|
||||
}
|
||||
|
||||
// LINES(JS): 39 4 4 4 7 5 5 45 45 5 93 45 5 5 6 4 4 4 9 15 9 9 9 * 9 15 10 10 11 11 11 11 11 * 11 12 12 13 13 13 13 13 13 13 14 14 * 9 15 9 9 9 9
|
||||
// LINES(JS_IR): 4 4 * 19 * 19 19 * 5 * 45 * 50 50 93 93 3 45 3 45 45 6 6 19 19 7 7 9 9 * 9 * 10 10 * 11 * 11 12 12 * 13 * 13 13 14 14 15 15
|
||||
// LINES(JS_IR): 4 4 * 19 * 19 * 5 * 45 * 50 93 93 3 45 3 45 45 6 6 19 7 7 9 9 * 9 * 9 * 10 10 * 11 * 11 12 12 * 13 * 13 14 14 15 15
|
||||
|
||||
@@ -9,4 +9,4 @@ suspend fun delay() {
|
||||
}
|
||||
|
||||
// LINES(JS): 1 6 1 1 * 1 6 2 2 2 2 2 * 3 3 4 4 4 4 4 5 5 * 1 6 1 1 1 1 8 9
|
||||
// LINES(JS_IR): 1 1 * 8 8 9 9 * 1 * 2 * 3 3 3 * 5 5 6 6
|
||||
// LINES(JS_IR): 1 1 * 8 8 9 9 1 * 1 * 2 * 3 3 3 * 5 5 6 6
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ data class A(
|
||||
)
|
||||
|
||||
// LINES(JS): 1 2 3 * 1 2 2 1 3 3 1 1 1 2 3 1 1 1 2 3 1 1 1 2 3 1 1 1 1 1 2 3
|
||||
// LINES(JS_IR): 1 1 2 2 3 3 2 2 2 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 * 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
// LINES(JS_IR): 1 2 3 1 2 2 3 3 2 2 2 3 3 3 1 1 1 1 1 1 1 2 3 1 1 1 1 2 3 1 1 * 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
|
||||
@@ -14,4 +14,4 @@ class Delegate(val f: () -> Int) {
|
||||
}
|
||||
|
||||
// LINES(JS): 1 2 3 * 2 2 3 3 3 3 * 6 8 7 7 10 10 11 13 12 12
|
||||
// LINES(JS_IR): 3 3 3 3 1 1 3 3 3 2 3 3 3 2 1 2 6 6 7 7 10 10 10 10 10 10 10 11 12 12 2 2
|
||||
// LINES(JS_IR): 3 3 3 3 1 1 3 3 3 2 3 3 3 2 1 2 6 6 7 7 10 10 10 10 10 10 10 11 12 12 2 2 18 * 2
|
||||
|
||||
@@ -16,4 +16,4 @@ class B {
|
||||
}
|
||||
|
||||
// LINES(JS): 3 4 5 * 4 4 4 * 8 9 11 10 10 13 15 14 14
|
||||
// LINES(JS_IR): 3 3 5 5 4 5 5 5 4 1 4 5 4 5 5 5 4 1 4 8 8 9 10 10 13 14 14 4 4 * 4 4
|
||||
// LINES(JS_IR): 3 3 5 5 4 5 5 5 4 1 4 5 4 5 5 5 4 1 4 8 8 9 10 10 13 14 14 4 4 20 * 4 20 * 4 4 20 * 4 20
|
||||
|
||||
+1
-1
@@ -28,4 +28,4 @@ fun bar(f: (Pair<String, String>) -> Unit) {
|
||||
|
||||
|
||||
// LINES(JS): 15 22 16 16 17 18 20 20 21 21 22 22 3 23 9 9 9 9 4 9 9 9 5 5 6 7 11 11 12 12 15 15 25 27 26 26 * 1 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 9 9 9 4 9 9 6 6 9 7 7 9 11 11 12 12 15 15 25 25 26 26 15 15 17 17 16 18 18 16 20 20 21 21 22 22 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 9 9 4 9 6 9 7 9 11 11 12 12 15 15 25 25 26 26 15 16 15 17 16 18 16 20 20 21 21 22 22 * 1
|
||||
|
||||
@@ -33,4 +33,4 @@ inline operator fun P.component1() = a
|
||||
inline operator fun P.component2() = b
|
||||
|
||||
// LINES(JS): 15 22 17 17 31 18 18 33 20 20 21 21 22 22 3 23 9 9 9 9 4 9 9 9 6 6 31 7 7 33 11 11 12 12 15 15 25 27 26 26 29 29 29 * 31 31 31 33 33 33 * 1 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 9 9 9 4 9 9 * 6 * 31 31 9 6 6 * 7 * 33 33 9 7 7 11 11 12 12 15 15 25 25 26 26 29 29 29 29 29 29 29 29 29 29 29 29 31 31 31 31 33 33 33 33 15 15 * 17 * 31 31 16 17 17 * 18 * 33 33 16 18 18 20 20 21 21 22 22 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 9 9 4 9 * 6 * 31 31 9 6 * 7 * 33 33 9 7 11 11 12 12 15 15 25 25 26 26 29 29 29 29 29 29 29 29 29 29 29 29 31 31 31 31 33 33 33 33 15 16 15 * 17 * 31 31 16 17 * 18 * 33 33 16 18 20 20 21 21 22 22 * 1
|
||||
|
||||
@@ -13,5 +13,5 @@ fun box() {
|
||||
)
|
||||
}
|
||||
|
||||
// LINES(JS): 1 14 8 8 7 3 2 2 3 3 3 8 8 11 11 * 3 7 12 3 3 4 4
|
||||
// LINES(JS_IR): 1 1 2 2 3 3 4 4 * 8 8 8 8 8 11 11 * 7 12
|
||||
// LINES(JS): 1 14 8 8 7 3 2 2 3 3 3 8 8 11 11 * 3 7 12 3 3 4 4
|
||||
// LINES(JS_IR): 1 1 2 3 3 4 4 * 8 8 8 8 11 11 * 7 12
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ fun box(x: String?) {
|
||||
fun foo() = "bar"
|
||||
|
||||
// LINES(JS): 3 8 7 7 4 4 4 5 5 7 7 7 7 * 5 4 5 10 10 10 * 1 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 4 5 5 * 5 5 * 7 7 7 * 5 4 4 10 10 10 10 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 4 5 * 5 5 * 7 7 7 * 5 4 4 10 10 10 10 * 1
|
||||
|
||||
@@ -7,4 +7,4 @@ enum class Foo {
|
||||
}
|
||||
|
||||
// LINES(JS): 1 1 1 1 1 1 1 1 1 2 2 4 * 2 2 2 2 4 4 5 5 * 4 4 4 4 4 4 4 * 1 1 1 * 1 1 1 1 1 1
|
||||
// LINES(JS_IR): 4 4 * 5 5 5 5 5 * 1 * 1 * 1 1
|
||||
// LINES(JS_IR): 4 4 * 5 5 5 5 5 * 1 * 1 1 * 1 1
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ enum class E {
|
||||
}
|
||||
|
||||
// LINES(JS): 1 1 1 1 1 1 1 1 1 2 2 4 8 * 2 2 2 2 4 4 4 5 5 5 * 4 4 4 4 8 8 8 9 9 9 * 8 8 8 8 * 1 1 1 * 1 1 1 1 1 1 1 1 1 1
|
||||
// LINES(JS_IR): 4 4 * 5 5 5 * 8 8 * 9 9 9 * 1 * 1 * 1 1
|
||||
// LINES(JS_IR): 4 4 * 5 5 5 * 8 8 * 9 9 9 * 1 * 1 1 * 1 1
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ fun box() {
|
||||
}
|
||||
|
||||
// LINES(JS): 1 18 2 2 10 2 2 2 2 2 2 3 3 6 6 6 6 7 7 10 10 10 10 10 10 11 11 14 14 15 15 15 15 16 16
|
||||
// LINES(JS_IR): 1 1 * 2 * 35 * 18 * 12 2 18 18 35 35 2 2 2 2 2 2 2 2 2 2 2 2 3 3 6 6 6 6 6 6 6 6 6 7 7 10 10 10 10 10 10 11 11 14 14 15 15 15 15 15 15 15 15 15 15 15 16 16
|
||||
// LINES(JS_IR): 1 1 * 2 * 35 * 18 * 12 2 18 18 35 35 2 2 2 2 2 2 2 2 3 3 6 6 6 6 6 6 6 7 7 10 10 10 10 11 11 14 15 15 15 15 15 15 15 15 16 16
|
||||
|
||||
+2
-2
@@ -8,5 +8,5 @@ fun foo(x: Int) {
|
||||
println(y)
|
||||
}
|
||||
|
||||
// LINES(JS): 1 9 2 2 3 3 4 4 5 5 6 6 7 7 8 8
|
||||
// LINES(JS_IR): 1 1 2 2 3 3 3 3 4 4 5 5 6 6 7 7 8 8
|
||||
// LINES(JS): 1 9 2 2 3 3 4 4 5 5 6 6 7 7 8 8
|
||||
// LINES(JS_IR): 1 1 2 3 3 3 4 4 5 5 6 6 7 7 8 8
|
||||
|
||||
@@ -12,4 +12,4 @@ inline fun foo(x: Int) {
|
||||
fun bar() = 23
|
||||
|
||||
// LINES(JS): 3 5 4 4 8 8 9 9 7 10 8 8 9 9 12 12 12 * 1 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 4 * 4 4 8 8 9 9 7 7 8 8 9 9 12 12 12 12 * 1
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 * 3 3 4 * 4 8 8 9 9 7 7 8 8 9 9 12 12 12 12 * 1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user