Commit 595f1428 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Remove obsolete specialization zone.

R=clemensh@chromium.org

Change-Id: Iac827a4fc82f9b810af9d67c4aa5757925edc3c5
Reviewed-on: https://chromium-review.googlesource.com/997742Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52399}
parent 0340874b
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "src/code-stubs.h" #include "src/code-stubs.h"
#include "src/compiler/wasm-compiler.h" #include "src/compiler/wasm-compiler.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/identity-map.h"
#include "src/property-descriptor.h" #include "src/property-descriptor.h"
#include "src/trap-handler/trap-handler.h" #include "src/trap-handler/trap-handler.h"
#include "src/wasm/compilation-manager.h" #include "src/wasm/compilation-manager.h"
...@@ -578,8 +579,7 @@ const wasm::WasmCode* LazyCompilationOrchestrator::CompileFunction( ...@@ -578,8 +579,7 @@ const wasm::WasmCode* LazyCompilationOrchestrator::CompileFunction(
CHECK(!thrower.error()); CHECK(!thrower.error());
// Now specialize the generated code for this instance. // Now specialize the generated code for this instance.
Zone specialization_zone(isolate->allocator(), ZONE_NAME); CodeSpecialization code_specialization;
CodeSpecialization code_specialization(isolate, &specialization_zone);
code_specialization.RelocateDirectCalls(compiled_module->GetNativeModule()); code_specialization.RelocateDirectCalls(compiled_module->GetNativeModule());
code_specialization.ApplyToWasmCode(wasm_code, SKIP_ICACHE_FLUSH); code_specialization.ApplyToWasmCode(wasm_code, SKIP_ICACHE_FLUSH);
int64_t func_size = int64_t func_size =
...@@ -1641,8 +1641,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() { ...@@ -1641,8 +1641,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// Create the WebAssembly.Instance object. // Create the WebAssembly.Instance object.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
Zone instantiation_zone(isolate_->allocator(), ZONE_NAME); CodeSpecialization code_specialization;
CodeSpecialization code_specialization(isolate_, &instantiation_zone);
Handle<WasmInstanceObject> instance = Handle<WasmInstanceObject> instance =
WasmInstanceObject::New(isolate_, compiled_module_); WasmInstanceObject::New(isolate_, compiled_module_);
......
...@@ -59,7 +59,7 @@ class PatchDirectCallsHelper { ...@@ -59,7 +59,7 @@ class PatchDirectCallsHelper {
} // namespace } // namespace
CodeSpecialization::CodeSpecialization(Isolate* isolate, Zone* zone) {} CodeSpecialization::CodeSpecialization() {}
CodeSpecialization::~CodeSpecialization() {} CodeSpecialization::~CodeSpecialization() {}
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define V8_WASM_WASM_CODE_SPECIALIZATION_H_ #define V8_WASM_WASM_CODE_SPECIALIZATION_H_
#include "src/assembler.h" #include "src/assembler.h"
#include "src/identity-map.h"
#include "src/wasm/decoder.h" #include "src/wasm/decoder.h"
#include "src/wasm/wasm-objects.h" #include "src/wasm/wasm-objects.h"
...@@ -25,7 +24,7 @@ uint32_t ExtractDirectCallIndex(wasm::Decoder& decoder, const byte* pc); ...@@ -25,7 +24,7 @@ uint32_t ExtractDirectCallIndex(wasm::Decoder& decoder, const byte* pc);
// Patch* methods, then apply all changes in one step using the Apply* methods. // Patch* methods, then apply all changes in one step using the Apply* methods.
class CodeSpecialization { class CodeSpecialization {
public: public:
CodeSpecialization(Isolate*, Zone*); CodeSpecialization();
~CodeSpecialization(); ~CodeSpecialization();
// Update WasmContext references. // Update WasmContext references.
......
...@@ -1346,8 +1346,7 @@ void WasmCompiledModule::Reset(Isolate* isolate, ...@@ -1346,8 +1346,7 @@ void WasmCompiledModule::Reset(Isolate* isolate,
// Patch code to update memory references, global references, and function // Patch code to update memory references, global references, and function
// table references. // table references.
Zone specialization_zone(isolate->allocator(), ZONE_NAME); wasm::CodeSpecialization code_specialization;
wasm::CodeSpecialization code_specialization(isolate, &specialization_zone);
if (compiled_module->has_lazy_compile_data()) { if (compiled_module->has_lazy_compile_data()) {
for (int i = 0, e = compiled_module->lazy_compile_data()->length(); i < e; for (int i = 0, e = compiled_module->lazy_compile_data()->length(); i < e;
......
...@@ -204,8 +204,7 @@ class TestingModuleBuilder { ...@@ -204,8 +204,7 @@ class TestingModuleBuilder {
Address globals_start() { return reinterpret_cast<Address>(globals_data_); } Address globals_start() { return reinterpret_cast<Address>(globals_data_); }
void Link() { void Link() {
if (!linked_) { if (!linked_) {
Zone specialization_zone(isolate()->allocator(), ZONE_NAME); CodeSpecialization code_specialization;
CodeSpecialization code_specialization(isolate(), &specialization_zone);
code_specialization.RelocateDirectCalls(native_module_); code_specialization.RelocateDirectCalls(native_module_);
code_specialization.ApplyToWholeModule(native_module_); code_specialization.ApplyToWholeModule(native_module_);
linked_ = true; linked_ = true;
......
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