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

Side by Side Diff: src/mark-compact.cc

Issue 2950003: Virtually dispatched scavengers (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/heap.cc ('k') | src/objects.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 419
420 void MarkCompactCollector::MarkMapContents(Map* map) { 420 void MarkCompactCollector::MarkMapContents(Map* map) {
421 MarkDescriptorArray(reinterpret_cast<DescriptorArray*>( 421 MarkDescriptorArray(reinterpret_cast<DescriptorArray*>(
422 *HeapObject::RawField(map, Map::kInstanceDescriptorsOffset))); 422 *HeapObject::RawField(map, Map::kInstanceDescriptorsOffset)));
423 423
424 // Mark the Object* fields of the Map. 424 // Mark the Object* fields of the Map.
425 // Since the descriptor array has been marked already, it is fine 425 // Since the descriptor array has been marked already, it is fine
426 // that one of these fields contains a pointer to it. 426 // that one of these fields contains a pointer to it.
427 MarkingVisitor visitor; // Has no state or contents. 427 MarkingVisitor visitor; // Has no state or contents.
428 visitor.VisitPointers(HeapObject::RawField(map, Map::kPrototypeOffset), 428 visitor.VisitPointers(HeapObject::RawField(map,
429 HeapObject::RawField(map, Map::kSize)); 429 Map::kPointerFieldsBeginOffset),
430 HeapObject::RawField(map,
431 Map::kPointerFieldsEndOffset));
430 } 432 }
431 433
432 434
433 void MarkCompactCollector::MarkDescriptorArray( 435 void MarkCompactCollector::MarkDescriptorArray(
434 DescriptorArray* descriptors) { 436 DescriptorArray* descriptors) {
435 if (descriptors->IsMarked()) return; 437 if (descriptors->IsMarked()) return;
436 // Empty descriptor array is marked as a root before any maps are marked. 438 // Empty descriptor array is marked as a root before any maps are marked.
437 ASSERT(descriptors != Heap::raw_unchecked_empty_descriptor_array()); 439 ASSERT(descriptors != Heap::raw_unchecked_empty_descriptor_array());
438 SetMark(descriptors); 440 SetMark(descriptors);
439 441
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 #ifdef ENABLE_LOGGING_AND_PROFILING 2317 #ifdef ENABLE_LOGGING_AND_PROFILING
2316 if (obj->IsCode()) { 2318 if (obj->IsCode()) {
2317 PROFILE(CodeDeleteEvent(obj->address())); 2319 PROFILE(CodeDeleteEvent(obj->address()));
2318 } else if (obj->IsJSFunction()) { 2320 } else if (obj->IsJSFunction()) {
2319 PROFILE(FunctionDeleteEvent(obj->address())); 2321 PROFILE(FunctionDeleteEvent(obj->address()));
2320 } 2322 }
2321 #endif 2323 #endif
2322 } 2324 }
2323 2325
2324 } } // namespace v8::internal 2326 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698