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/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 if (!gc_prologue_callbacks_[i].pass_isolate) { | 1394 if (!gc_prologue_callbacks_[i].pass_isolate) { |
1395 v8::GCCallback callback = reinterpret_cast<v8::GCCallback>( | 1395 v8::GCCallback callback = reinterpret_cast<v8::GCCallback>( |
1396 gc_prologue_callbacks_[i].callback); | 1396 gc_prologue_callbacks_[i].callback); |
1397 callback(gc_type, flags); | 1397 callback(gc_type, flags); |
1398 } else { | 1398 } else { |
1399 v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(this->isolate()); | 1399 v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(this->isolate()); |
1400 gc_prologue_callbacks_[i].callback(isolate, gc_type, flags); | 1400 gc_prologue_callbacks_[i].callback(isolate, gc_type, flags); |
1401 } | 1401 } |
1402 } | 1402 } |
1403 } | 1403 } |
| 1404 if (FLAG_trace_object_groups && (gc_type == kGCTypeIncrementalMarking || |
| 1405 gc_type == kGCTypeMarkSweepCompact)) { |
| 1406 isolate_->global_handles()->PrintObjectGroups(); |
| 1407 } |
1404 } | 1408 } |
1405 | 1409 |
1406 | 1410 |
1407 void Heap::CallGCEpilogueCallbacks(GCType gc_type, | 1411 void Heap::CallGCEpilogueCallbacks(GCType gc_type, |
1408 GCCallbackFlags gc_callback_flags) { | 1412 GCCallbackFlags gc_callback_flags) { |
1409 for (int i = 0; i < gc_epilogue_callbacks_.length(); ++i) { | 1413 for (int i = 0; i < gc_epilogue_callbacks_.length(); ++i) { |
1410 if (gc_type & gc_epilogue_callbacks_[i].gc_type) { | 1414 if (gc_type & gc_epilogue_callbacks_[i].gc_type) { |
1411 if (!gc_epilogue_callbacks_[i].pass_isolate) { | 1415 if (!gc_epilogue_callbacks_[i].pass_isolate) { |
1412 v8::GCCallback callback = reinterpret_cast<v8::GCCallback>( | 1416 v8::GCCallback callback = reinterpret_cast<v8::GCCallback>( |
1413 gc_epilogue_callbacks_[i].callback); | 1417 gc_epilogue_callbacks_[i].callback); |
(...skipping 4929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6343 } | 6347 } |
6344 | 6348 |
6345 | 6349 |
6346 // static | 6350 // static |
6347 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6351 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6348 return StaticVisitorBase::GetVisitorId(map); | 6352 return StaticVisitorBase::GetVisitorId(map); |
6349 } | 6353 } |
6350 | 6354 |
6351 } // namespace internal | 6355 } // namespace internal |
6352 } // namespace v8 | 6356 } // namespace v8 |
OLD | NEW |