Skip to content

Commit 354b32d

Browse files
committedJan 5, 2014
fix some relooper compiler warnings and update reftests for previous fixes
1 parent 0895a98 commit 354b32d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed
 

‎src/relooper/Relooper.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void MultipleShape::Render(bool InLoop) {
308308
}
309309
RenderLoopPostfix();
310310
if (Next) Next->Render(InLoop);
311-
};
311+
}
312312

313313
// LoopShape
314314

@@ -323,7 +323,7 @@ void LoopShape::Render(bool InLoop) {
323323
Indenter::Unindent();
324324
PrintIndented("}\n");
325325
if (Next) Next->Render(InLoop);
326-
};
326+
}
327327

328328
// EmulatedShape
329329

@@ -350,16 +350,16 @@ void EmulatedShape::Render(bool InLoop) {
350350
Indenter::Unindent();
351351
PrintIndented("}\n");
352352
if (Next) Next->Render(InLoop);
353-
};
353+
}
354354

355355
// Relooper
356356

357357
Relooper::Relooper() : Root(NULL), Emulate(false), BlockIdCounter(1), ShapeIdCounter(0) { // block ID 0 is reserved for clearings
358358
}
359359

360360
Relooper::~Relooper() {
361-
for (int i = 0; i < Blocks.size(); i++) delete Blocks[i];
362-
for (int i = 0; i < Shapes.size(); i++) delete Shapes[i];
361+
for (unsigned i = 0; i < Blocks.size(); i++) delete Blocks[i];
362+
for (unsigned i = 0; i < Shapes.size(); i++) delete Shapes[i];
363363
}
364364

365365
void Relooper::AddBlock(Block *New) {
@@ -399,7 +399,7 @@ void Relooper::Calculate(Block *Entry) {
399399
// RAII cleanup. Without splitting, we will be forced to introduce labelled loops to allow
400400
// reaching the final block
401401
void SplitDeadEnds() {
402-
int TotalCodeSize = 0;
402+
unsigned TotalCodeSize = 0;
403403
for (BlockSet::iterator iter = Live.begin(); iter != Live.end(); iter++) {
404404
Block *Curr = *iter;
405405
TotalCodeSize += strlen(Curr->Code);
@@ -451,7 +451,7 @@ void Relooper::Calculate(Block *Entry) {
451451
Pre.FindLive(Entry);
452452

453453
// Add incoming branches from live blocks, ignoring dead code
454-
for (int i = 0; i < Blocks.size(); i++) {
454+
for (unsigned i = 0; i < Blocks.size(); i++) {
455455
Block *Curr = Blocks[i];
456456
if (!contains(Pre.Live, Curr)) continue;
457457
for (BlockBranchMap::iterator iter = Curr->BranchesOut.begin(); iter != Curr->BranchesOut.end(); iter++) {

‎src/relooper/test.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
}
9292
default: {
9393
var $x_1 = $x_0;
94-
label = -1;
94+
label = 8;
9595
break L1;
9696
}
9797
}
@@ -106,7 +106,7 @@
106106
}
107107
}
108108
}
109-
if (label == -1) {
109+
if (label == 8) {
110110
// code 7
111111
}
112112
// code 4

‎tools/shared.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def find_temp_directory():
337337
# we re-check sanity when the settings are changed)
338338
# We also re-check sanity and clear the cache when the version changes
339339

340-
EMSCRIPTEN_VERSION = '1.8.2'
340+
EMSCRIPTEN_VERSION = '1.8.3'
341341

342342
def generate_sanity():
343343
return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT

0 commit comments

Comments
 (0)
Please sign in to comment.