Fix the mac debug build. Apparently g++ on Mac cannot figure out that there

is a return in each branch of an if-else.

TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/661088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ager@chromium.org 2010-02-25 18:19:12 +00:00
parent a3a3a1f0be
commit 4a9d4b7bd5

View File

@ -4157,9 +4157,8 @@ static Object* Runtime_NumberToInteger(Arguments args) {
// We do not include 0 so that we don't have to treat +0 / -0 cases.
if (number > 0 && number <= Smi::kMaxValue) {
return Smi::FromInt(static_cast<int>(number));
} else {
return Heap::NumberFromDouble(DoubleToInteger(number));
}
return Heap::NumberFromDouble(DoubleToInteger(number));
}
@ -4181,9 +4180,8 @@ static Object* Runtime_NumberToJSInt32(Arguments args) {
// We do not include 0 so that we don't have to treat +0 / -0 cases.
if (number > 0 && number <= Smi::kMaxValue) {
return Smi::FromInt(static_cast<int>(number));
} else {
return Heap::NumberFromInt32(DoubleToInt32(number));
}
}
return Heap::NumberFromInt32(DoubleToInt32(number));
}