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

Side by Side Diff: runtime/platform/globals.h

Issue 343803002: Finishes removing intptr_t from raw object fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/vm/code_descriptors.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 PLATFORM_GLOBALS_H_ 5 #ifndef PLATFORM_GLOBALS_H_
6 #define PLATFORM_GLOBALS_H_ 6 #define PLATFORM_GLOBALS_H_
7 7
8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to 8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
9 // enable platform independent printf format specifiers. 9 // enable platform independent printf format specifiers.
10 #ifndef __STDC_FORMAT_MACROS 10 #ifndef __STDC_FORMAT_MACROS
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 const int kWordSizeLog2 = 2; 291 const int kWordSizeLog2 = 2;
292 const uword kUwordMax = kMaxUint32; 292 const uword kUwordMax = kMaxUint32;
293 #else 293 #else
294 const int kWordSizeLog2 = 3; 294 const int kWordSizeLog2 = 3;
295 const uword kUwordMax = kMaxUint64; 295 const uword kUwordMax = kMaxUint64;
296 #endif 296 #endif
297 297
298 // Bit sizes. 298 // Bit sizes.
299 const int kBitsPerByte = 8; 299 const int kBitsPerByte = 8;
300 const int kBitsPerByteLog2 = 3; 300 const int kBitsPerByteLog2 = 3;
301 const int kBitsPerInt32 = kInt32Size * kBitsPerByte;
301 const int kBitsPerWord = kWordSize * kBitsPerByte; 302 const int kBitsPerWord = kWordSize * kBitsPerByte;
302 const int kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2; 303 const int kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2;
303 304
304 // System-wide named constants. 305 // System-wide named constants.
305 const intptr_t KB = 1024; 306 const intptr_t KB = 1024;
306 const intptr_t KBLog2 = 10; 307 const intptr_t KBLog2 = 10;
307 const intptr_t MB = KB * KB; 308 const intptr_t MB = KB * KB;
308 const intptr_t MBLog2 = KBLog2 + KBLog2; 309 const intptr_t MBLog2 = KBLog2 + KBLog2;
309 const intptr_t GB = MB * KB; 310 const intptr_t GB = MB * KB;
310 const intptr_t GBLog2 = MBLog2 + KBLog2; 311 const intptr_t GBLog2 = MBLog2 + KBLog2;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods 513 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods
513 // have an implicit 'this' argument, the arguments of such methods 514 // have an implicit 'this' argument, the arguments of such methods
514 // should be counted from two, not one." 515 // should be counted from two, not one."
515 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ 516 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \
516 __attribute__((__format__(__printf__, string_index, first_to_check))) 517 __attribute__((__format__(__printf__, string_index, first_to_check)))
517 #else 518 #else
518 #define PRINTF_ATTRIBUTE(string_index, first_to_check) 519 #define PRINTF_ATTRIBUTE(string_index, first_to_check)
519 #endif 520 #endif
520 521
521 #endif // PLATFORM_GLOBALS_H_ 522 #endif // PLATFORM_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698