Commit d184d735 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[simulator] Simplify simulator initialization sequence.

R=clemensh@chromium.org

Change-Id: I80201b16c5d7a373ae5ff56bfafb46f4425bf997
Reviewed-on: https://chromium-review.googlesource.com/824243
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50082}
parent 7cdfb6df
......@@ -646,7 +646,6 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
i_cache_ = new base::CustomMatcherHashMap(&ICacheMatch);
isolate_->set_simulator_i_cache(i_cache_);
}
Initialize(isolate);
// Set up simulator support first. Some of this information is needed to
// setup the architecture state.
size_t stack_size = 1 * 1024*1024; // allocate 1MB for stack
......
......@@ -2899,10 +2899,7 @@ bool Isolate::Init(StartupDeserializer* des) {
// Initialize other runtime facilities
#if defined(USE_SIMULATOR)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390
Simulator::Initialize(this);
#endif
#endif
{ // NOLINT
......
......@@ -385,7 +385,6 @@ class ThreadLocalTop BASE_EMBEDDED {
#if USE_SIMULATOR
#define ISOLATE_INIT_SIMULATOR_LIST(V) \
V(bool, simulator_initialized, false) \
V(base::CustomMatcherHashMap*, simulator_i_cache, nullptr)
#else
......
......@@ -884,7 +884,6 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
i_cache_ = new base::CustomMatcherHashMap(&ICacheMatch);
isolate_->set_simulator_i_cache(i_cache_);
}
Initialize(isolate);
// Set up simulator support first. Some of this information is needed to
// setup the architecture state.
stack_ = reinterpret_cast<char*>(malloc(stack_size_));
......
......@@ -815,7 +815,6 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
i_cache_ = new base::CustomMatcherHashMap(&ICacheMatch);
isolate_->set_simulator_i_cache(i_cache_);
}
Initialize(isolate);
// Set up simulator support first. Some of this information is needed to
// setup the architecture state.
stack_size_ = FLAG_sim_stack_size * KB;
......
......@@ -739,7 +739,6 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
i_cache_ = new base::CustomMatcherHashMap(&ICacheMatch);
isolate_->set_simulator_i_cache(i_cache_);
}
Initialize(isolate);
// Set up simulator support first. Some of this information is needed to
// setup the architecture state.
#if V8_TARGET_ARCH_PPC64
......
......@@ -1484,7 +1484,6 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
i_cache_ = new base::CustomMatcherHashMap(&ICacheMatch);
isolate_->set_simulator_i_cache(i_cache_);
}
Initialize(isolate);
static base::OnceType once = V8_ONCE_INIT;
base::CallOnce(&once, &Simulator::EvalTableInit);
// Set up simulator support first. Some of this information is needed to
......
......@@ -26,8 +26,6 @@ void SimulatorBase::InitializeOncePerProcess() {
// static
void SimulatorBase::Initialize(Isolate* isolate) {
if (isolate->simulator_initialized()) return;
isolate->set_simulator_initialized(true);
ExternalReference::set_redirector(isolate, &RedirectExternalReference);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment