summaryrefslogtreecommitdiff
path: root/deps/v8/src/snapshot/startup-deserializer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/snapshot/startup-deserializer.cc')
-rw-r--r--deps/v8/src/snapshot/startup-deserializer.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/deps/v8/src/snapshot/startup-deserializer.cc b/deps/v8/src/snapshot/startup-deserializer.cc
index a6e9d6a203..91432e185a 100644
--- a/deps/v8/src/snapshot/startup-deserializer.cc
+++ b/deps/v8/src/snapshot/startup-deserializer.cc
@@ -18,7 +18,8 @@ void StartupDeserializer::DeserializeInto(Isolate* isolate) {
BuiltinDeserializer builtin_deserializer(isolate, builtin_data_);
- if (!Deserializer::ReserveSpace(this, &builtin_deserializer)) {
+ if (!DefaultDeserializerAllocator::ReserveSpace(this,
+ &builtin_deserializer)) {
V8::FatalProcessOutOfMemory("StartupDeserializer");
}
@@ -33,18 +34,17 @@ void StartupDeserializer::DeserializeInto(Isolate* isolate) {
{
DisallowHeapAllocation no_gc;
-
- isolate->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG_ROOT_LIST);
isolate->heap()->IterateSmiRoots(this);
isolate->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG);
isolate->heap()->RepairFreeListsAfterDeserialization();
isolate->heap()->IterateWeakRoots(this, VISIT_ALL);
DeserializeDeferredObjects();
RestoreExternalReferenceRedirectors(accessor_infos());
+ RestoreExternalReferenceRedirectors(call_handler_infos());
// Deserialize eager builtins from the builtin snapshot. Note that deferred
// objects must have been deserialized prior to this.
- builtin_deserializer.DeserializeEagerBuiltins();
+ builtin_deserializer.DeserializeEagerBuiltinsAndHandlers();
// Flush the instruction cache for the entire code-space. Must happen after
// builtins deserialization.
@@ -71,7 +71,7 @@ void StartupDeserializer::DeserializeInto(Isolate* isolate) {
// to display the builtin names.
PrintDisassembledCodeObjects();
- if (FLAG_rehash_snapshot && can_rehash()) Rehash();
+ if (FLAG_rehash_snapshot && can_rehash()) RehashHeap();
}
void StartupDeserializer::FlushICacheForNewIsolate() {
@@ -93,7 +93,7 @@ void StartupDeserializer::PrintDisassembledCodeObjects() {
CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer());
OFStream os(tracing_scope.file());
- for (HeapObject* obj = iterator.next(); obj != NULL;
+ for (HeapObject* obj = iterator.next(); obj != nullptr;
obj = iterator.next()) {
if (obj->IsCode()) {
Code::cast(obj)->Disassemble(nullptr, os);
@@ -103,12 +103,10 @@ void StartupDeserializer::PrintDisassembledCodeObjects() {
#endif
}
-void StartupDeserializer::Rehash() {
+void StartupDeserializer::RehashHeap() {
DCHECK(FLAG_rehash_snapshot && can_rehash());
isolate()->heap()->InitializeHashSeed();
- isolate()->heap()->string_table()->Rehash();
- isolate()->heap()->weak_object_to_code_table()->Rehash();
- SortMapDescriptors();
+ Rehash();
}
} // namespace internal