[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: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50082}
This commit is contained in:
parent
7cdfb6df23
commit
d184d7353d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user