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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 #ifdef VERIFY_HEAP | 1474 #ifdef VERIFY_HEAP |
1475 inline void VerifyObjectField(int offset); | 1475 inline void VerifyObjectField(int offset); |
1476 inline void VerifySmiField(int offset); | 1476 inline void VerifySmiField(int offset); |
1477 | 1477 |
1478 // Verify a pointer is a valid HeapObject pointer that points to object | 1478 // Verify a pointer is a valid HeapObject pointer that points to object |
1479 // areas in the heap. | 1479 // areas in the heap. |
1480 static void VerifyHeapPointer(Object* p); | 1480 static void VerifyHeapPointer(Object* p); |
1481 #endif | 1481 #endif |
1482 | 1482 |
1483 inline bool NeedsToEnsureDoubleAlignment(); | 1483 inline bool NeedsToEnsureDoubleAlignment(); |
| 1484 inline bool NeedsToEnsureDoubleUnalignment(); |
1484 | 1485 |
1485 // Layout description. | 1486 // Layout description. |
1486 // First field in a heap object is map. | 1487 // First field in a heap object is map. |
1487 static const int kMapOffset = Object::kHeaderSize; | 1488 static const int kMapOffset = Object::kHeaderSize; |
1488 static const int kHeaderSize = kMapOffset + kPointerSize; | 1489 static const int kHeaderSize = kMapOffset + kPointerSize; |
1489 | 1490 |
1490 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset); | 1491 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset); |
1491 | 1492 |
1492 protected: | 1493 protected: |
1493 // helpers for calling an ObjectVisitor to iterate over pointers in the | 1494 // helpers for calling an ObjectVisitor to iterate over pointers in the |
(...skipping 9615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11109 } else { | 11110 } else { |
11110 value &= ~(1 << bit_position); | 11111 value &= ~(1 << bit_position); |
11111 } | 11112 } |
11112 return value; | 11113 return value; |
11113 } | 11114 } |
11114 }; | 11115 }; |
11115 | 11116 |
11116 } } // namespace v8::internal | 11117 } } // namespace v8::internal |
11117 | 11118 |
11118 #endif // V8_OBJECTS_H_ | 11119 #endif // V8_OBJECTS_H_ |
OLD | NEW |