| Index: src/codegen.cc
|
| ===================================================================
|
| --- src/codegen.cc (revision 1027)
|
| +++ src/codegen.cc (working copy)
|
| @@ -442,9 +442,10 @@
|
| CaseClause* clause = cases->at(i);
|
| if (clause->is_default()) {
|
| if (default_index >= 0) {
|
| - return false; // More than one default label:
|
| - // Defer to normal case for error.
|
| - }
|
| + // There is more than one default label. Defer to the normal case
|
| + // for error.
|
| + return false;
|
| + }
|
| default_index = i;
|
| } else {
|
| Expression* label = clause->label();
|
| @@ -456,9 +457,9 @@
|
| if (!value->IsSmi()) {
|
| return false;
|
| }
|
| - int smi = Smi::cast(value)->value();
|
| - if (smi < min_index) { min_index = smi; }
|
| - if (smi > max_index) { max_index = smi; }
|
| + int int_value = Smi::cast(value)->value();
|
| + min_index = Min(int_value, min_index);
|
| + max_index = Max(int_value, max_index);
|
| }
|
| }
|
|
|
|
|