OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 LO_SPACE, // Promoted large objects. | 431 LO_SPACE, // Promoted large objects. |
432 | 432 |
433 FIRST_SPACE = NEW_SPACE, | 433 FIRST_SPACE = NEW_SPACE, |
434 LAST_SPACE = LO_SPACE, | 434 LAST_SPACE = LO_SPACE, |
435 FIRST_PAGED_SPACE = OLD_SPACE, | 435 FIRST_PAGED_SPACE = OLD_SPACE, |
436 LAST_PAGED_SPACE = MAP_SPACE | 436 LAST_PAGED_SPACE = MAP_SPACE |
437 }; | 437 }; |
438 const int kSpaceTagSize = 3; | 438 const int kSpaceTagSize = 3; |
439 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; | 439 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; |
440 | 440 |
| 441 enum AllocationAlignment { kWordAligned, kDoubleAligned, kDoubleUnaligned }; |
441 | 442 |
442 // A flag that indicates whether objects should be pretenured when | 443 // A flag that indicates whether objects should be pretenured when |
443 // allocated (allocated directly into the old generation) or not | 444 // allocated (allocated directly into the old generation) or not |
444 // (allocated in the young generation if the object size and type | 445 // (allocated in the young generation if the object size and type |
445 // allows). | 446 // allows). |
446 enum PretenureFlag { NOT_TENURED, TENURED }; | 447 enum PretenureFlag { NOT_TENURED, TENURED }; |
447 | 448 |
448 enum MinimumCapacity { | 449 enum MinimumCapacity { |
449 USE_DEFAULT_MINIMUM_CAPACITY, | 450 USE_DEFAULT_MINIMUM_CAPACITY, |
450 USE_CUSTOM_MINIMUM_CAPACITY | 451 USE_CUSTOM_MINIMUM_CAPACITY |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 948 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
948 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 949 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
949 DCHECK(IsValidFunctionKind(kind)); | 950 DCHECK(IsValidFunctionKind(kind)); |
950 return kind; | 951 return kind; |
951 } | 952 } |
952 } } // namespace v8::internal | 953 } } // namespace v8::internal |
953 | 954 |
954 namespace i = v8::internal; | 955 namespace i = v8::internal; |
955 | 956 |
956 #endif // V8_GLOBALS_H_ | 957 #endif // V8_GLOBALS_H_ |
OLD | NEW |