summaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm/wasm-code-specialization.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-07 08:54:53 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-07 16:48:52 +0100
commit88786fecff336342a56e6f2e7ff3b286be716e47 (patch)
tree92e6ba5b8ac8dae1a058988d20c9d27bfa654390 /deps/v8/src/wasm/wasm-code-specialization.cc
parent4e86f9b5ab83cbabf43839385bf383e6a7ef7d19 (diff)
downloadnode-new-88786fecff336342a56e6f2e7ff3b286be716e47.tar.gz
deps: update V8 to 6.5.254.31
PR-URL: https://github.com/nodejs/node/pull/18453 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/v8/src/wasm/wasm-code-specialization.cc')
-rw-r--r--deps/v8/src/wasm/wasm-code-specialization.cc30
1 files changed, 15 insertions, 15 deletions
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<WasmFunction>* wasm_functions =
- &compiled_module->module()->functions;
+ FixedArray* code_table = compiled_module->code_table();
+ WasmSharedModuleData* shared = compiled_module->shared();
+ WasmModule* module = shared->module();
+ std::vector<WasmFunction>* 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(),