[WASM] When expressions optimisations for String and Int constant cases

This commit is contained in:
Igor Yakovlev
2022-07-14 13:04:45 +02:00
committed by teamcity
parent fff6b16483
commit 95396eb61a
11 changed files with 742 additions and 76 deletions
@@ -59,6 +59,12 @@ abstract class WasmExpressionBuilder {
buildInstr(WasmOp.ELSE)
}
fun buildBlock(resultType: WasmType? = null): Int {
buildInstr(WasmOp.BLOCK, WasmImmediate.BlockType.Value(resultType))
numberOfNestedBlocks++
return numberOfNestedBlocks
}
fun buildEnd() {
numberOfNestedBlocks--
buildInstr(WasmOp.END)