From 88786fecff336342a56e6f2e7ff3b286be716e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 7 Mar 2018 08:54:53 +0100 Subject: deps: update V8 to 6.5.254.31 PR-URL: https://github.com/nodejs/node/pull/18453 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Yang Guo Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Michael Dawson --- deps/v8/src/wasm/wasm-code-specialization.cc | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'deps/v8/src/wasm/wasm-code-specialization.cc') diff --git a/deps/v8/src/wasm/wasm-code-specialization.cc b/deps/v8/src/wasm/wasm-code-specialization.cc index 40a9dac9a3..416d1d600a 100644 --- a/deps/v8/src/wasm/wasm-code-specialization.cc +++ b/deps/v8/src/wasm/wasm-code-specialization.cc @@ -9,9 +9,9 @@ #include "src/objects-inl.h" #include "src/source-position-table.h" #include "src/wasm/decoder.h" +#include "src/wasm/wasm-code-manager.h" #include "src/wasm/wasm-module.h" #include "src/wasm/wasm-objects-inl.h" -#include "src/wasm/wasm-opcodes.h" namespace v8 { namespace internal { @@ -50,18 +50,19 @@ class PatchDirectCallsHelper { decoder(nullptr, nullptr) { uint32_t func_index = code->index(); WasmCompiledModule* comp_mod = instance->compiled_module(); - func_bytes = comp_mod->module_bytes()->GetChars() + - comp_mod->module()->functions[func_index].code.offset(); + func_bytes = + comp_mod->shared()->module_bytes()->GetChars() + + comp_mod->shared()->module()->functions[func_index].code.offset(); } PatchDirectCallsHelper(WasmInstanceObject* instance, Code* code) : source_pos_it(code->SourcePositionTable()), decoder(nullptr, nullptr) { FixedArray* deopt_data = code->deoptimization_data(); DCHECK_EQ(2, deopt_data->length()); - WasmCompiledModule* comp_mod = instance->compiled_module(); + WasmSharedModuleData* shared = instance->compiled_module()->shared(); int func_index = Smi::ToInt(deopt_data->get(1)); - func_bytes = comp_mod->module_bytes()->GetChars() + - comp_mod->module()->functions[func_index].code.offset(); + func_bytes = shared->module_bytes()->GetChars() + + shared->module()->functions[func_index].code.offset(); } SourcePositionTableIterator source_pos_it; @@ -115,12 +116,12 @@ bool CodeSpecialization::ApplyToWholeInstance( DisallowHeapAllocation no_gc; WasmCompiledModule* compiled_module = instance->compiled_module(); NativeModule* native_module = compiled_module->GetNativeModule(); - FixedArray* code_table = compiled_module->ptr_to_code_table(); - WasmModule* module = compiled_module->module(); - std::vector* wasm_functions = - &compiled_module->module()->functions; + FixedArray* code_table = compiled_module->code_table(); + WasmSharedModuleData* shared = compiled_module->shared(); + WasmModule* module = shared->module(); + std::vector* wasm_functions = &shared->module()->functions; DCHECK_EQ(compiled_module->export_wrappers()->length(), - compiled_module->module()->num_exported_functions); + shared->module()->num_exported_functions); bool changed = false; int func_index = module->num_imported_functions; @@ -131,7 +132,7 @@ bool CodeSpecialization::ApplyToWholeInstance( WasmCodeWrapper wrapper; if (FLAG_wasm_jit_to_native) { const WasmCode* wasm_function = native_module->GetCode(func_index); - if (wasm_function->kind() != WasmCode::Function) { + if (wasm_function->kind() != WasmCode::kFunction) { continue; } wrapper = WasmCodeWrapper(wasm_function); @@ -206,7 +207,7 @@ bool CodeSpecialization::ApplyToWasmCode(WasmCodeWrapper code, if (code.IsCodeObject()) { DCHECK_EQ(Code::WASM_FUNCTION, code.GetCode()->kind()); } else { - DCHECK_EQ(wasm::WasmCode::Function, code.GetWasmCode()->kind()); + DCHECK_EQ(wasm::WasmCode::kFunction, code.GetWasmCode()->kind()); } bool patch_table_size = old_function_table_size || new_function_table_size; @@ -261,8 +262,7 @@ bool CodeSpecialization::ApplyToWasmCode(WasmCodeWrapper code, patch_direct_calls_helper->decoder, patch_direct_calls_helper->func_bytes + byte_pos); FixedArray* code_table = - relocate_direct_calls_instance->compiled_module() - ->ptr_to_code_table(); + relocate_direct_calls_instance->compiled_module()->code_table(); Code* new_code = Code::cast(code_table->get(called_func_index)); it.rinfo()->set_target_address(new_code->GetIsolate(), new_code->instruction_start(), -- cgit v1.2.1