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

Side by Side Diff: vm/globals.h

Issue 9021042: Make snapshots 32 or 64 bit compliant by using Write<int64_t> and Read<int64_t> for intptr_t type... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 8 years, 11 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 | « vm/bitfield.h ('k') | vm/raw_object_snapshot.cc » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_GLOBALS_H_ 5 #ifndef VM_GLOBALS_H_
6 #define VM_GLOBALS_H_ 6 #define VM_GLOBALS_H_
7 7
8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf. 8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf.
9 #ifndef __STDC_FORMAT_MACROS 9 #ifndef __STDC_FORMAT_MACROS
10 #define __STDC_FORMAT_MACROS 10 #define __STDC_FORMAT_MACROS
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 // Bit sizes. 162 // Bit sizes.
163 const int kBitsPerByte = 8; 163 const int kBitsPerByte = 8;
164 const int kBitsPerByteLog2 = 3; 164 const int kBitsPerByteLog2 = 3;
165 const int kBitsPerWord = kWordSize * kBitsPerByte; 165 const int kBitsPerWord = kWordSize * kBitsPerByte;
166 166
167 // System-wide named constants. 167 // System-wide named constants.
168 const int KB = 1024; 168 const int KB = 1024;
169 const int MB = KB * KB; 169 const int MB = KB * KB;
170 const int GB = KB * KB * KB; 170 const int GB = KB * KB * KB;
171 const intptr_t kIntptrOne = 1;
172 const intptr_t kIntptrMin = (kIntptrOne << (kBitsPerWord - 1));
173 const intptr_t kIntptrMax = ~kIntptrMin;
171 174
172 // Time constants. 175 // Time constants.
173 const int kMillisecondsPerSecond = 1000; 176 const int kMillisecondsPerSecond = 1000;
174 const int kMicrosecondsPerMillisecond = 1000; 177 const int kMicrosecondsPerMillisecond = 1000;
175 const int kMicrosecondsPerSecond = (kMicrosecondsPerMillisecond * 178 const int kMicrosecondsPerSecond = (kMicrosecondsPerMillisecond *
176 kMillisecondsPerSecond); 179 kMillisecondsPerSecond);
177 const int kNanosecondsPerMicrosecond = 1000; 180 const int kNanosecondsPerMicrosecond = 1000;
178 const int kNanosecondsPerMillisecond = (kNanosecondsPerMicrosecond * 181 const int kNanosecondsPerMillisecond = (kNanosecondsPerMicrosecond *
179 kMicrosecondsPerMillisecond); 182 kMicrosecondsPerMillisecond);
180 const int kNanosecondsPerSecond = (kNanosecondsPerMicrosecond * 183 const int kNanosecondsPerSecond = (kNanosecondsPerMicrosecond *
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // contants are 16 byte aligned. 354 // contants are 16 byte aligned.
352 #if defined(TARGET_OS_WINDOWS) 355 #if defined(TARGET_OS_WINDOWS)
353 #define ALIGN16 __declspec(align(16)) 356 #define ALIGN16 __declspec(align(16))
354 #else 357 #else
355 #define ALIGN16 __attribute__((aligned(16))) 358 #define ALIGN16 __attribute__((aligned(16)))
356 #endif 359 #endif
357 360
358 } // namespace dart 361 } // namespace dart
359 362
360 #endif // VM_GLOBALS_H_ 363 #endif // VM_GLOBALS_H_
OLDNEW
« no previous file with comments | « vm/bitfield.h ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698