| 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_CONTEXTS_H_ | 5 #ifndef V8_CONTEXTS_H_ |
| 6 #define V8_CONTEXTS_H_ | 6 #define V8_CONTEXTS_H_ |
| 7 | 7 |
| 8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 | 594 |
| 595 typedef FixedBodyDescriptor< | 595 typedef FixedBodyDescriptor< |
| 596 kHeaderSize, | 596 kHeaderSize, |
| 597 kHeaderSize + FIRST_WEAK_SLOT * kPointerSize, | 597 kHeaderSize + FIRST_WEAK_SLOT * kPointerSize, |
| 598 kSize> MarkCompactBodyDescriptor; | 598 kSize> MarkCompactBodyDescriptor; |
| 599 | 599 |
| 600 private: | 600 private: |
| 601 // Unchecked access to the slots. | 601 // Unchecked access to the slots. |
| 602 Object* unchecked_previous() { return get(PREVIOUS_INDEX); } | 602 Object* unchecked_previous() { return get(PREVIOUS_INDEX); } |
| 603 | 603 |
| 604 #ifdef DEBUG | 604 #if DCHECK_IS_ON |
| 605 // Bootstrapping-aware type checks. | 605 // Bootstrapping-aware type checks. |
| 606 static bool IsBootstrappingOrValidParentContext(Object* object, Context* kid); | 606 static bool IsBootstrappingOrValidParentContext(Object* object, Context* kid); |
| 607 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 607 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
| 608 #endif | 608 #endif |
| 609 | 609 |
| 610 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 610 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 611 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 611 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 612 }; | 612 }; |
| 613 | 613 |
| 614 } } // namespace v8::internal | 614 } } // namespace v8::internal |
| 615 | 615 |
| 616 #endif // V8_CONTEXTS_H_ | 616 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |