OLD | NEW |
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 189 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
190 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() | 190 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() |
191 && (target->ic_age() != heap->global_ic_age())) { | 191 && (target->ic_age() != heap->global_ic_age())) { |
192 IC::Clear(rinfo->pc()); | 192 IC::Clear(rinfo->pc()); |
193 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 193 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
194 } | 194 } |
195 heap->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target)); | 195 heap->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target)); |
196 MarkObject(heap, target); | 196 MarkObject(heap, target); |
197 } | 197 } |
198 | 198 |
199 static void VisitCode(Map* map, HeapObject* object) { | |
200 Heap* heap = map->GetHeap(); | |
201 Code* code = reinterpret_cast<Code*>(object); | |
202 code->CodeIterateBody<IncrementalMarkingMarkingVisitor>(heap); | |
203 } | |
204 | |
205 static void VisitJSWeakMap(Map* map, HeapObject* object) { | 199 static void VisitJSWeakMap(Map* map, HeapObject* object) { |
206 Heap* heap = map->GetHeap(); | 200 Heap* heap = map->GetHeap(); |
207 VisitPointers(heap, | 201 VisitPointers(heap, |
208 HeapObject::RawField(object, JSWeakMap::kPropertiesOffset), | 202 HeapObject::RawField(object, JSWeakMap::kPropertiesOffset), |
209 HeapObject::RawField(object, JSWeakMap::kSize)); | 203 HeapObject::RawField(object, JSWeakMap::kSize)); |
210 } | 204 } |
211 | 205 |
212 static void VisitSharedFunctionInfo(Map* map, HeapObject* object) { | 206 static void VisitSharedFunctionInfo(Map* map, HeapObject* object) { |
213 Heap* heap = map->GetHeap(); | 207 Heap* heap = map->GetHeap(); |
214 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); | 208 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 965 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
972 bytes_scanned_ = 0; | 966 bytes_scanned_ = 0; |
973 } | 967 } |
974 | 968 |
975 | 969 |
976 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 970 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
977 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 971 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
978 } | 972 } |
979 | 973 |
980 } } // namespace v8::internal | 974 } } // namespace v8::internal |
OLD | NEW |