OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 #endif | 219 #endif |
220 | 220 |
221 // ----------------------------------------------------------------------------- | 221 // ----------------------------------------------------------------------------- |
222 // Constants | 222 // Constants |
223 | 223 |
224 const int KB = 1024; | 224 const int KB = 1024; |
225 const int MB = KB * KB; | 225 const int MB = KB * KB; |
226 const int GB = KB * KB * KB; | 226 const int GB = KB * KB * KB; |
227 const int kMaxInt = 0x7FFFFFFF; | 227 const int kMaxInt = 0x7FFFFFFF; |
228 const int kMinInt = -kMaxInt - 1; | 228 const int kMinInt = -kMaxInt - 1; |
229 const int kMaxInt8 = (1 << 7) - 1; | |
230 const int kMinInt8 = -(1 << 7); | |
231 const int kMaxUInt8 = (1 << 8) - 1; | |
232 const int kMinUInt8 = 0; | |
233 const int kMaxInt16 = (1 << 15) - 1; | |
234 const int kMinInt16 = -(1 << 15); | |
235 const int kMaxUInt16 = (1 << 16) - 1; | |
236 const int kMinUInt16 = 0; | |
237 | 229 |
238 const uint32_t kMaxUInt32 = 0xFFFFFFFFu; | 230 const uint32_t kMaxUInt32 = 0xFFFFFFFFu; |
239 | 231 |
240 const int kCharSize = sizeof(char); // NOLINT | 232 const int kCharSize = sizeof(char); // NOLINT |
241 const int kShortSize = sizeof(short); // NOLINT | 233 const int kShortSize = sizeof(short); // NOLINT |
242 const int kIntSize = sizeof(int); // NOLINT | 234 const int kIntSize = sizeof(int); // NOLINT |
243 const int kInt32Size = sizeof(int32_t); // NOLINT | 235 const int kInt32Size = sizeof(int32_t); // NOLINT |
244 const int kInt64Size = sizeof(int64_t); // NOLINT | 236 const int kInt64Size = sizeof(int64_t); // NOLINT |
245 const int kDoubleSize = sizeof(double); // NOLINT | 237 const int kDoubleSize = sizeof(double); // NOLINT |
246 const int kIntptrSize = sizeof(intptr_t); // NOLINT | 238 const int kIntptrSize = sizeof(intptr_t); // NOLINT |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // the backend, so both modes are represented by the kStrictMode value. | 404 // the backend, so both modes are represented by the kStrictMode value. |
413 enum StrictModeFlag { | 405 enum StrictModeFlag { |
414 kNonStrictMode, | 406 kNonStrictMode, |
415 kStrictMode | 407 kStrictMode |
416 }; | 408 }; |
417 | 409 |
418 | 410 |
419 } } // namespace v8::internal | 411 } } // namespace v8::internal |
420 | 412 |
421 #endif // V8_GLOBALS_H_ | 413 #endif // V8_GLOBALS_H_ |
OLD | NEW |