| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/snapshot/deserializer.h" | 5 #include "src/snapshot/deserializer.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/external-reference-table.h" | 8 #include "src/external-reference-table.h" |
| 9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 isolate_->heap()->set_native_contexts_list( | 95 isolate_->heap()->set_native_contexts_list( |
| 96 isolate_->heap()->undefined_value()); | 96 isolate_->heap()->undefined_value()); |
| 97 // The allocation site list is build during root iteration, but if no sites | 97 // The allocation site list is build during root iteration, but if no sites |
| 98 // were encountered then it needs to be initialized to undefined. | 98 // were encountered then it needs to be initialized to undefined. |
| 99 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { | 99 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { |
| 100 isolate_->heap()->set_allocation_sites_list( | 100 isolate_->heap()->set_allocation_sites_list( |
| 101 isolate_->heap()->undefined_value()); | 101 isolate_->heap()->undefined_value()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 // Update data pointers to the external strings containing natives sources. | |
| 105 Natives::UpdateSourceCache(isolate_->heap()); | |
| 106 ExtraNatives::UpdateSourceCache(isolate_->heap()); | |
| 107 | |
| 108 // Issue code events for newly deserialized code objects. | 104 // Issue code events for newly deserialized code objects. |
| 109 LOG_CODE_EVENT(isolate_, LogCodeObjects()); | 105 LOG_CODE_EVENT(isolate_, LogCodeObjects()); |
| 110 LOG_CODE_EVENT(isolate_, LogBytecodeHandlers()); | 106 LOG_CODE_EVENT(isolate_, LogBytecodeHandlers()); |
| 111 LOG_CODE_EVENT(isolate_, LogCompiledFunctions()); | 107 LOG_CODE_EVENT(isolate_, LogCompiledFunctions()); |
| 112 } | 108 } |
| 113 | 109 |
| 114 MaybeHandle<Object> Deserializer::DeserializePartial( | 110 MaybeHandle<Object> Deserializer::DeserializePartial( |
| 115 Isolate* isolate, Handle<JSGlobalProxy> global_proxy) { | 111 Isolate* isolate, Handle<JSGlobalProxy> global_proxy) { |
| 116 Initialize(isolate); | 112 Initialize(isolate); |
| 117 if (!ReserveSpace()) { | 113 if (!ReserveSpace()) { |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 802 |
| 807 default: | 803 default: |
| 808 CHECK(false); | 804 CHECK(false); |
| 809 } | 805 } |
| 810 } | 806 } |
| 811 CHECK_EQ(limit, current); | 807 CHECK_EQ(limit, current); |
| 812 return true; | 808 return true; |
| 813 } | 809 } |
| 814 } // namespace internal | 810 } // namespace internal |
| 815 } // namespace v8 | 811 } // namespace v8 |
| OLD | NEW |