diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-04 17:21:27 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-04 17:21:27 -0800 |
commit | 9e4381bdf422b1ece4084a2584477ca2dfc3acac (patch) | |
tree | 6d7a604b3accf87a456ddefe8252d0d208ef0254 /lib/Target/JSBackend/Relooper.cpp | |
parent | 9f70f79dfa063d6a0d4ca6a8fcf6aff59a6c3190 (diff) |
update relooper
Diffstat (limited to 'lib/Target/JSBackend/Relooper.cpp')
-rw-r--r-- | lib/Target/JSBackend/Relooper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/JSBackend/Relooper.cpp b/lib/Target/JSBackend/Relooper.cpp index de69e0ef35..389d7447d9 100644 --- a/lib/Target/JSBackend/Relooper.cpp +++ b/lib/Target/JSBackend/Relooper.cpp @@ -308,7 +308,7 @@ void MultipleShape::Render(bool InLoop) { } RenderLoopPostfix(); if (Next) Next->Render(InLoop); -}; +} // LoopShape @@ -323,7 +323,7 @@ void LoopShape::Render(bool InLoop) { Indenter::Unindent(); PrintIndented("}\n"); if (Next) Next->Render(InLoop); -}; +} // EmulatedShape @@ -350,7 +350,7 @@ void EmulatedShape::Render(bool InLoop) { Indenter::Unindent(); PrintIndented("}\n"); if (Next) Next->Render(InLoop); -}; +} // Relooper @@ -358,8 +358,8 @@ Relooper::Relooper() : Root(NULL), Emulate(false), BlockIdCounter(1), ShapeIdCou } Relooper::~Relooper() { - for (int i = 0; i < Blocks.size(); i++) delete Blocks[i]; - for (int i = 0; i < Shapes.size(); i++) delete Shapes[i]; + for (unsigned i = 0; i < Blocks.size(); i++) delete Blocks[i]; + for (unsigned i = 0; i < Shapes.size(); i++) delete Shapes[i]; } void Relooper::AddBlock(Block *New) { @@ -399,7 +399,7 @@ void Relooper::Calculate(Block *Entry) { // RAII cleanup. Without splitting, we will be forced to introduce labelled loops to allow // reaching the final block void SplitDeadEnds() { - int TotalCodeSize = 0; + unsigned TotalCodeSize = 0; for (BlockSet::iterator iter = Live.begin(); iter != Live.end(); iter++) { Block *Curr = *iter; TotalCodeSize += strlen(Curr->Code); @@ -451,7 +451,7 @@ void Relooper::Calculate(Block *Entry) { Pre.FindLive(Entry); // Add incoming branches from live blocks, ignoring dead code - for (int i = 0; i < Blocks.size(); i++) { + for (unsigned i = 0; i < Blocks.size(); i++) { Block *Curr = Blocks[i]; if (!contains(Pre.Live, Curr)) continue; for (BlockBranchMap::iterator iter = Curr->BranchesOut.begin(); iter != Curr->BranchesOut.end(); iter++) { |