From 9bf835df2c5284341ed8d20f89e7960bf91bb339 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 7 Jan 2013 16:51:27 -0800 Subject: fix asm relooper bug --- src/relooper/Relooper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index fe151364..ae8577b1 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -273,7 +273,11 @@ void MultipleShape::Render(bool InLoop) { RenderLoopPrefix(); bool First = true; for (BlockShapeMap::iterator iter = InnerMap.begin(); iter != InnerMap.end(); iter++) { - PrintIndented("%sif (label%s == %d) {\n", First ? "" : "else ", AsmJS ? "|0" : "", iter->first->Id); + if (AsmJS) { + PrintIndented("%sif ((label|0) == %d) {\n", First ? "" : "else ", iter->first->Id); + } else { + PrintIndented("%sif (label == %d) {\n", First ? "" : "else ", iter->first->Id); + } First = false; Indenter::Indent(); iter->second->Render(InLoop); -- cgit v1.2.3-70-g09d2