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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // Miscellaneous | 405 // Miscellaneous |
406 | 406 |
407 // NOTE: SpaceIterator depends on AllocationSpace enumeration values being | 407 // NOTE: SpaceIterator depends on AllocationSpace enumeration values being |
408 // consecutive. | 408 // consecutive. |
409 // Keep this enum in sync with the ObjectSpace enum in v8.h | 409 // Keep this enum in sync with the ObjectSpace enum in v8.h |
410 enum AllocationSpace { | 410 enum AllocationSpace { |
411 NEW_SPACE, // Semispaces collected with copying collector. | 411 NEW_SPACE, // Semispaces collected with copying collector. |
412 OLD_SPACE, // May contain pointers to new space. | 412 OLD_SPACE, // May contain pointers to new space. |
413 CODE_SPACE, // No pointers to new space, marked executable. | 413 CODE_SPACE, // No pointers to new space, marked executable. |
414 MAP_SPACE, // Only and all map objects. | 414 MAP_SPACE, // Only and all map objects. |
415 CELL_SPACE, // Only and all cell objects. | |
416 LO_SPACE, // Promoted large objects. | 415 LO_SPACE, // Promoted large objects. |
417 | 416 |
418 FIRST_SPACE = NEW_SPACE, | 417 FIRST_SPACE = NEW_SPACE, |
419 LAST_SPACE = LO_SPACE, | 418 LAST_SPACE = LO_SPACE, |
420 FIRST_PAGED_SPACE = OLD_SPACE, | 419 FIRST_PAGED_SPACE = OLD_SPACE, |
421 LAST_PAGED_SPACE = CELL_SPACE | 420 LAST_PAGED_SPACE = MAP_SPACE |
422 }; | 421 }; |
423 const int kSpaceTagSize = 3; | 422 const int kSpaceTagSize = 3; |
424 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; | 423 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; |
425 | 424 |
426 | 425 |
427 // A flag that indicates whether objects should be pretenured when | 426 // A flag that indicates whether objects should be pretenured when |
428 // allocated (allocated directly into the old generation) or not | 427 // allocated (allocated directly into the old generation) or not |
429 // (allocated in the young generation if the object size and type | 428 // (allocated in the young generation if the object size and type |
430 // allows). | 429 // allows). |
431 enum PretenureFlag { NOT_TENURED, TENURED }; | 430 enum PretenureFlag { NOT_TENURED, TENURED }; |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 927 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
929 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 928 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
930 DCHECK(IsValidFunctionKind(kind)); | 929 DCHECK(IsValidFunctionKind(kind)); |
931 return kind; | 930 return kind; |
932 } | 931 } |
933 } } // namespace v8::internal | 932 } } // namespace v8::internal |
934 | 933 |
935 namespace i = v8::internal; | 934 namespace i = v8::internal; |
936 | 935 |
937 #endif // V8_GLOBALS_H_ | 936 #endif // V8_GLOBALS_H_ |
OLD | NEW |