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

[wasm] Remove unused {WasmCompiledModule::function_tables} field.

R=clemensh@chromium.org
BUG=v8:7549

Change-Id: Ied73ba2c146441c87c5ada65285037b68a83abe1
Reviewed-on: https://chromium-review.googlesource.com/962026Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51925}
parent c54d93d6
......@@ -1487,8 +1487,6 @@ void WasmCompiledModule::WasmCompiledModuleVerify() {
VerifyObjectField(kNativeModuleOffset);
VerifyObjectField(kLazyCompileDataOffset);
VerifyObjectField(kUseTrapHandlerOffset);
VerifyObjectField(kFunctionTablesOffset);
VerifyObjectField(kEmptyFunctionTablesOffset);
}
void WasmDebugInfo::WasmDebugInfoVerify() {
......
......@@ -138,8 +138,6 @@ WCM_OBJECT(FixedArray, source_positions, kSourcePositionsOffset)
WCM_OBJECT(Foreign, native_module, kNativeModuleOffset)
WCM_OBJECT(FixedArray, lazy_compile_data, kLazyCompileDataOffset)
WCM_SMALL_CONST_NUMBER(bool, use_trap_handler, kUseTrapHandlerOffset)
WCM_OBJECT(FixedArray, function_tables, kFunctionTablesOffset)
WCM_OBJECT(FixedArray, empty_function_tables, kEmptyFunctionTablesOffset)
ACCESSORS(WasmCompiledModule, raw_next_instance, Object, kNextInstanceOffset);
ACCESSORS(WasmCompiledModule, raw_prev_instance, Object, kPrevInstanceOffset);
......
......@@ -1234,12 +1234,6 @@ Handle<WasmCompiledModule> WasmCompiledModule::Clone(
ret->set_lazy_compile_data(module->lazy_compile_data());
}
ret->set_use_trap_handler(module->use_trap_handler());
if (module->has_function_tables()) {
ret->set_function_tables(module->function_tables());
}
if (module->has_empty_function_tables()) {
ret->set_empty_function_tables(module->empty_function_tables());
}
Handle<FixedArray> export_copy = isolate->factory()->CopyFixedArray(
handle(module->export_wrappers(), isolate));
......@@ -1268,27 +1262,6 @@ Handle<WasmCompiledModule> WasmCompiledModule::Clone(
return ret;
}
void WasmCompiledModule::SetTableValue(Isolate* isolate,
Handle<FixedArray> table, int index,
Address value) {
Handle<HeapNumber> number = isolate->factory()->NewHeapNumber(
static_cast<double>(reinterpret_cast<size_t>(value)), MUTABLE, TENURED);
table->set(index, *number);
}
void WasmCompiledModule::UpdateTableValue(FixedArray* table, int index,
Address value) {
DisallowHeapAllocation no_gc;
HeapNumber::cast(table->get(index))
->set_value(static_cast<double>(reinterpret_cast<size_t>(value)));
}
Address WasmCompiledModule::GetTableValue(FixedArray* table, int index) {
DisallowHeapAllocation no_gc;
double value = HeapNumber::cast(table->get(index))->value();
return reinterpret_cast<Address>(static_cast<size_t>(value));
}
wasm::NativeModule* WasmCompiledModule::GetNativeModule() const {
if (!has_native_module()) return nullptr;
return Managed<wasm::NativeModule>::cast(native_module())->get();
......
......@@ -434,8 +434,6 @@ class WasmCompiledModule : public Struct {
V(kNativeModuleOffset, kPointerSize) \
V(kLazyCompileDataOffset, kPointerSize) \
V(kUseTrapHandlerOffset, kPointerSize) \
V(kFunctionTablesOffset, kPointerSize) \
V(kEmptyFunctionTablesOffset, kPointerSize) \
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
......@@ -486,8 +484,6 @@ class WasmCompiledModule : public Struct {
WCM_OBJECT(FixedArray, lazy_compile_data)
// TODO(mstarzinger): Make {use_trap_handler} smaller.
WCM_SMALL_CONST_NUMBER(bool, use_trap_handler)
WCM_OBJECT(FixedArray, function_tables)
WCM_CONST_OBJECT(FixedArray, empty_function_tables)
public:
static Handle<WasmCompiledModule> New(
......@@ -522,13 +518,6 @@ class WasmCompiledModule : public Struct {
static bool SetBreakPoint(Handle<WasmCompiledModule>, int* position,
Handle<BreakPoint> break_point);
// TODO(mstarzinger): following 4 unnecessary after we're done with
// FLAG_wasm_jit_to_native
static void SetTableValue(Isolate* isolate, Handle<FixedArray> table,
int index, Address value);
static void UpdateTableValue(FixedArray* table, int index, Address value);
static Address GetTableValue(FixedArray* table, int index);
void LogWasmCodes(Isolate* isolate);
private:
......
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