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

Side by Side Diff: src/objects.h

Issue 3615009: Parallelize marking phase of mark-sweep/compact collection cycle. (Closed)
Patch Set: Created 10 years, 2 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/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 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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 // Given a heap object's map pointer, returns the heap size in bytes 1036 // Given a heap object's map pointer, returns the heap size in bytes
1037 // Useful when the map pointer field is used for other purposes. 1037 // Useful when the map pointer field is used for other purposes.
1038 // GC internal. 1038 // GC internal.
1039 inline int SizeFromMap(Map* map); 1039 inline int SizeFromMap(Map* map);
1040 1040
1041 // Support for the marking heap objects during the marking phase of GC. 1041 // Support for the marking heap objects during the marking phase of GC.
1042 // True if the object is marked live. 1042 // True if the object is marked live.
1043 inline bool IsMarked(); 1043 inline bool IsMarked();
1044 1044
1045 // Mutate this object's map pointer to indicate that the object is live. 1045 // Mutate this object's map pointer to indicate that the object is live.
1046 inline void SetMark(); 1046 inline bool SetMark();
1047
1048 // Mutate this object's map pointer to indicate that the object is live.
1049 inline bool SetMarkExclusively();
1050
1047 1051
1048 // Mutate this object's map pointer to remove the indication that the 1052 // Mutate this object's map pointer to remove the indication that the
1049 // object is live (ie, partially restore the map pointer). 1053 // object is live (ie, partially restore the map pointer).
1050 inline void ClearMark(); 1054 inline void ClearMark();
1051 1055
1052 // True if this object is marked as overflowed. Overflowed objects have 1056 // True if this object is marked as overflowed. Overflowed objects have
1053 // been reached and marked during marking of the heap, but their children 1057 // been reached and marked during marking of the heap, but their children
1054 // have not necessarily been marked and they have not been pushed on the 1058 // have not necessarily been marked and they have not been pushed on the
1055 // marking stack. 1059 // marking stack.
1056 inline bool IsOverflowed(); 1060 inline bool IsOverflowed();
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 3006
3003 // Casting. 3007 // Casting.
3004 static inline Code* cast(Object* obj); 3008 static inline Code* cast(Object* obj);
3005 3009
3006 // Dispatched behavior. 3010 // Dispatched behavior.
3007 int CodeSize() { return SizeFor(body_size()); } 3011 int CodeSize() { return SizeFor(body_size()); }
3008 inline void CodeIterateBody(ObjectVisitor* v); 3012 inline void CodeIterateBody(ObjectVisitor* v);
3009 3013
3010 template<typename StaticVisitor> 3014 template<typename StaticVisitor>
3011 inline void CodeIterateBody(); 3015 inline void CodeIterateBody();
3016
3017 template<typename StaticVisitor, typename Data>
3018 inline void CodeIterateBody(Data data);
3012 #ifdef DEBUG 3019 #ifdef DEBUG
3013 void CodePrint(); 3020 void CodePrint();
3014 void CodeVerify(); 3021 void CodeVerify();
3015 #endif 3022 #endif
3016 // Layout description. 3023 // Layout description.
3017 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 3024 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
3018 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 3025 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
3019 static const int kFlagsOffset = kRelocationInfoOffset + kPointerSize; 3026 static const int kFlagsOffset = kRelocationInfoOffset + kPointerSize;
3020 static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize; 3027 static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize;
3021 // Add padding to align the instruction start following right after 3028 // Add padding to align the instruction start following right after
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after
5722 } else { 5729 } else {
5723 value &= ~(1 << bit_position); 5730 value &= ~(1 << bit_position);
5724 } 5731 }
5725 return value; 5732 return value;
5726 } 5733 }
5727 }; 5734 };
5728 5735
5729 } } // namespace v8::internal 5736 } } // namespace v8::internal
5730 5737
5731 #endif // V8_OBJECTS_H_ 5738 #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