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 2860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2871 set_array_protector(*cell); | 2871 set_array_protector(*cell); |
2872 | 2872 |
2873 cell = factory->NewPropertyCell(); | 2873 cell = factory->NewPropertyCell(); |
2874 cell->set_value(the_hole_value()); | 2874 cell->set_value(the_hole_value()); |
2875 set_empty_property_cell(*cell); | 2875 set_empty_property_cell(*cell); |
2876 | 2876 |
2877 set_weak_stack_trace_list(Smi::FromInt(0)); | 2877 set_weak_stack_trace_list(Smi::FromInt(0)); |
2878 | 2878 |
2879 set_noscript_shared_function_infos(Smi::FromInt(0)); | 2879 set_noscript_shared_function_infos(Smi::FromInt(0)); |
2880 | 2880 |
2881 // Will be filled in by Interpreter::Initialize(). | |
2882 set_interpreter_table( | |
2883 *interpreter::Interpreter::CreateUninitializedInterpreterTable( | |
2884 isolate())); | |
2885 | |
2886 // Initialize keyed lookup cache. | 2881 // Initialize keyed lookup cache. |
2887 isolate_->keyed_lookup_cache()->Clear(); | 2882 isolate_->keyed_lookup_cache()->Clear(); |
2888 | 2883 |
2889 // Initialize context slot cache. | 2884 // Initialize context slot cache. |
2890 isolate_->context_slot_cache()->Clear(); | 2885 isolate_->context_slot_cache()->Clear(); |
2891 | 2886 |
2892 // Initialize descriptor cache. | 2887 // Initialize descriptor cache. |
2893 isolate_->descriptor_lookup_cache()->Clear(); | 2888 isolate_->descriptor_lookup_cache()->Clear(); |
2894 | 2889 |
2895 // Initialize compilation cache. | 2890 // Initialize compilation cache. |
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4605 // Iterate over local handles in handle scopes. | 4600 // Iterate over local handles in handle scopes. |
4606 isolate_->handle_scope_implementer()->Iterate(v); | 4601 isolate_->handle_scope_implementer()->Iterate(v); |
4607 isolate_->IterateDeferredHandles(v); | 4602 isolate_->IterateDeferredHandles(v); |
4608 v->Synchronize(VisitorSynchronization::kHandleScope); | 4603 v->Synchronize(VisitorSynchronization::kHandleScope); |
4609 | 4604 |
4610 // Iterate over the builtin code objects and code stubs in the | 4605 // Iterate over the builtin code objects and code stubs in the |
4611 // heap. Note that it is not necessary to iterate over code objects | 4606 // heap. Note that it is not necessary to iterate over code objects |
4612 // on scavenge collections. | 4607 // on scavenge collections. |
4613 if (mode != VISIT_ALL_IN_SCAVENGE) { | 4608 if (mode != VISIT_ALL_IN_SCAVENGE) { |
4614 isolate_->builtins()->IterateBuiltins(v); | 4609 isolate_->builtins()->IterateBuiltins(v); |
| 4610 v->Synchronize(VisitorSynchronization::kBuiltins); |
| 4611 isolate_->interpreter()->IterateDispatchTable(v); |
| 4612 v->Synchronize(VisitorSynchronization::kDispatchTable); |
4615 } | 4613 } |
4616 v->Synchronize(VisitorSynchronization::kBuiltins); | |
4617 | 4614 |
4618 // Iterate over global handles. | 4615 // Iterate over global handles. |
4619 switch (mode) { | 4616 switch (mode) { |
4620 case VISIT_ONLY_STRONG: | 4617 case VISIT_ONLY_STRONG: |
4621 isolate_->global_handles()->IterateStrongRoots(v); | 4618 isolate_->global_handles()->IterateStrongRoots(v); |
4622 break; | 4619 break; |
4623 case VISIT_ALL_IN_SCAVENGE: | 4620 case VISIT_ALL_IN_SCAVENGE: |
4624 isolate_->global_handles()->IterateNewSpaceStrongAndDependentRoots(v); | 4621 isolate_->global_handles()->IterateNewSpaceStrongAndDependentRoots(v); |
4625 break; | 4622 break; |
4626 case VISIT_ALL_IN_SWEEP_NEWSPACE: | 4623 case VISIT_ALL_IN_SWEEP_NEWSPACE: |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6222 } | 6219 } |
6223 | 6220 |
6224 | 6221 |
6225 // static | 6222 // static |
6226 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6223 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6227 return StaticVisitorBase::GetVisitorId(map); | 6224 return StaticVisitorBase::GetVisitorId(map); |
6228 } | 6225 } |
6229 | 6226 |
6230 } // namespace internal | 6227 } // namespace internal |
6231 } // namespace v8 | 6228 } // namespace v8 |
OLD | NEW |