Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/objects.h

Issue 759823006: Ensure double alignment when deserializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 DECLARE_VERIFIER(HeapObject) 1436 DECLARE_VERIFIER(HeapObject)
1437 #ifdef VERIFY_HEAP 1437 #ifdef VERIFY_HEAP
1438 inline void VerifyObjectField(int offset); 1438 inline void VerifyObjectField(int offset);
1439 inline void VerifySmiField(int offset); 1439 inline void VerifySmiField(int offset);
1440 1440
1441 // Verify a pointer is a valid HeapObject pointer that points to object 1441 // Verify a pointer is a valid HeapObject pointer that points to object
1442 // areas in the heap. 1442 // areas in the heap.
1443 static void VerifyHeapPointer(Object* p); 1443 static void VerifyHeapPointer(Object* p);
1444 #endif 1444 #endif
1445 1445
1446 inline bool NeedsToEnsureDoubleAlignment();
1447
1446 // Layout description. 1448 // Layout description.
1447 // First field in a heap object is map. 1449 // First field in a heap object is map.
1448 static const int kMapOffset = Object::kHeaderSize; 1450 static const int kMapOffset = Object::kHeaderSize;
1449 static const int kHeaderSize = kMapOffset + kPointerSize; 1451 static const int kHeaderSize = kMapOffset + kPointerSize;
1450 1452
1451 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset); 1453 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset);
1452 1454
1453 protected: 1455 protected:
1454 // helpers for calling an ObjectVisitor to iterate over pointers in the 1456 // helpers for calling an ObjectVisitor to iterate over pointers in the
1455 // half-open range [start, end) specified as integer offsets 1457 // half-open range [start, end) specified as integer offsets
(...skipping 9521 matching lines...) Expand 10 before | Expand all | Expand 10 after
10977 } else { 10979 } else {
10978 value &= ~(1 << bit_position); 10980 value &= ~(1 << bit_position);
10979 } 10981 }
10980 return value; 10982 return value;
10981 } 10983 }
10982 }; 10984 };
10983 10985
10984 } } // namespace v8::internal 10986 } } // namespace v8::internal
10985 10987
10986 #endif // V8_OBJECTS_H_ 10988 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698