v8/test/cctest/setup-isolate-for-tests.cc
Yang Guo d4c6c7561c [heap] remove heap init from shipping binary.
This reduces the arm32 binary by around 20kB.

R=jkummerow@chromium.org, mstarzinger@chromium.org

Bug: v8:6055
Change-Id: If9098e49793b29dceb8292aff6f668ca28a07728
Reviewed-on: https://chromium-review.googlesource.com/652427
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47863}
2017-09-07 05:24:49 +00:00

34 lines
844 B
C++

// 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 "test/cctest/setup-isolate-for-tests.h"
#include "src/interpreter/setup-interpreter.h"
namespace v8 {
namespace internal {
void SetupIsolateDelegateForTests::SetupBuiltins(Isolate* isolate) {
if (create_heap_objects_) {
SetupBuiltinsInternal(isolate);
}
}
void SetupIsolateDelegateForTests::SetupInterpreter(
interpreter::Interpreter* interpreter) {
if (create_heap_objects_) {
interpreter::SetupInterpreter::InstallBytecodeHandlers(interpreter);
}
}
bool SetupIsolateDelegateForTests::SetupHeap(Heap* heap) {
if (create_heap_objects_) {
return SetupHeapInternal(heap);
}
return true;
}
} // namespace internal
} // namespace v8