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/v8.h" | 5 #include "src/v8.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/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 external_reference_decoder_ = new ExternalReferenceDecoder(isolate); | 625 external_reference_decoder_ = new ExternalReferenceDecoder(isolate); |
626 isolate_->heap()->IterateSmiRoots(this); | 626 isolate_->heap()->IterateSmiRoots(this); |
627 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); | 627 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); |
628 isolate_->heap()->RepairFreeListsAfterBoot(); | 628 isolate_->heap()->RepairFreeListsAfterBoot(); |
629 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); | 629 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); |
630 | 630 |
631 isolate_->heap()->set_native_contexts_list( | 631 isolate_->heap()->set_native_contexts_list( |
632 isolate_->heap()->undefined_value()); | 632 isolate_->heap()->undefined_value()); |
633 isolate_->heap()->set_array_buffers_list( | 633 isolate_->heap()->set_array_buffers_list( |
634 isolate_->heap()->undefined_value()); | 634 isolate_->heap()->undefined_value()); |
| 635 isolate_->heap()->set_encountered_weak_cells( |
| 636 isolate_->heap()->undefined_value()); |
| 637 |
635 | 638 |
636 // The allocation site list is build during root iteration, but if no sites | 639 // The allocation site list is build during root iteration, but if no sites |
637 // were encountered then it needs to be initialized to undefined. | 640 // were encountered then it needs to be initialized to undefined. |
638 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { | 641 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { |
639 isolate_->heap()->set_allocation_sites_list( | 642 isolate_->heap()->set_allocation_sites_list( |
640 isolate_->heap()->undefined_value()); | 643 isolate_->heap()->undefined_value()); |
641 } | 644 } |
642 | 645 |
643 isolate_->heap()->InitializeWeakObjectToCodeTable(); | 646 isolate_->heap()->InitializeWeakObjectToCodeTable(); |
644 | 647 |
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2187 | 2190 |
2188 int SerializedCodeData::CheckSum(String* string) { | 2191 int SerializedCodeData::CheckSum(String* string) { |
2189 int checksum = Version::Hash(); | 2192 int checksum = Version::Hash(); |
2190 #ifdef DEBUG | 2193 #ifdef DEBUG |
2191 uint32_t seed = static_cast<uint32_t>(checksum); | 2194 uint32_t seed = static_cast<uint32_t>(checksum); |
2192 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); | 2195 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); |
2193 #endif // DEBUG | 2196 #endif // DEBUG |
2194 return checksum; | 2197 return checksum; |
2195 } | 2198 } |
2196 } } // namespace v8::internal | 2199 } } // namespace v8::internal |
OLD | NEW |