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

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

Issue 10831123: Make incremental marking clear ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Erik Corry. Created 8 years, 4 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
« no previous file with comments | « src/frames.cc ('k') | src/mark-compact.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 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 static void Initialize() { 168 static void Initialize() {
169 StaticMarkingVisitor<IncrementalMarkingMarkingVisitor>::Initialize(); 169 StaticMarkingVisitor<IncrementalMarkingMarkingVisitor>::Initialize();
170 170
171 table_.Register(kVisitSharedFunctionInfo, &VisitSharedFunctionInfo); 171 table_.Register(kVisitSharedFunctionInfo, &VisitSharedFunctionInfo);
172 172
173 table_.Register(kVisitJSFunction, &VisitJSFunction); 173 table_.Register(kVisitJSFunction, &VisitJSFunction);
174 174
175 table_.Register(kVisitJSRegExp, &VisitJSRegExp); 175 table_.Register(kVisitJSRegExp, &VisitJSRegExp);
176 } 176 }
177 177
178 static inline void VisitCodeTarget(Heap* heap, RelocInfo* rinfo) {
179 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
180 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
181 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
182 && (target->ic_age() != heap->global_ic_age())) {
183 IC::Clear(rinfo->pc());
184 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
185 }
186 heap->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target));
187 MarkObject(heap, target);
188 }
189
190 static void VisitJSWeakMap(Map* map, HeapObject* object) { 178 static void VisitJSWeakMap(Map* map, HeapObject* object) {
191 Heap* heap = map->GetHeap(); 179 Heap* heap = map->GetHeap();
192 VisitPointers(heap, 180 VisitPointers(heap,
193 HeapObject::RawField(object, JSWeakMap::kPropertiesOffset), 181 HeapObject::RawField(object, JSWeakMap::kPropertiesOffset),
194 HeapObject::RawField(object, JSWeakMap::kSize)); 182 HeapObject::RawField(object, JSWeakMap::kSize));
195 } 183 }
196 184
197 static void VisitSharedFunctionInfo(Map* map, HeapObject* object) { 185 static void VisitSharedFunctionInfo(Map* map, HeapObject* object) {
198 Heap* heap = map->GetHeap(); 186 Heap* heap = map->GetHeap();
199 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); 187 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 allocation_marking_factor_ = kInitialAllocationMarkingFactor; 944 allocation_marking_factor_ = kInitialAllocationMarkingFactor;
957 bytes_scanned_ = 0; 945 bytes_scanned_ = 0;
958 } 946 }
959 947
960 948
961 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 949 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
962 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); 950 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects();
963 } 951 }
964 952
965 } } // namespace v8::internal 953 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698