"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/js.translator/src/org/jetbrains/kotlin/js/translate/declaration/inlineCoroutineUtil.kt" between
kotlin-1.3.20.tar.gz and kotlin-1.3.21.tar.gz

About: Kotlin is a Java like statically typed programming language for the JVM, Android and the browser. Source code.

inlineCoroutineUtil.kt  (kotlin-1.3.20):inlineCoroutineUtil.kt  (kotlin-1.3.21)
skipping to change at line 72 skipping to change at line 72
source = x.source source = x.source
}) })
return false return false
} }
return super.visit(x, ctx) return super.visit(x, ctx)
} }
} }
return visitor.accept(node) return visitor.accept(node)
} }
private fun SpecialFunction.ref() = pureFqn(suggestedName, Namer.kotlinObject()) private fun SpecialFunction.ref() = pureFqn(JsDynamicScope.declareName(suggested Name).also { it.specialFunction = this }, Namer.kotlinObject())
fun <T : JsNode> transformSpecialFunctionsToCoroutineMetadata(node: T): T { fun <T : JsNode> transformSpecialFunctionsToCoroutineMetadata(node: T): T {
val visitor = object : JsVisitorWithContextImpl() { val visitor = object : JsVisitorWithContextImpl() {
override fun endVisit(x: JsInvocation, ctx: JsContext<in JsExpression>) { override fun endVisit(x: JsInvocation, ctx: JsContext<in JsExpression>) {
x.qualifier.name?.specialFunction?.let { specialFunction -> x.qualifier.name?.specialFunction?.let { specialFunction ->
val replacement = when (specialFunction) { val replacement = when (specialFunction) {
SpecialFunction.COROUTINE_CONTROLLER -> { SpecialFunction.COROUTINE_CONTROLLER -> {
JsNameRef("\$\$controller\$\$", x.arguments.getOrNull(0) ).apply { JsNameRef("\$\$controller\$\$", x.arguments.getOrNull(0) ).apply {
coroutineController = true coroutineController = true
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)