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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 DECLARE_VERIFIER(HeapObject) | 1479 DECLARE_VERIFIER(HeapObject) |
1480 #ifdef VERIFY_HEAP | 1480 #ifdef VERIFY_HEAP |
1481 inline void VerifyObjectField(int offset); | 1481 inline void VerifyObjectField(int offset); |
1482 inline void VerifySmiField(int offset); | 1482 inline void VerifySmiField(int offset); |
1483 | 1483 |
1484 // Verify a pointer is a valid HeapObject pointer that points to object | 1484 // Verify a pointer is a valid HeapObject pointer that points to object |
1485 // areas in the heap. | 1485 // areas in the heap. |
1486 static void VerifyHeapPointer(Object* p); | 1486 static void VerifyHeapPointer(Object* p); |
1487 #endif | 1487 #endif |
1488 | 1488 |
1489 inline bool NeedsToEnsureDoubleAlignment(); | 1489 inline AllocationAlignment RequiredAlignment(); |
1490 inline bool NeedsToEnsureDoubleUnalignment(); | |
1491 | 1490 |
1492 // Layout description. | 1491 // Layout description. |
1493 // First field in a heap object is map. | 1492 // First field in a heap object is map. |
1494 static const int kMapOffset = Object::kHeaderSize; | 1493 static const int kMapOffset = Object::kHeaderSize; |
1495 static const int kHeaderSize = kMapOffset + kPointerSize; | 1494 static const int kHeaderSize = kMapOffset + kPointerSize; |
1496 | 1495 |
1497 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset); | 1496 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset); |
1498 | 1497 |
1499 protected: | 1498 protected: |
1500 // helpers for calling an ObjectVisitor to iterate over pointers in the | 1499 // helpers for calling an ObjectVisitor to iterate over pointers in the |
(...skipping 9629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11130 } else { | 11129 } else { |
11131 value &= ~(1 << bit_position); | 11130 value &= ~(1 << bit_position); |
11132 } | 11131 } |
11133 return value; | 11132 return value; |
11134 } | 11133 } |
11135 }; | 11134 }; |
11136 | 11135 |
11137 } } // namespace v8::internal | 11136 } } // namespace v8::internal |
11138 | 11137 |
11139 #endif // V8_OBJECTS_H_ | 11138 #endif // V8_OBJECTS_H_ |
OLD | NEW |