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

Side by Side Diff: src/objects.h

Issue 377863003: Reland "Precisely sweep scan on scavenge pages and use heap iterator to iterate over them." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.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 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 "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 FIXED_UINT8_ARRAY_TYPE, 707 FIXED_UINT8_ARRAY_TYPE,
708 FIXED_INT16_ARRAY_TYPE, 708 FIXED_INT16_ARRAY_TYPE,
709 FIXED_UINT16_ARRAY_TYPE, 709 FIXED_UINT16_ARRAY_TYPE,
710 FIXED_INT32_ARRAY_TYPE, 710 FIXED_INT32_ARRAY_TYPE,
711 FIXED_UINT32_ARRAY_TYPE, 711 FIXED_UINT32_ARRAY_TYPE,
712 FIXED_FLOAT32_ARRAY_TYPE, 712 FIXED_FLOAT32_ARRAY_TYPE,
713 FIXED_FLOAT64_ARRAY_TYPE, 713 FIXED_FLOAT64_ARRAY_TYPE,
714 FIXED_UINT8_CLAMPED_ARRAY_TYPE, // LAST_FIXED_TYPED_ARRAY_TYPE 714 FIXED_UINT8_CLAMPED_ARRAY_TYPE, // LAST_FIXED_TYPED_ARRAY_TYPE
715 715
716 FIXED_DOUBLE_ARRAY_TYPE, 716 FIXED_DOUBLE_ARRAY_TYPE,
717 CONSTANT_POOL_ARRAY_TYPE,
717 FILLER_TYPE, // LAST_DATA_TYPE 718 FILLER_TYPE, // LAST_DATA_TYPE
718 719
719 // Structs. 720 // Structs.
720 DECLARED_ACCESSOR_DESCRIPTOR_TYPE, 721 DECLARED_ACCESSOR_DESCRIPTOR_TYPE,
721 DECLARED_ACCESSOR_INFO_TYPE, 722 DECLARED_ACCESSOR_INFO_TYPE,
722 EXECUTABLE_ACCESSOR_INFO_TYPE, 723 EXECUTABLE_ACCESSOR_INFO_TYPE,
723 ACCESSOR_PAIR_TYPE, 724 ACCESSOR_PAIR_TYPE,
724 ACCESS_CHECK_INFO_TYPE, 725 ACCESS_CHECK_INFO_TYPE,
725 INTERCEPTOR_INFO_TYPE, 726 INTERCEPTOR_INFO_TYPE,
726 CALL_HANDLER_INFO_TYPE, 727 CALL_HANDLER_INFO_TYPE,
727 FUNCTION_TEMPLATE_INFO_TYPE, 728 FUNCTION_TEMPLATE_INFO_TYPE,
728 OBJECT_TEMPLATE_INFO_TYPE, 729 OBJECT_TEMPLATE_INFO_TYPE,
729 SIGNATURE_INFO_TYPE, 730 SIGNATURE_INFO_TYPE,
730 TYPE_SWITCH_INFO_TYPE, 731 TYPE_SWITCH_INFO_TYPE,
731 ALLOCATION_SITE_TYPE, 732 ALLOCATION_SITE_TYPE,
732 ALLOCATION_MEMENTO_TYPE, 733 ALLOCATION_MEMENTO_TYPE,
733 SCRIPT_TYPE, 734 SCRIPT_TYPE,
734 CODE_CACHE_TYPE, 735 CODE_CACHE_TYPE,
735 POLYMORPHIC_CODE_CACHE_TYPE, 736 POLYMORPHIC_CODE_CACHE_TYPE,
736 TYPE_FEEDBACK_INFO_TYPE, 737 TYPE_FEEDBACK_INFO_TYPE,
737 ALIASED_ARGUMENTS_ENTRY_TYPE, 738 ALIASED_ARGUMENTS_ENTRY_TYPE,
738 BOX_TYPE, 739 BOX_TYPE,
739 DEBUG_INFO_TYPE, 740 DEBUG_INFO_TYPE,
740 BREAK_POINT_INFO_TYPE, 741 BREAK_POINT_INFO_TYPE,
741 742
742 FIXED_ARRAY_TYPE, 743 FIXED_ARRAY_TYPE,
743 CONSTANT_POOL_ARRAY_TYPE,
744 SHARED_FUNCTION_INFO_TYPE, 744 SHARED_FUNCTION_INFO_TYPE,
745 745
746 // All the following types are subtypes of JSReceiver, which corresponds to 746 // All the following types are subtypes of JSReceiver, which corresponds to
747 // objects in the JS sense. The first and the last type in this range are 747 // objects in the JS sense. The first and the last type in this range are
748 // the two forms of function. This organization enables using the same 748 // the two forms of function. This organization enables using the same
749 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the 749 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the
750 // NONCALLABLE_JS_OBJECT range. 750 // NONCALLABLE_JS_OBJECT range.
751 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE 751 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE
752 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE 752 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE
753 753
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 1709
1710 // Iterates over all pointers contained in the object except the 1710 // Iterates over all pointers contained in the object except the
1711 // first map pointer. The object type is given in the first 1711 // first map pointer. The object type is given in the first
1712 // parameter. This function does not access the map pointer in the 1712 // parameter. This function does not access the map pointer in the
1713 // object, and so is safe to call while the map pointer is modified. 1713 // object, and so is safe to call while the map pointer is modified.
1714 void IterateBody(InstanceType type, int object_size, ObjectVisitor* v); 1714 void IterateBody(InstanceType type, int object_size, ObjectVisitor* v);
1715 1715
1716 // Returns the heap object's size in bytes 1716 // Returns the heap object's size in bytes
1717 inline int Size(); 1717 inline int Size();
1718 1718
1719 // Returns true if this heap object contains only references to other
1720 // heap objects.
1721 inline bool ContainsPointers();
1722
1719 // Given a heap object's map pointer, returns the heap size in bytes 1723 // Given a heap object's map pointer, returns the heap size in bytes
1720 // Useful when the map pointer field is used for other purposes. 1724 // Useful when the map pointer field is used for other purposes.
1721 // GC internal. 1725 // GC internal.
1722 inline int SizeFromMap(Map* map); 1726 inline int SizeFromMap(Map* map);
1723 1727
1724 // Returns the field at offset in obj, as a read/write Object* reference. 1728 // Returns the field at offset in obj, as a read/write Object* reference.
1725 // Does no checking, and is safe to use during GC, while maps are invalid. 1729 // Does no checking, and is safe to use during GC, while maps are invalid.
1726 // Does not invoke write barrier, so should only be assigned to 1730 // Does not invoke write barrier, so should only be assigned to
1727 // during marking GC. 1731 // during marking GC.
1728 static inline Object** RawField(HeapObject* obj, int offset); 1732 static inline Object** RawField(HeapObject* obj, int offset);
(...skipping 9482 matching lines...) Expand 10 before | Expand all | Expand 10 after
11211 } else { 11215 } else {
11212 value &= ~(1 << bit_position); 11216 value &= ~(1 << bit_position);
11213 } 11217 }
11214 return value; 11218 return value;
11215 } 11219 }
11216 }; 11220 };
11217 11221
11218 } } // namespace v8::internal 11222 } } // namespace v8::internal
11219 11223
11220 #endif // V8_OBJECTS_H_ 11224 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698