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

[wasm] Remove {NativeModule::LinkAll} test-only method.

R=clemensh@chromium.org

Change-Id: Iee10287cdd157d5a62d75624d5099919d8e0a55d
Reviewed-on: https://chromium-review.googlesource.com/973168Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52114}
parent 1399fd8a
......@@ -16,7 +16,6 @@
#include "src/globals.h"
#include "src/macro-assembler.h"
#include "src/objects-inl.h"
#include "src/wasm/wasm-code-specialization.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects-inl.h"
#include "src/wasm/wasm-objects.h"
......@@ -578,14 +577,6 @@ Address NativeModule::GetLocalAddressFor(Handle<Code> code) {
}
}
void NativeModule::LinkAll() {
Isolate* isolate = compiled_module()->GetIsolate();
Zone specialization_zone(isolate->allocator(), ZONE_NAME);
CodeSpecialization code_specialization(isolate, &specialization_zone);
code_specialization.RelocateDirectCalls(this);
code_specialization.ApplyToWholeModule(this);
}
Address NativeModule::AllocateForCode(size_t size) {
// this happens under a lock assumed by the caller.
size = RoundUp(size, kCodeAlignment);
......
......@@ -14,7 +14,6 @@
#include "src/handles.h"
#include "src/trap-handler/trap-handler.h"
#include "src/vector.h"
#include "src/wasm/module-compiler.h"
namespace v8 {
......@@ -244,7 +243,6 @@ class V8_EXPORT_PRIVATE NativeModule final {
// For cctests, where we build both WasmModule and the runtime objects
// on the fly, and bypass the instance builder pipeline.
void ResizeCodeTableForTest(size_t);
void LinkAll();
CompilationState* compilation_state() { return compilation_state_.get(); }
......
......@@ -26,6 +26,7 @@
#include "src/wasm/function-body-decoder.h"
#include "src/wasm/local-decl-encoder.h"
#include "src/wasm/wasm-code-manager.h"
#include "src/wasm/wasm-code-specialization.h"
#include "src/wasm/wasm-external-refs.h"
#include "src/wasm/wasm-interpreter.h"
#include "src/wasm/wasm-js.h"
......@@ -203,7 +204,10 @@ class TestingModuleBuilder {
Address globals_start() { return reinterpret_cast<Address>(globals_data_); }
void Link() {
if (!linked_) {
native_module_->LinkAll();
Zone specialization_zone(isolate()->allocator(), ZONE_NAME);
CodeSpecialization code_specialization(isolate(), &specialization_zone);
code_specialization.RelocateDirectCalls(native_module_);
code_specialization.ApplyToWholeModule(native_module_);
linked_ = true;
native_module_->SetExecutable(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