Commit 8ae89958 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Fix order of conversions in ObjectToInt32 and ObjectToUint32 helpers.

TBR=danno@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/10878012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f476d4d4
......@@ -954,7 +954,7 @@ static bool ObjectToInt32(Object* obj, int32_t* value) {
if (obj->IsHeapNumber()) {
double num = HeapNumber::cast(obj)->value();
if (FastD2I(FastI2D(num)) != num) {
if (FastI2D(FastD2I(num)) != num) {
if (FLAG_trace_osr) {
PrintF("**** %g could not be converted to int32 ****\n",
HeapNumber::cast(obj)->value());
......@@ -980,7 +980,7 @@ static bool ObjectToUint32(Object* obj, uint32_t* value) {
if (obj->IsHeapNumber()) {
double num = HeapNumber::cast(obj)->value();
if ((num < 0) || (FastD2UI(FastUI2D(num)) != num)) {
if ((num < 0) || (FastUI2D(FastD2UI(num)) != num)) {
if (FLAG_trace_osr) {
PrintF("**** %g could not be converted to uint32 ****\n",
HeapNumber::cast(obj)->value());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment