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

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: 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
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 69699eacf48c8b25a78e37b0fe00b153f6286dc2..ca5a208801c73868314a588d6464a053a6b821e8 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2683,13 +2683,13 @@ void WasmGraphBuilder::SetSourcePosition(Node* node, int position) {
static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
CompilationInfo* info,
const char* message, uint32_t index,
- wasm::WasmName func_name) {
+ Vector<const char> func_name) {
Isolate* isolate = info->isolate();
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 =
@@ -2795,8 +2795,8 @@ Handle<JSFunction> CompileJSToWasmWrapper(
Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module,
Handle<JSFunction> function,
wasm::FunctionSig* sig,
- wasm::WasmName module_name,
- wasm::WasmName function_name) {
+ Vector<const char> module_name,
+ Vector<const char> function_name) {
//----------------------------------------------------------------------------
// Create the Graph
//----------------------------------------------------------------------------
@@ -2914,10 +2914,10 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
}
// Add the function as another context for the exception
ScopedVector<char> buffer(128);
- wasm::WasmName name =
+ Vector<const char> 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 Handle<Code>::null();
}
@@ -2950,10 +2950,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 | « src/compiler/wasm-compiler.h ('k') | src/wasm/wasm-module.h » ('j') | src/wasm/wasm-opcodes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698