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

Side by Side Diff: src/objects.h

Issue 6469079: [Isolates] Get the current heap from page header instead of Map field. (Closed)
Patch Set: Created 9 years, 10 months 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.cc ('k') | src/objects-inl.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3539 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 // Dispatched behavior. 3550 // Dispatched behavior.
3551 #ifdef DEBUG 3551 #ifdef DEBUG
3552 void MapPrint(); 3552 void MapPrint();
3553 void MapVerify(); 3553 void MapVerify();
3554 void SharedMapVerify(); 3554 void SharedMapVerify();
3555 #endif 3555 #endif
3556 3556
3557 inline int visitor_id(); 3557 inline int visitor_id();
3558 inline void set_visitor_id(int visitor_id); 3558 inline void set_visitor_id(int visitor_id);
3559 3559
3560 // Meta map has a heap pointer for fast access to Heap and Isolate. 3560 // Returns the heap this map belongs to.
3561 inline Heap* heap(); 3561 inline Heap* heap();
3562 inline void set_heap(Heap* heap);
3563 3562
3564 typedef void (*TraverseCallback)(Map* map, void* data); 3563 typedef void (*TraverseCallback)(Map* map, void* data);
3565 3564
3566 void TraverseTransitionTree(TraverseCallback callback, void* data); 3565 void TraverseTransitionTree(TraverseCallback callback, void* data);
3567 3566
3568 static const int kMaxPreAllocatedPropertyFields = 255; 3567 static const int kMaxPreAllocatedPropertyFields = 255;
3569 3568
3570 // Layout description. 3569 // Layout description.
3571 static const int kHeapOffset = HeapObject::kHeaderSize; 3570 static const int kInstanceSizesOffset = HeapObject::kHeaderSize;
3572 static const int kInstanceSizesOffset = kHeapOffset + kPointerSize;
3573 static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize; 3571 static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize;
3574 static const int kPrototypeOffset = kInstanceAttributesOffset + kIntSize; 3572 static const int kPrototypeOffset = kInstanceAttributesOffset + kIntSize;
3575 static const int kConstructorOffset = kPrototypeOffset + kPointerSize; 3573 static const int kConstructorOffset = kPrototypeOffset + kPointerSize;
3576 static const int kInstanceDescriptorsOffset = 3574 static const int kInstanceDescriptorsOffset =
3577 kConstructorOffset + kPointerSize; 3575 kConstructorOffset + kPointerSize;
3578 static const int kCodeCacheOffset = kInstanceDescriptorsOffset + kPointerSize; 3576 static const int kCodeCacheOffset = kInstanceDescriptorsOffset + kPointerSize;
3579 static const int kPadStart = kCodeCacheOffset + kPointerSize; 3577 static const int kPadStart = kCodeCacheOffset + kPointerSize;
3580 static const int kSize = MAP_POINTER_ALIGN(kPadStart); 3578 static const int kSize = MAP_POINTER_ALIGN(kPadStart);
3581 3579
3582 // Layout of pointer fields. Heap iteration code relies on them 3580 // Layout of pointer fields. Heap iteration code relies on them
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
6131 } else { 6129 } else {
6132 value &= ~(1 << bit_position); 6130 value &= ~(1 << bit_position);
6133 } 6131 }
6134 return value; 6132 return value;
6135 } 6133 }
6136 }; 6134 };
6137 6135
6138 } } // namespace v8::internal 6136 } } // namespace v8::internal
6139 6137
6140 #endif // V8_OBJECTS_H_ 6138 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698