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