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/api.h" | 7 #include "src/api.h" |
8 #include "src/assembler-inl.h" | 8 #include "src/assembler-inl.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 isolate_->heap()->set_native_contexts_list( | 110 isolate_->heap()->set_native_contexts_list( |
111 isolate_->heap()->undefined_value()); | 111 isolate_->heap()->undefined_value()); |
112 // The allocation site list is build during root iteration, but if no sites | 112 // The allocation site list is build during root iteration, but if no sites |
113 // were encountered then it needs to be initialized to undefined. | 113 // were encountered then it needs to be initialized to undefined. |
114 if (isolate_->heap()->allocation_sites_list() == Smi::kZero) { | 114 if (isolate_->heap()->allocation_sites_list() == Smi::kZero) { |
115 isolate_->heap()->set_allocation_sites_list( | 115 isolate_->heap()->set_allocation_sites_list( |
116 isolate_->heap()->undefined_value()); | 116 isolate_->heap()->undefined_value()); |
117 } | 117 } |
118 | 118 |
119 // If needed, print the dissassembly of deserialized code objects. | |
120 PrintDisassembledCodeObjects(); | |
121 | |
122 // Issue code events for newly deserialized code objects. | 119 // Issue code events for newly deserialized code objects. |
123 LOG_CODE_EVENT(isolate_, LogCodeObjects()); | 120 LOG_CODE_EVENT(isolate_, LogCodeObjects()); |
124 LOG_CODE_EVENT(isolate_, LogBytecodeHandlers()); | 121 LOG_CODE_EVENT(isolate_, LogBytecodeHandlers()); |
125 LOG_CODE_EVENT(isolate_, LogCompiledFunctions()); | 122 LOG_CODE_EVENT(isolate_, LogCompiledFunctions()); |
126 | 123 |
127 isolate_->builtins()->MarkInitialized(); | 124 isolate_->builtins()->MarkInitialized(); |
| 125 |
| 126 // If needed, print the dissassembly of deserialized code objects. |
| 127 // Needs to be called after the builtins are marked as initialized, in order |
| 128 // to display the builtin names. |
| 129 PrintDisassembledCodeObjects(); |
128 } | 130 } |
129 | 131 |
130 MaybeHandle<Object> Deserializer::DeserializePartial( | 132 MaybeHandle<Object> Deserializer::DeserializePartial( |
131 Isolate* isolate, Handle<JSGlobalProxy> global_proxy, | 133 Isolate* isolate, Handle<JSGlobalProxy> global_proxy, |
132 v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer) { | 134 v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer) { |
133 Initialize(isolate); | 135 Initialize(isolate); |
134 if (!ReserveSpace()) { | 136 if (!ReserveSpace()) { |
135 V8::FatalProcessOutOfMemory("deserialize context"); | 137 V8::FatalProcessOutOfMemory("deserialize context"); |
136 return MaybeHandle<Object>(); | 138 return MaybeHandle<Object>(); |
137 } | 139 } |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 | 912 |
911 default: | 913 default: |
912 CHECK(false); | 914 CHECK(false); |
913 } | 915 } |
914 } | 916 } |
915 CHECK_EQ(limit, current); | 917 CHECK_EQ(limit, current); |
916 return true; | 918 return true; |
917 } | 919 } |
918 } // namespace internal | 920 } // namespace internal |
919 } // namespace v8 | 921 } // namespace v8 |
OLD | NEW |