Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: src/wasm/module-decoder.cc

Issue 2651903002: [wasm] No need to use multiple inheritance for `ModuleBytesEnv` (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index d3c08bde527028a6c9ac5a742d0571b05aae2d98..d3feb4c3571b62f673ad90ccefc26ea80b907680 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -780,21 +780,22 @@ class ModuleDecoder : public Decoder {
// Verifies the body (code) of a given function.
void VerifyFunctionBody(uint32_t func_num, ModuleBytesEnv* menv,
WasmFunction* function) {
+ WasmFunctionName func_name(function,
+ menv->wire_bytes.GetNameOrNull(function));
if (FLAG_trace_wasm_decoder || FLAG_trace_wasm_decode_time) {
OFStream os(stdout);
- os << "Verifying WASM function " << WasmFunctionName(function, menv)
- << std::endl;
+ os << "Verifying WASM function " << func_name << std::endl;
}
FunctionBody body = {function->sig, start_,
start_ + function->code_start_offset,
start_ + function->code_end_offset};
- DecodeResult result =
- VerifyWasmCode(module_zone->allocator(),
- menv == nullptr ? nullptr : menv->module, body);
+ DecodeResult result = VerifyWasmCode(
+ module_zone->allocator(),
+ menv == nullptr ? nullptr : menv->module_env.module, body);
if (result.failed()) {
// Wrap the error message from the function decoder.
std::ostringstream str;
- str << "in function " << WasmFunctionName(function, menv) << ": ";
+ str << "in function " << func_name << ": ";
str << result;
std::string strval = str.str();
const char* raw = strval.c_str();
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698