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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 typedef bool (*WeakSlotCallbackWithHeap)(Heap* heap, Object** pointer); | 402 typedef bool (*WeakSlotCallbackWithHeap)(Heap* heap, Object** pointer); |
403 | 403 |
404 // ----------------------------------------------------------------------------- | 404 // ----------------------------------------------------------------------------- |
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_POINTER_SPACE, // May contain pointers to new space. | 412 OLD_SPACE, // May contain pointers to new space. |
413 OLD_DATA_SPACE, // Must not have pointers to new space. | |
414 CODE_SPACE, // No pointers to new space, marked executable. | 413 CODE_SPACE, // No pointers to new space, marked executable. |
415 MAP_SPACE, // Only and all map objects. | 414 MAP_SPACE, // Only and all map objects. |
416 CELL_SPACE, // Only and all cell objects. | 415 CELL_SPACE, // Only and all cell objects. |
417 PROPERTY_CELL_SPACE, // Only and all global property cell objects. | 416 PROPERTY_CELL_SPACE, // Only and all global property cell objects. |
418 LO_SPACE, // Promoted large objects. | 417 LO_SPACE, // Promoted large objects. |
419 | 418 |
420 FIRST_SPACE = NEW_SPACE, | 419 FIRST_SPACE = NEW_SPACE, |
421 LAST_SPACE = LO_SPACE, | 420 LAST_SPACE = LO_SPACE, |
422 FIRST_PAGED_SPACE = OLD_POINTER_SPACE, | 421 FIRST_PAGED_SPACE = OLD_SPACE, |
423 LAST_PAGED_SPACE = PROPERTY_CELL_SPACE | 422 LAST_PAGED_SPACE = PROPERTY_CELL_SPACE |
424 }; | 423 }; |
425 const int kSpaceTagSize = 3; | 424 const int kSpaceTagSize = 3; |
426 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; | 425 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; |
427 | 426 |
428 | 427 |
429 // A flag that indicates whether objects should be pretenured when | 428 // A flag that indicates whether objects should be pretenured when |
430 // allocated (allocated directly into the old generation) or not | 429 // allocated (allocated directly into the old generation) or not |
431 // (allocated in the young generation if the object size and type | 430 // (allocated in the young generation if the object size and type |
432 // allows). | 431 // allows). |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 925 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
927 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 926 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
928 DCHECK(IsValidFunctionKind(kind)); | 927 DCHECK(IsValidFunctionKind(kind)); |
929 return kind; | 928 return kind; |
930 } | 929 } |
931 } } // namespace v8::internal | 930 } } // namespace v8::internal |
932 | 931 |
933 namespace i = v8::internal; | 932 namespace i = v8::internal; |
934 | 933 |
935 #endif // V8_GLOBALS_H_ | 934 #endif // V8_GLOBALS_H_ |
OLD | NEW |