Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: src/utils.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <sys/stat.h> 6 #include <sys/stat.h>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/base/functional.h" 10 #include "src/base/functional.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 memcopy_uint16_uint8_function = 401 memcopy_uint16_uint8_function =
402 CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper); 402 CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper);
403 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS 403 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS
404 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); 404 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper);
405 #endif 405 #endif
406 } 406 }
407 407
408 408
409 bool DoubleToBoolean(double d) { 409 bool DoubleToBoolean(double d) {
410 // NaN, +0, and -0 should return the false object 410 // NaN, +0, and -0 should return the false object
411 #if __BYTE_ORDER == __LITTLE_ENDIAN 411 #if V8_TARGET_LITTLE_ENDIAN
412 union IeeeDoubleLittleEndianArchType u; 412 union IeeeDoubleLittleEndianArchType u;
413 #elif __BYTE_ORDER == __BIG_ENDIAN 413 #else
414 union IeeeDoubleBigEndianArchType u; 414 union IeeeDoubleBigEndianArchType u;
415 #endif 415 #endif
416 u.d = d; 416 u.d = d;
417 if (u.bits.exp == 2047) { 417 if (u.bits.exp == 2047) {
418 // Detect NaN for IEEE double precision floating point. 418 // Detect NaN for IEEE double precision floating point.
419 if ((u.bits.man_low | u.bits.man_high) != 0) return false; 419 if ((u.bits.man_low | u.bits.man_high) != 0) return false;
420 } 420 }
421 if (u.bits.exp == 0) { 421 if (u.bits.exp == 0) {
422 // Detect +0, and -0 for IEEE double precision floating point. 422 // Detect +0, and -0 for IEEE double precision floating point.
423 if ((u.bits.man_low | u.bits.man_high) == 0) return false; 423 if ((u.bits.man_low | u.bits.man_high) == 0) return false;
424 } 424 }
425 return true; 425 return true;
426 } 426 }
427 427
428 428
429 } } // namespace v8::internal 429 } } // namespace v8::internal
OLDNEW
« src/serialize.cc ('K') | « src/serialize.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698