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

Side by Side Diff: src/objects.h

Issue 335009: New snapshot framework. Doesn't work on ARM yet (code targets... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 // collection. Only valid during a scavenge collection (specifically, 1075 // collection. Only valid during a scavenge collection (specifically,
1076 // when all map words are heap object pointers, ie. not during a full GC). 1076 // when all map words are heap object pointers, ie. not during a full GC).
1077 inline bool IsForwardingAddress(); 1077 inline bool IsForwardingAddress();
1078 1078
1079 // Create a map word from a forwarding address. 1079 // Create a map word from a forwarding address.
1080 static inline MapWord FromForwardingAddress(HeapObject* object); 1080 static inline MapWord FromForwardingAddress(HeapObject* object);
1081 1081
1082 // View this map word as a forwarding address. 1082 // View this map word as a forwarding address.
1083 inline HeapObject* ToForwardingAddress(); 1083 inline HeapObject* ToForwardingAddress();
1084 1084
1085 // True if this map word is a serialization address. This will only be the
1086 // case during a destructive serialization of the heap.
1087 inline bool IsSerializationAddress();
1088
1089 // Create a map word from a serialization address.
1090 static inline MapWord FromSerializationAddress(int raw);
1091
1092 // View this map word as a serialization address.
1093 inline int ToSerializationAddress();
1085 1094
1086 // Marking phase of full collection: the map word of live objects is 1095 // Marking phase of full collection: the map word of live objects is
1087 // marked, and may be marked as overflowed (eg, the object is live, its 1096 // marked, and may be marked as overflowed (eg, the object is live, its
1088 // children have not been visited, and it does not fit in the marking 1097 // children have not been visited, and it does not fit in the marking
1089 // stack). 1098 // stack).
1090 1099
1091 // True if this map word's mark bit is set. 1100 // True if this map word's mark bit is set.
1092 inline bool IsMarked(); 1101 inline bool IsMarked();
1093 1102
1094 // Return this map word but with its mark bit set. 1103 // Return this map word but with its mark bit set.
(...skipping 4003 matching lines...) Expand 10 before | Expand all | Expand 10 after
5098 virtual void VisitExternalReferences(Address* start, Address* end) {} 5107 virtual void VisitExternalReferences(Address* start, Address* end) {}
5099 5108
5100 inline void VisitExternalReference(Address* p) { 5109 inline void VisitExternalReference(Address* p) {
5101 VisitExternalReferences(p, p + 1); 5110 VisitExternalReferences(p, p + 1);
5102 } 5111 }
5103 5112
5104 #ifdef DEBUG 5113 #ifdef DEBUG
5105 // Intended for serialization/deserialization checking: insert, or 5114 // Intended for serialization/deserialization checking: insert, or
5106 // check for the presence of, a tag at this position in the stream. 5115 // check for the presence of, a tag at this position in the stream.
5107 virtual void Synchronize(const char* tag) {} 5116 virtual void Synchronize(const char* tag) {}
5117 #else
5118 inline void Synchronize(const char* tag) {}
5108 #endif 5119 #endif
5109 }; 5120 };
5110 5121
5111 5122
5112 // BooleanBit is a helper class for setting and getting a bit in an 5123 // BooleanBit is a helper class for setting and getting a bit in an
5113 // integer or Smi. 5124 // integer or Smi.
5114 class BooleanBit : public AllStatic { 5125 class BooleanBit : public AllStatic {
5115 public: 5126 public:
5116 static inline bool get(Smi* smi, int bit_position) { 5127 static inline bool get(Smi* smi, int bit_position) {
5117 return get(smi->value(), bit_position); 5128 return get(smi->value(), bit_position);
(...skipping 13 matching lines...) Expand all
5131 } else { 5142 } else {
5132 value &= ~(1 << bit_position); 5143 value &= ~(1 << bit_position);
5133 } 5144 }
5134 return value; 5145 return value;
5135 } 5146 }
5136 }; 5147 };
5137 5148
5138 } } // namespace v8::internal 5149 } } // namespace v8::internal
5139 5150
5140 #endif // V8_OBJECTS_H_ 5151 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698