Chromium Code Reviews

Side by Side Diff: src/objects-inl.h

Issue 18998004: Implemented lazy sweeping of new space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1231 matching lines...)
1242 v->VisitPointers(reinterpret_cast<Object**>(FIELD_ADDR(this, start)), 1242 v->VisitPointers(reinterpret_cast<Object**>(FIELD_ADDR(this, start)),
1243 reinterpret_cast<Object**>(FIELD_ADDR(this, end))); 1243 reinterpret_cast<Object**>(FIELD_ADDR(this, end)));
1244 } 1244 }
1245 1245
1246 1246
1247 void HeapObject::IteratePointer(ObjectVisitor* v, int offset) { 1247 void HeapObject::IteratePointer(ObjectVisitor* v, int offset) {
1248 v->VisitPointer(reinterpret_cast<Object**>(FIELD_ADDR(this, offset))); 1248 v->VisitPointer(reinterpret_cast<Object**>(FIELD_ADDR(this, offset)));
1249 } 1249 }
1250 1250
1251 1251
1252 void HeapObject::ClearDeadObject() {
1253 Address& map_field = Memory::Address_at(address());
1254 if (GetHeap()->map_space()->Contains(map_field)) {
1255 map_field = NULL;
1256 }
1257 }
1258
1259
1252 double HeapNumber::value() { 1260 double HeapNumber::value() {
1253 return READ_DOUBLE_FIELD(this, kValueOffset); 1261 return READ_DOUBLE_FIELD(this, kValueOffset);
1254 } 1262 }
1255 1263
1256 1264
1257 void HeapNumber::set_value(double value) { 1265 void HeapNumber::set_value(double value) {
1258 WRITE_DOUBLE_FIELD(this, kValueOffset, value); 1266 WRITE_DOUBLE_FIELD(this, kValueOffset, value);
1259 } 1267 }
1260 1268
1261 1269
(...skipping 4920 matching lines...)
6182 #undef WRITE_UINT32_FIELD 6190 #undef WRITE_UINT32_FIELD
6183 #undef READ_SHORT_FIELD 6191 #undef READ_SHORT_FIELD
6184 #undef WRITE_SHORT_FIELD 6192 #undef WRITE_SHORT_FIELD
6185 #undef READ_BYTE_FIELD 6193 #undef READ_BYTE_FIELD
6186 #undef WRITE_BYTE_FIELD 6194 #undef WRITE_BYTE_FIELD
6187 6195
6188 6196
6189 } } // namespace v8::internal 6197 } } // namespace v8::internal
6190 6198
6191 #endif // V8_OBJECTS_INL_H_ 6199 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | src/store-buffer.h » ('j') | no next file with comments »

Powered by Google App Engine