OLD | NEW |
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/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 4283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4294 } | 4294 } |
4295 addr += obj->Size(); | 4295 addr += obj->Size(); |
4296 } | 4296 } |
4297 } | 4297 } |
4298 } | 4298 } |
4299 } | 4299 } |
4300 } | 4300 } |
4301 | 4301 |
4302 void Heap::NotifyObjectLayoutChange(HeapObject* object, | 4302 void Heap::NotifyObjectLayoutChange(HeapObject* object, |
4303 const DisallowHeapAllocation&) { | 4303 const DisallowHeapAllocation&) { |
4304 // TODO(ulan): Add synchronization with the concurrent marker. | 4304 if (FLAG_incremental_marking && incremental_marking()->IsMarking()) { |
| 4305 incremental_marking()->MarkGrey(this, object); |
| 4306 } |
4305 #ifdef VERIFY_HEAP | 4307 #ifdef VERIFY_HEAP |
4306 DCHECK(pending_layout_change_object_ == nullptr); | 4308 DCHECK(pending_layout_change_object_ == nullptr); |
4307 pending_layout_change_object_ = object; | 4309 pending_layout_change_object_ = object; |
4308 #endif | 4310 #endif |
4309 } | 4311 } |
4310 | 4312 |
4311 #ifdef VERIFY_HEAP | 4313 #ifdef VERIFY_HEAP |
4312 void Heap::VerifyObjectLayoutChange(HeapObject* object, Map* new_map) { | 4314 void Heap::VerifyObjectLayoutChange(HeapObject* object, Map* new_map) { |
4313 if (pending_layout_change_object_ == nullptr) { | 4315 if (pending_layout_change_object_ == nullptr) { |
4314 DCHECK(!object->IsJSObject() || | 4316 DCHECK(!object->IsJSObject() || |
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6396 } | 6398 } |
6397 | 6399 |
6398 | 6400 |
6399 // static | 6401 // static |
6400 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6402 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6401 return StaticVisitorBase::GetVisitorId(map); | 6403 return StaticVisitorBase::GetVisitorId(map); |
6402 } | 6404 } |
6403 | 6405 |
6404 } // namespace internal | 6406 } // namespace internal |
6405 } // namespace v8 | 6407 } // namespace v8 |
OLD | NEW |