[Wasm] Wrap a recursion group by a "rec" block in wat
This commit is contained in:
committed by
Space Team
parent
8a9531ce3c
commit
151f5b90c7
@@ -228,14 +228,16 @@ class WasmIrToText : SExpressionBuilder() {
|
||||
with(module) {
|
||||
newLineList("module") {
|
||||
functionTypes.forEach { appendFunctionTypeDeclaration(it) }
|
||||
recGroupTypes.forEach {
|
||||
when (it) {
|
||||
is WasmStructDeclaration ->
|
||||
appendStructTypeDeclaration(it)
|
||||
is WasmArrayDeclaration ->
|
||||
appendArrayTypeDeclaration(it)
|
||||
is WasmFunctionType ->
|
||||
appendFunctionTypeDeclaration(it)
|
||||
newLineList("rec") {
|
||||
recGroupTypes.forEach {
|
||||
when (it) {
|
||||
is WasmStructDeclaration ->
|
||||
appendStructTypeDeclaration(it)
|
||||
is WasmArrayDeclaration ->
|
||||
appendArrayTypeDeclaration(it)
|
||||
is WasmFunctionType ->
|
||||
appendFunctionTypeDeclaration(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
importsInOrder.forEach {
|
||||
|
||||
Reference in New Issue
Block a user