Reviewers: William Hesse,

Description:
Fix the mac debug build.  Apparently g++ on Mac cannot figure out that there
is a return in each branch of an if-else.

[email protected]

Please review this at http://codereview.chromium.org/661088

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/runtime.cc


Index: src/runtime.cc
===================================================================
--- src/runtime.cc      (revision 3955)
+++ src/runtime.cc      (working copy)
@@ -4157,9 +4157,8 @@
   // 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 @@
   // 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));
 }




--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to