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

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

Issue 2111133002: Version 5.2.361.32 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.2
Patch Set: Created 4 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/heap.cc ('k') | src/heap/scavenger.cc » ('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 #include "src/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 } 1399 }
1400 1400
1401 // Skip the weak next code link in a code object, which is visited in 1401 // Skip the weak next code link in a code object, which is visited in
1402 // ProcessTopOptimizedFrame. 1402 // ProcessTopOptimizedFrame.
1403 void VisitNextCodeLink(Object** p) override {} 1403 void VisitNextCodeLink(Object** p) override {}
1404 1404
1405 private: 1405 private:
1406 void MarkObjectByPointer(Object** p) { 1406 void MarkObjectByPointer(Object** p) {
1407 if (!(*p)->IsHeapObject()) return; 1407 if (!(*p)->IsHeapObject()) return;
1408 1408
1409 // Replace flat cons strings in place.
1410 HeapObject* object = HeapObject::cast(*p); 1409 HeapObject* object = HeapObject::cast(*p);
1410
1411 MarkBit mark_bit = Marking::MarkBitFrom(object); 1411 MarkBit mark_bit = Marking::MarkBitFrom(object);
1412 if (Marking::IsBlackOrGrey(mark_bit)) return; 1412 if (Marking::IsBlackOrGrey(mark_bit)) return;
1413 1413
1414 Map* map = object->map(); 1414 Map* map = object->map();
1415 // Mark the object. 1415 // Mark the object.
1416 collector_->SetMark(object, mark_bit); 1416 collector_->SetMark(object, mark_bit);
1417 1417
1418 // Mark the map pointer and body, and push them on the marking stack. 1418 // Mark the map pointer and body, and push them on the marking stack.
1419 MarkBit map_mark = Marking::MarkBitFrom(map); 1419 MarkBit map_mark = Marking::MarkBitFrom(map);
1420 collector_->MarkObject(map, map_mark); 1420 collector_->MarkObject(map, map_mark);
(...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after
3950 MarkBit mark_bit = Marking::MarkBitFrom(host); 3950 MarkBit mark_bit = Marking::MarkBitFrom(host);
3951 if (Marking::IsBlack(mark_bit)) { 3951 if (Marking::IsBlack(mark_bit)) {
3952 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); 3952 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host);
3953 RecordRelocSlot(host, &rinfo, target); 3953 RecordRelocSlot(host, &rinfo, target);
3954 } 3954 }
3955 } 3955 }
3956 } 3956 }
3957 3957
3958 } // namespace internal 3958 } // namespace internal
3959 } // namespace v8 3959 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698