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

Side by Side Diff: src/utils.cc

Issue 345513003: Revert "Parser: Delay internalizing strings and values." (r21841) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/utils.h ('k') | src/variables.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/checks.h" 10 #include "src/checks.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 #elif V8_OS_POSIX && V8_HOST_ARCH_ARM 387 #elif V8_OS_POSIX && V8_HOST_ARCH_ARM
388 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); 388 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper);
389 memcopy_uint16_uint8_function = 389 memcopy_uint16_uint8_function =
390 CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper); 390 CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper);
391 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS 391 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS
392 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); 392 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper);
393 #endif 393 #endif
394 } 394 }
395 395
396 396
397 bool DoubleToBoolean(double d) {
398 // NaN, +0, and -0 should return the false object
399 #if __BYTE_ORDER == __LITTLE_ENDIAN
400 union IeeeDoubleLittleEndianArchType u;
401 #elif __BYTE_ORDER == __BIG_ENDIAN
402 union IeeeDoubleBigEndianArchType u;
403 #endif
404 u.d = d;
405 if (u.bits.exp == 2047) {
406 // Detect NaN for IEEE double precision floating point.
407 if ((u.bits.man_low | u.bits.man_high) != 0) return false;
408 }
409 if (u.bits.exp == 0) {
410 // Detect +0, and -0 for IEEE double precision floating point.
411 if ((u.bits.man_low | u.bits.man_high) == 0) return false;
412 }
413 return true;
414 }
415
416
417 } } // namespace v8::internal 397 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/utils.h ('k') | src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698