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

Side by Side Diff: src/incremental-marking.cc

Issue 10907174: Fix invariant so that we cannot record relocation slots for (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 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 | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 61
62 void IncrementalMarking::TearDown() { 62 void IncrementalMarking::TearDown() {
63 delete marking_deque_memory_; 63 delete marking_deque_memory_;
64 } 64 }
65 65
66 66
67 void IncrementalMarking::RecordWriteSlow(HeapObject* obj, 67 void IncrementalMarking::RecordWriteSlow(HeapObject* obj,
68 Object** slot, 68 Object** slot,
69 Object* value) { 69 Object* value) {
70 if (BaseRecordWrite(obj, slot, value) && is_compacting_ && slot != NULL) { 70 if (BaseRecordWrite(obj, slot, value) && slot != NULL) {
71 MarkBit obj_bit = Marking::MarkBitFrom(obj); 71 MarkBit obj_bit = Marking::MarkBitFrom(obj);
72 if (Marking::IsBlack(obj_bit)) { 72 if (Marking::IsBlack(obj_bit)) {
73 // Object is not going to be rescanned we need to record the slot. 73 // Object is not going to be rescanned we need to record the slot.
74 heap_->mark_compact_collector()->RecordSlot( 74 heap_->mark_compact_collector()->RecordSlot(
75 HeapObject::RawField(obj, 0), slot, value); 75 HeapObject::RawField(obj, 0), slot, value);
76 } 76 }
77 } 77 }
78 } 78 }
79 79
80 80
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (IsMarking()) { 120 if (IsMarking()) {
121 Code* host = heap_->isolate()->inner_pointer_to_code_cache()-> 121 Code* host = heap_->isolate()->inner_pointer_to_code_cache()->
122 GcSafeFindCodeForInnerPointer(pc); 122 GcSafeFindCodeForInnerPointer(pc);
123 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); 123 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host);
124 RecordWriteIntoCode(host, &rinfo, value); 124 RecordWriteIntoCode(host, &rinfo, value);
125 } 125 }
126 } 126 }
127 127
128 128
129 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, 129 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host,
130 Object** slot, 130 Object** slot,
131 Code* value) { 131 Code* value) {
132 if (BaseRecordWrite(host, slot, value) && is_compacting_) { 132 if (BaseRecordWrite(host, slot, value)) {
133 ASSERT(slot != NULL); 133 ASSERT(slot != NULL);
134 heap_->mark_compact_collector()-> 134 heap_->mark_compact_collector()->
135 RecordCodeEntrySlot(reinterpret_cast<Address>(slot), value); 135 RecordCodeEntrySlot(reinterpret_cast<Address>(slot), value);
136 } 136 }
137 } 137 }
138 138
139 139
140 void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj, 140 void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj,
141 RelocInfo* rinfo, 141 RelocInfo* rinfo,
142 Object* value) { 142 Object* value) {
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 allocation_marking_factor_ = kInitialAllocationMarkingFactor; 944 allocation_marking_factor_ = kInitialAllocationMarkingFactor;
945 bytes_scanned_ = 0; 945 bytes_scanned_ = 0;
946 } 946 }
947 947
948 948
949 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 949 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
950 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); 950 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects();
951 } 951 }
952 952
953 } } // namespace v8::internal 953 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698