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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1910213004: [wasm] Replace WasmName by Vector<const char> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-2
Patch Set: nicer bounds check Created 4 years, 8 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 | « no previous file | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 36124f5421012838d49c394658c511984020e848..60fbfbb62c01159818fe57bb31d99e926922abfc 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2680,8 +2680,8 @@ static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
if (isolate->logger()->is_logging_code_events() ||
isolate->cpu_profiler()->is_profiling()) {
ScopedVector<char> buffer(128);
- SNPrintF(buffer, "%s#%d:%.*s", message, index, func_name.length,
- func_name.name);
+ SNPrintF(buffer, "%s#%d:%.*s", message, index, func_name.length(),
+ func_name.start());
Handle<String> name_str =
isolate->factory()->NewStringFromAsciiChecked(buffer.start());
Handle<String> script_str =
@@ -2896,7 +2896,7 @@ std::pair<JSGraph*, SourcePositionTable*> BuildGraphForWasmFunction(
wasm::WasmName name =
module_env->module->GetName(function.name_offset, function.name_length);
SNPrintF(buffer, "Compiling WASM function #%d:%.*s failed:",
- function.func_index, name.length, name.name);
+ function.func_index, name.length(), name.start());
thrower.Failed(buffer.start(), result);
return std::make_pair(nullptr, nullptr);
}
@@ -2955,10 +2955,8 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
#else
FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph;
#endif
- Vector<const char> func_name =
- module_env->module
- ->GetNameOrNull(function.name_offset, function.name_length)
- .toVec();
+ Vector<const char> func_name = module_env->module->GetNameOrNull(
+ function.name_offset, function.name_length);
Vector<char> buffer;
if (func_name.is_empty()) {
if (debugging) {
« no previous file with comments | « no previous file | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698