Fixed coroutines for wasm

Replaced llvm indirectBr instruction with switch instruction.
This commit is contained in:
Igor Chevdar
2017-10-04 17:14:33 +03:00
parent 8f58111159
commit fa21a260b1
4 changed files with 34 additions and 34 deletions
-26
View File
@@ -350,7 +350,6 @@ task codegen_controlflow_for_loops_nested(type: RunKonanTest) {
}
task codegen_controlflow_for_loops_coroutines(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
source = "codegen/controlflow/for_loops_coroutines.kt"
goldValue = "before: 0 after: 0\n" +
"before: 2 after: 2\n" +
@@ -938,151 +937,126 @@ task kclass1(type: RunKonanTest) {
}
task coroutines_simple(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "42\n"
source = "codegen/coroutines/simple.kt"
}
task coroutines_degenerate1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\n"
source = "codegen/coroutines/degenerate1.kt"
}
task coroutines_degenerate2(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s2\ns1\n"
source = "codegen/coroutines/degenerate2.kt"
}
task coroutines_withReceiver(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "42\n"
source = "codegen/coroutines/withReceiver.kt"
}
task coroutines_correctOrder1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\nf2\n160\n"
source = "codegen/coroutines/correctOrder1.kt"
}
task coroutines_controlFlow_if1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\nf3\n84\n"
source = "codegen/coroutines/controlFlow_if1.kt"
}
task coroutines_controlFlow_if2(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\nf2\n43\n"
source = "codegen/coroutines/controlFlow_if2.kt"
}
task coroutines_controlFlow_finally1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\n117\n"
source = "codegen/coroutines/controlFlow_finally1.kt"
}
task coroutines_controlFlow_finally2(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\n117\n"
source = "codegen/coroutines/controlFlow_finally2.kt"
}
task coroutines_controlFlow_finally3(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\n117\n"
source = "codegen/coroutines/controlFlow_finally3.kt"
}
task coroutines_controlFlow_finally4(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\nfinally\n42\n"
source = "codegen/coroutines/controlFlow_finally4.kt"
}
task coroutines_controlFlow_finally5(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\nf2\nfinally\n1\n"
source = "codegen/coroutines/controlFlow_finally5.kt"
}
task coroutines_controlFlow_finally6(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\nfinally\nerror\n0\n"
source = "codegen/coroutines/controlFlow_finally6.kt"
}
task coroutines_controlFlow_finally7(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\nf2\nfinally1\ns2\nfinally2\n42\n"
source = "codegen/coroutines/controlFlow_finally7.kt"
}
task coroutines_controlFlow_inline1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "42\n"
source = "codegen/coroutines/controlFlow_inline1.kt"
}
task coroutines_controlFlow_inline2(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\n42\n"
source = "codegen/coroutines/controlFlow_inline2.kt"
}
task coroutines_controlFlow_inline3(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "f1\ns1\n42\n"
source = "codegen/coroutines/controlFlow_inline3.kt"
}
task coroutines_controlFlow_tryCatch1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\n42\n"
source = "codegen/coroutines/controlFlow_tryCatch1.kt"
}
task coroutines_controlFlow_tryCatch2(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s1\n42\n"
source = "codegen/coroutines/controlFlow_tryCatch2.kt"
}
task coroutines_controlFlow_tryCatch3(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s2\nf2\n1\n"
source = "codegen/coroutines/controlFlow_tryCatch3.kt"
}
task coroutines_controlFlow_tryCatch4(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s2\nf2\n1\n"
source = "codegen/coroutines/controlFlow_tryCatch4.kt"
}
task coroutines_controlFlow_tryCatch5(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s2\ns1\nError\n42\n"
source = "codegen/coroutines/controlFlow_tryCatch5.kt"
}
task coroutines_controlFlow_while1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s3\ns3\ns3\ns3\n3\n"
source = "codegen/coroutines/controlFlow_while1.kt"
}
task coroutines_controlFlow_while2(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "s3\ns3\ns3\n3\n"
source = "codegen/coroutines/controlFlow_while2.kt"
}
task coroutines_returnsUnit1(type: RunKonanTest) {
disabled = (project.testTarget == 'wasm32') // llvm: 'WebAssembly hasn't implemented computed gotos'
goldValue = "117\ns1\n0\n"
source = "codegen/coroutines/returnsUnit1.kt"
}