1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/setup-isolate.h"
6 
7 #include "src/base/logging.h"
8 #include "src/interpreter/interpreter.h"
9 #include "src/isolate.h"
10 #include "src/ostreams.h"
11 
12 namespace v8 {
13 namespace internal {
14 
SetupBuiltins(Isolate * isolate)15 void SetupIsolateDelegate::SetupBuiltins(Isolate* isolate) {
16   CHECK(!create_heap_objects_);
17   // No actual work to be done; builtins will be deserialized from the snapshot.
18 }
19 
SetupInterpreter(interpreter::Interpreter * interpreter)20 void SetupIsolateDelegate::SetupInterpreter(
21     interpreter::Interpreter* interpreter) {
22 #if defined(V8_USE_SNAPSHOT) && !defined(V8_USE_SNAPSHOT_WITH_UNWINDING_INFO)
23   if (FLAG_perf_prof_unwinding_info) {
24     StdoutStream{}
25         << "Warning: The --perf-prof-unwinding-info flag can be passed at "
26            "mksnapshot time to get better results."
27         << std::endl;
28   }
29 #endif
30   CHECK(interpreter->IsDispatchTableInitialized());
31 }
32 
SetupHeap(Heap * heap)33 bool SetupIsolateDelegate::SetupHeap(Heap* heap) {
34   CHECK(!create_heap_objects_);
35   // No actual work to be done; heap will be deserialized from the snapshot.
36   return true;
37 }
38 
39 }  // namespace internal
40 }  // namespace v8
41