Chris Miller
11/24/2016, 3:27 PMbashor
11/24/2016, 3:28 PMChris Miller
11/24/2016, 3:29 PMChris Miller
11/24/2016, 3:30 PMbashor
11/24/2016, 3:34 PMbashor
11/24/2016, 3:34 PMChris Miller
11/24/2016, 3:35 PMChris Miller
11/24/2016, 3:45 PMChris Miller
11/24/2016, 3:49 PMChris Miller
11/24/2016, 4:00 PMbashor
11/24/2016, 5:27 PMbuild/webapp
, You can change it to `build/webapp/js`if you want. What is problem? I think it’s good solutionChris Miller
11/24/2016, 5:45 PMChris Miller
11/24/2016, 5:49 PMChris Miller
11/24/2016, 5:52 PMnhaarman
11/25/2016, 12:19 AMvgrechka
11/25/2016, 1:40 PMzzz_caller$lambda
is never referenced, and its body duplicates what was inlined into zzz_caller
. So, is that as intended or a bug?
Source code:
fun zzz_caller() {
console.log("caller 1")
zzz_callee {
console.log("caller 2")
}
console.log("caller 3")
}
inline fun zzz_callee(block: () -> Unit) {
console.log("callee 1")
block()
console.log("callee 2")
}
Emitted code:
function zzz_caller$lambda() {
console.log('caller 2');
}
function zzz_caller() {
console.log('caller 1');
console.log('callee 1');
console.log('caller 2');
console.log('callee 2');
console.log('caller 3');
}
var zzz_callee = Kotlin.defineInlineFunction('front.aps.front.zzz_callee_qshda6$', function (block) {
console.log('callee 1');
block();
console.log('callee 2');
}
konsoletyper
11/25/2016, 1:42 PMkonsoletyper
11/25/2016, 1:42 PMvgrechka
11/25/2016, 1:42 PMkonsoletyper
11/25/2016, 1:42 PMkonsoletyper
11/25/2016, 1:43 PMvgrechka
11/25/2016, 1:46 PM"__async"
into generators. then i replace all calls to __await
function with yield
. this is my poor-man's async/await 🙂 the problem is that yield keyword is only allowed in generator functions, so now i have JS syntax errorskonsoletyper
11/25/2016, 1:47 PMvgrechka
11/25/2016, 1:47 PMkonsoletyper
11/25/2016, 1:47 PM$lambda
vgrechka
11/25/2016, 1:48 PMvgrechka
11/25/2016, 1:48 PMdanfma
11/25/2016, 3:46 PMdanfma
11/25/2016, 3:46 PMdanfma
11/25/2016, 3:47 PM