• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/init/setup-isolate.h"
6 
7 #include "src/base/logging.h"
8 #include "src/debug/debug-evaluate.h"
9 #include "src/execution/isolate.h"
10 #include "src/heap/heap-inl.h"
11 #include "src/interpreter/interpreter.h"
12 
13 namespace v8 {
14 namespace internal {
15 
SetupBuiltins(Isolate * isolate)16 void SetupIsolateDelegate::SetupBuiltins(Isolate* isolate) {
17   if (create_heap_objects_) {
18     SetupBuiltinsInternal(isolate);
19 #ifdef DEBUG
20     DebugEvaluate::VerifyTransitiveBuiltins(isolate);
21 #endif  // DEBUG
22   } else {
23     CHECK(isolate->snapshot_available());
24   }
25 }
26 
SetupHeap(Heap * heap)27 bool SetupIsolateDelegate::SetupHeap(Heap* heap) {
28   if (create_heap_objects_) {
29     return SetupHeapInternal(heap);
30   } else {
31     CHECK(heap->isolate()->snapshot_available());
32     return true;
33   }
34 }
35 
36 }  // namespace internal
37 }  // namespace v8
38