Line data Source code
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 "test/cctest/setup-isolate-for-tests.h"
6 :
7 : #include "src/interpreter/setup-interpreter.h"
8 :
9 : namespace v8 {
10 : namespace internal {
11 :
12 155 : void SetupIsolateDelegateForTests::SetupBuiltins(Isolate* isolate) {
13 155 : if (create_heap_objects_) {
14 30 : SetupBuiltinsInternal(isolate);
15 : }
16 155 : }
17 :
18 155 : void SetupIsolateDelegateForTests::SetupInterpreter(
19 : interpreter::Interpreter* interpreter) {
20 155 : if (create_heap_objects_) {
21 30 : interpreter::SetupInterpreter::InstallBytecodeHandlers(interpreter);
22 : }
23 155 : }
24 :
25 155 : bool SetupIsolateDelegateForTests::SetupHeap(Heap* heap) {
26 155 : if (create_heap_objects_) {
27 30 : return SetupHeapInternal(heap);
28 : }
29 : return true;
30 : }
31 :
32 : } // namespace internal
33 : } // namespace v8
|