setup-isolate-full.cc 920 Bytes
Newer Older
1 2 3 4 5 6 7
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/setup-isolate.h"

#include "src/base/logging.h"
8
#include "src/debug/debug-evaluate.h"
9
#include "src/heap/heap-inl.h"
10
#include "src/interpreter/interpreter.h"
11 12 13 14 15
#include "src/isolate.h"

namespace v8 {
namespace internal {

16 17
void SetupIsolateDelegate::SetupBuiltins(Isolate* isolate) {
  if (create_heap_objects_) {
18
    SetupBuiltinsInternal(isolate);
19 20 21
#ifdef DEBUG
    DebugEvaluate::VerifyTransitiveBuiltins(isolate);
#endif  // DEBUG
22
  } else {
23
    CHECK(isolate->snapshot_available());
24 25 26
  }
}

27 28 29 30
bool SetupIsolateDelegate::SetupHeap(Heap* heap) {
  if (create_heap_objects_) {
    return SetupHeapInternal(heap);
  } else {
31
    CHECK(heap->isolate()->snapshot_available());
32 33 34 35
    return true;
  }
}

36 37
}  // namespace internal
}  // namespace v8