diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/wasm/wasm-debug-evaluate.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/wasm/wasm-debug-evaluate.cc')
-rw-r--r-- | chromium/v8/src/wasm/wasm-debug-evaluate.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/chromium/v8/src/wasm/wasm-debug-evaluate.cc b/chromium/v8/src/wasm/wasm-debug-evaluate.cc index 019ae5f73ec..a8c4cf2c40d 100644 --- a/chromium/v8/src/wasm/wasm-debug-evaluate.cc +++ b/chromium/v8/src/wasm/wasm-debug-evaluate.cc @@ -9,6 +9,7 @@ #include "src/api/api-inl.h" #include "src/codegen/machine-type.h" +#include "src/compiler/wasm-compiler.h" #include "src/execution/frames-inl.h" #include "src/wasm/value-type.h" #include "src/wasm/wasm-arguments.h" @@ -33,15 +34,15 @@ static bool CheckSignature(ValueType return_type, const FunctionSig* sig, ErrorThrower* thrower) { if (sig->return_count() != 1 && return_type != kWasmBottom) { thrower->CompileError("Invalid return type. Got none, expected %s", - return_type.type_name()); + return_type.type_name().c_str()); return false; } if (sig->return_count() == 1) { if (sig->GetReturn(0) != return_type) { thrower->CompileError("Invalid return type. Got %s, expected %s", - sig->GetReturn(0).type_name(), - return_type.type_name()); + sig->GetReturn(0).type_name().c_str(), + return_type.type_name().c_str()); return false; } } @@ -56,7 +57,8 @@ static bool CheckSignature(ValueType return_type, if (sig->GetParam(p) != argument_type) { thrower->CompileError( "Invalid argument type for argument %zu. Got %s, expected %s", p, - sig->GetParam(p).type_name(), argument_type.type_name()); + sig->GetParam(p).type_name().c_str(), + argument_type.type_name().c_str()); return false; } ++p; @@ -202,8 +204,8 @@ class DebugEvaluatorProxy { DCHECK(frame_->is_wasm()); wasm::DebugInfo* debug_info = WasmFrame::cast(frame_)->native_module()->GetDebugInfo(); - return debug_info->GetLocalValue(local, isolate_, frame_->pc(), - frame_->fp(), frame_->callee_fp()); + return debug_info->GetLocalValue(local, frame_->pc(), frame_->fp(), + frame_->callee_fp()); } uint32_t GetArgAsUInt32(const v8::FunctionCallbackInfo<v8::Value>& args, @@ -350,10 +352,10 @@ Maybe<std::string> DebugEvaluateImpl( Handle<WasmExportedFunction> entry_point = Handle<WasmExportedFunction>::cast(entry_point_obj); - Handle<WasmDebugInfo> debug_info = - WasmInstanceObject::GetOrCreateDebugInfo(evaluator_instance); + // TODO(wasm): Cache this code. Handle<Code> wasm_entry = - WasmDebugInfo::GetCWasmEntry(debug_info, entry_point->sig()); + compiler::CompileCWasmEntry(isolate, entry_point->sig()); + CWasmArgumentsPacker packer(4 /* uint32_t return value, no parameters. */); Execution::CallWasm(isolate, wasm_entry, entry_point->GetWasmCallTarget(), evaluator_instance, packer.argv()); |