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/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 SerializedData::ComputeMagicNumber(external_reference_table_)); | 70 SerializedData::ComputeMagicNumber(external_reference_table_)); |
71 } | 71 } |
72 | 72 |
73 void Deserializer::Deserialize(Isolate* isolate) { | 73 void Deserializer::Deserialize(Isolate* isolate) { |
74 Initialize(isolate); | 74 Initialize(isolate); |
75 if (!ReserveSpace()) V8::FatalProcessOutOfMemory("deserializing context"); | 75 if (!ReserveSpace()) V8::FatalProcessOutOfMemory("deserializing context"); |
76 // No active threads. | 76 // No active threads. |
77 DCHECK_NULL(isolate_->thread_manager()->FirstThreadStateInUse()); | 77 DCHECK_NULL(isolate_->thread_manager()->FirstThreadStateInUse()); |
78 // No active handles. | 78 // No active handles. |
79 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty()); | 79 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty()); |
| 80 // Partial snapshot cache is not yet populated. |
| 81 DCHECK(isolate_->partial_snapshot_cache()->is_empty()); |
80 | 82 |
81 { | 83 { |
82 DisallowHeapAllocation no_gc; | 84 DisallowHeapAllocation no_gc; |
83 isolate_->heap()->IterateSmiRoots(this); | 85 isolate_->heap()->IterateSmiRoots(this); |
84 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); | 86 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); |
85 isolate_->heap()->RepairFreeListsAfterDeserialization(); | 87 isolate_->heap()->RepairFreeListsAfterDeserialization(); |
86 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); | 88 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); |
87 DeserializeDeferredObjects(); | 89 DeserializeDeferredObjects(); |
88 FlushICacheForNewIsolate(); | 90 FlushICacheForNewIsolate(); |
89 } | 91 } |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 810 |
809 default: | 811 default: |
810 CHECK(false); | 812 CHECK(false); |
811 } | 813 } |
812 } | 814 } |
813 CHECK_EQ(limit, current); | 815 CHECK_EQ(limit, current); |
814 return true; | 816 return true; |
815 } | 817 } |
816 } // namespace internal | 818 } // namespace internal |
817 } // namespace v8 | 819 } // namespace v8 |
OLD | NEW |