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

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

Issue 284633002: Fix incremental marking of native context when bootstrapping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove useless casting Created 6 years, 7 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 | « no previous file | no next file » | 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "incremental-marking.h" 7 #include "incremental-marking.h"
8 8
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "compilation-cache.h" 10 #include "compilation-cache.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 object_size - (start_offset - already_scanned_offset)); 215 object_size - (start_offset - already_scanned_offset));
216 } 216 }
217 } else { 217 } else {
218 FixedArrayVisitor::Visit(map, object); 218 FixedArrayVisitor::Visit(map, object);
219 } 219 }
220 } 220 }
221 221
222 static void VisitNativeContextIncremental(Map* map, HeapObject* object) { 222 static void VisitNativeContextIncremental(Map* map, HeapObject* object) {
223 Context* context = Context::cast(object); 223 Context* context = Context::cast(object);
224 224
225 // We will mark cache black with a separate pass 225 // We will mark cache black with a separate pass when we finish marking.
226 // when we finish marking. 226 // Note that GC can happen when the context is not fully initialized,
227 MarkObjectGreyDoNotEnqueue(context->normalized_map_cache()); 227 // so the cache can be undefined.
228 Object* cache = context->get(Context::NORMALIZED_MAP_CACHE_INDEX);
229 if (!cache->IsUndefined()) {
230 MarkObjectGreyDoNotEnqueue(cache);
231 }
228 VisitNativeContext(map, context); 232 VisitNativeContext(map, context);
229 } 233 }
230 234
231 static void VisitWeakCollection(Map* map, HeapObject* object) { 235 static void VisitWeakCollection(Map* map, HeapObject* object) {
232 Heap* heap = map->GetHeap(); 236 Heap* heap = map->GetHeap();
233 VisitPointers(heap, 237 VisitPointers(heap,
234 HeapObject::RawField(object, 238 HeapObject::RawField(object,
235 JSWeakCollection::kPropertiesOffset), 239 JSWeakCollection::kPropertiesOffset),
236 HeapObject::RawField(object, JSWeakCollection::kSize)); 240 HeapObject::RawField(object, JSWeakCollection::kSize));
237 } 241 }
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 bytes_scanned_ = 0; 996 bytes_scanned_ = 0;
993 write_barriers_invoked_since_last_step_ = 0; 997 write_barriers_invoked_since_last_step_ = 0;
994 } 998 }
995 999
996 1000
997 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 1001 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
998 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); 1002 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects();
999 } 1003 }
1000 1004
1001 } } // namespace v8::internal 1005 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698