summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cfg/Relooper.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cfg/Relooper.cpp b/src/cfg/Relooper.cpp
index 06867c748..78b3f3e1c 100644
--- a/src/cfg/Relooper.cpp
+++ b/src/cfg/Relooper.cpp
@@ -55,6 +55,7 @@ wasm::Expression* Branch::Render(RelooperBuilder& Builder, Block *Target, bool S
Ret->list.push_back(Builder.makeContinue(Ancestor->Id));
}
}
+ Ret->finalize();
return Ret;
}
@@ -85,7 +86,10 @@ wasm::Expression* Block::Render(RelooperBuilder& Builder, bool InLoop) {
}
if (Code) Ret->list.push_back(Code);
- if (!ProcessedBranchesOut.size()) return Ret;
+ if (!ProcessedBranchesOut.size()) {
+ Ret->finalize();
+ return Ret;
+ }
bool SetLabel = true; // in some cases it is clear we can avoid setting label, see later
bool ForceSetLabel = Shape::IsEmulated(Parent) != nullptr;
@@ -219,6 +223,8 @@ wasm::Expression* Block::Render(RelooperBuilder& Builder, bool InLoop) {
Ret->list.push_back(Root);
}
+ Ret->finalize();
+
return Ret;
}