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

Side by Side Diff: src/v8globals.h

Issue 8041019: Avoid using C++ STL include <limits>. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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/globals.h ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Number of bits to represent the page size for paged spaces. The value of 20 93 // Number of bits to represent the page size for paged spaces. The value of 20
94 // gives 1Mb bytes per page. 94 // gives 1Mb bytes per page.
95 const int kPageSizeBits = 20; 95 const int kPageSizeBits = 20;
96 96
97 // On Intel architecture, cache line size is 64 bytes. 97 // On Intel architecture, cache line size is 64 bytes.
98 // On ARM it may be less (32 bytes), but as far this constant is 98 // On ARM it may be less (32 bytes), but as far this constant is
99 // used for aligning data, it doesn't hurt to align on a greater value. 99 // used for aligning data, it doesn't hurt to align on a greater value.
100 const int kProcessorCacheLineSize = 64; 100 const int kProcessorCacheLineSize = 64;
101 101
102 // Constants relevant to double precision floating point numbers. 102 // Constants relevant to double precision floating point numbers.
103
104 // Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
105 // other bits set.
106 const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
107 // If looking only at the top 32 bits, the QNaN mask is bits 19 to 30. 103 // If looking only at the top 32 bits, the QNaN mask is bits 19 to 30.
108 const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32); 104 const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32);
109 105
110 106
111 // ----------------------------------------------------------------------------- 107 // -----------------------------------------------------------------------------
112 // Forward declarations for frequently used classes 108 // Forward declarations for frequently used classes
113 // (sorted alphabetically) 109 // (sorted alphabetically)
114 110
115 class AccessorInfo; 111 class AccessorInfo;
116 class Allocation; 112 class Allocation;
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 static const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000; 512 static const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000;
517 513
518 const uint64_t kHoleNanInt64 = 514 const uint64_t kHoleNanInt64 =
519 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; 515 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32;
520 const uint64_t kLastNonNaNInt64 = 516 const uint64_t kLastNonNaNInt64 =
521 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32); 517 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32);
522 518
523 } } // namespace v8::internal 519 } } // namespace v8::internal
524 520
525 #endif // V8_V8GLOBALS_H_ 521 #endif // V8_V8GLOBALS_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698