Commit c32b2020 authored by clemensh's avatar clemensh Committed by Commit bot

Pass debug name as Vector instead of const char*

This allows to also pass non-null-terminated values, and values containing null
characters. Both might happen in wasm.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/1911313002

Cr-Commit-Position: refs/heads/master@{#35795}
parent eee6ddb2
...@@ -278,8 +278,8 @@ static Handle<Code> DoGenerateCode(Stub* stub) { ...@@ -278,8 +278,8 @@ static Handle<Code> DoGenerateCode(Stub* stub) {
timer.Start(); timer.Start();
} }
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
CompilationInfo info(CodeStub::MajorName(stub->MajorKey()), isolate, &zone, CompilationInfo info(CStrVector(CodeStub::MajorName(stub->MajorKey())),
stub->GetCodeFlags()); isolate, &zone, stub->GetCodeFlags());
// Parameter count is number of stack parameters. // Parameter count is number of stack parameters.
int parameter_count = descriptor.GetStackParameterCount(); int parameter_count = descriptor.GetStackParameterCount();
if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) { if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) {
......
...@@ -121,8 +121,8 @@ bool CompilationInfo::has_shared_info() const { ...@@ -121,8 +121,8 @@ bool CompilationInfo::has_shared_info() const {
CompilationInfo::CompilationInfo(ParseInfo* parse_info, CompilationInfo::CompilationInfo(ParseInfo* parse_info,
Handle<JSFunction> closure) Handle<JSFunction> closure)
: CompilationInfo(parse_info, nullptr, Code::ComputeFlags(Code::FUNCTION), : CompilationInfo(parse_info, {}, Code::ComputeFlags(Code::FUNCTION), BASE,
BASE, parse_info->isolate(), parse_info->zone()) { parse_info->isolate(), parse_info->zone()) {
closure_ = closure; closure_ = closure;
// Compiling for the snapshot typically results in different code than // Compiling for the snapshot typically results in different code than
...@@ -139,12 +139,13 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, ...@@ -139,12 +139,13 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info,
if (FLAG_turbo_splitting) MarkAsSplittingEnabled(); if (FLAG_turbo_splitting) MarkAsSplittingEnabled();
} }
CompilationInfo::CompilationInfo(Vector<const char> debug_name,
CompilationInfo::CompilationInfo(const char* debug_name, Isolate* isolate, Isolate* isolate, Zone* zone,
Zone* zone, Code::Flags code_flags) Code::Flags code_flags)
: CompilationInfo(nullptr, debug_name, code_flags, STUB, isolate, zone) {} : CompilationInfo(nullptr, debug_name, code_flags, STUB, isolate, zone) {}
CompilationInfo::CompilationInfo(ParseInfo* parse_info, const char* debug_name, CompilationInfo::CompilationInfo(ParseInfo* parse_info,
Vector<const char> debug_name,
Code::Flags code_flags, Mode mode, Code::Flags code_flags, Mode mode,
Isolate* isolate, Zone* zone) Isolate* isolate, Zone* zone)
: parse_info_(parse_info), : parse_info_(parse_info),
...@@ -165,7 +166,6 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, const char* debug_name, ...@@ -165,7 +166,6 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, const char* debug_name,
osr_expr_stack_height_(0), osr_expr_stack_height_(0),
debug_name_(debug_name) {} debug_name_(debug_name) {}
CompilationInfo::~CompilationInfo() { CompilationInfo::~CompilationInfo() {
DisableFutureOptimization(); DisableFutureOptimization();
delete deferred_handles_; delete deferred_handles_;
...@@ -268,10 +268,11 @@ base::SmartArrayPointer<char> CompilationInfo::GetDebugName() const { ...@@ -268,10 +268,11 @@ base::SmartArrayPointer<char> CompilationInfo::GetDebugName() const {
if (parse_info() && !parse_info()->shared_info().is_null()) { if (parse_info() && !parse_info()->shared_info().is_null()) {
return parse_info()->shared_info()->DebugName()->ToCString(); return parse_info()->shared_info()->DebugName()->ToCString();
} }
const char* str = debug_name_ ? debug_name_ : "unknown"; Vector<const char> name_vec = debug_name_;
size_t len = strlen(str) + 1; if (name_vec.is_empty()) name_vec = ArrayVector("unknown");
base::SmartArrayPointer<char> name(new char[len]); base::SmartArrayPointer<char> name(new char[name_vec.length() + 1]);
memcpy(name.get(), str, len); memcpy(name.get(), name_vec.start(), name_vec.length());
name[name_vec.length()] = '\0';
return name; return name;
} }
......
...@@ -165,7 +165,7 @@ class CompilationInfo { ...@@ -165,7 +165,7 @@ class CompilationInfo {
}; };
CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure);
CompilationInfo(const char* debug_name, Isolate* isolate, Zone* zone, CompilationInfo(Vector<const char> debug_name, Isolate* isolate, Zone* zone,
Code::Flags code_flags = Code::ComputeFlags(Code::STUB)); Code::Flags code_flags = Code::ComputeFlags(Code::STUB));
virtual ~CompilationInfo(); virtual ~CompilationInfo();
...@@ -492,7 +492,7 @@ class CompilationInfo { ...@@ -492,7 +492,7 @@ class CompilationInfo {
STUB STUB
}; };
CompilationInfo(ParseInfo* parse_info, const char* debug_name, CompilationInfo(ParseInfo* parse_info, Vector<const char> debug_name,
Code::Flags code_flags, Mode mode, Isolate* isolate, Code::Flags code_flags, Mode mode, Isolate* isolate,
Zone* zone); Zone* zone);
...@@ -556,7 +556,7 @@ class CompilationInfo { ...@@ -556,7 +556,7 @@ class CompilationInfo {
// The current OSR frame for specialization or {nullptr}. // The current OSR frame for specialization or {nullptr}.
JavaScriptFrame* osr_frame_ = nullptr; JavaScriptFrame* osr_frame_ = nullptr;
const char* debug_name_; Vector<const char> debug_name_;
DISALLOW_COPY_AND_ASSIGN(CompilationInfo); DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
}; };
......
...@@ -1299,7 +1299,7 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, ...@@ -1299,7 +1299,7 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
Graph* graph, Schedule* schedule, Graph* graph, Schedule* schedule,
Code::Flags flags, Code::Flags flags,
const char* debug_name) { const char* debug_name) {
CompilationInfo info(debug_name, isolate, graph->zone(), flags); CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags);
// Construct a pipeline for scheduling and code generation. // Construct a pipeline for scheduling and code generation.
ZonePool zone_pool(isolate->allocator()); ZonePool zone_pool(isolate->allocator());
...@@ -1387,7 +1387,8 @@ OptimizedCompileJob* Pipeline::NewCompilationJob(CompilationInfo* info) { ...@@ -1387,7 +1387,8 @@ OptimizedCompileJob* Pipeline::NewCompilationJob(CompilationInfo* info) {
bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config, bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config,
InstructionSequence* sequence, InstructionSequence* sequence,
bool run_verifier) { bool run_verifier) {
CompilationInfo info("testing", sequence->isolate(), sequence->zone()); CompilationInfo info(ArrayVector("testing"), sequence->isolate(),
sequence->zone());
ZonePool zone_pool(sequence->isolate()->allocator()); ZonePool zone_pool(sequence->isolate()->allocator());
PipelineData data(&zone_pool, &info, sequence); PipelineData data(&zone_pool, &info, sequence);
Pipeline pipeline(&info); Pipeline pipeline(&info);
......
...@@ -2752,14 +2752,14 @@ Handle<JSFunction> CompileJSToWasmWrapper( ...@@ -2752,14 +2752,14 @@ Handle<JSFunction> CompileJSToWasmWrapper(
#else #else
FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph; FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph;
#endif #endif
const char* func_name = "js-to-wasm"; Vector<const char> func_name = ArrayVector("js-to-wasm");
static unsigned id = 0; static unsigned id = 0;
Vector<char> buffer; Vector<char> buffer;
if (debugging) { if (debugging) {
buffer = Vector<char>::New(128); buffer = Vector<char>::New(128);
SNPrintF(buffer, "js-to-wasm#%d", id); int chars = SNPrintF(buffer, "js-to-wasm#%d", id);
func_name = buffer.start(); func_name = Vector<const char>::cast(buffer.SubVector(0, chars));
} }
CompilationInfo info(func_name, isolate, &zone, flags); CompilationInfo info(func_name, isolate, &zone, flags);
...@@ -2828,13 +2828,13 @@ Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module, ...@@ -2828,13 +2828,13 @@ Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module,
#else #else
FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph; FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph;
#endif #endif
const char* func_name = "wasm-to-js"; Vector<const char> func_name = ArrayVector("wasm-to-js");
static unsigned id = 0; static unsigned id = 0;
Vector<char> buffer; Vector<char> buffer;
if (debugging) { if (debugging) {
buffer = Vector<char>::New(128); buffer = Vector<char>::New(128);
SNPrintF(buffer, "wasm-to-js#%d", id); int chars = SNPrintF(buffer, "wasm-to-js#%d", id);
func_name = buffer.start(); func_name = Vector<const char>::cast(buffer.SubVector(0, chars));
} }
CompilationInfo info(func_name, isolate, &zone, flags); CompilationInfo info(func_name, isolate, &zone, flags);
...@@ -2955,15 +2955,19 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate, ...@@ -2955,15 +2955,19 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
#else #else
FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph; FLAG_print_opt_code || FLAG_trace_turbo || FLAG_trace_turbo_graph;
#endif #endif
const char* func_name = "wasm"; Vector<const char> func_name =
module_env->module
->GetNameOrNull(function.name_offset, function.name_length)
.toVec();
Vector<char> buffer; Vector<char> buffer;
if (debugging) { if (func_name.is_empty()) {
buffer = Vector<char>::New(128); if (debugging) {
wasm::WasmName name = buffer = Vector<char>::New(128);
module_env->module->GetName(function.name_offset, function.name_length); int chars = SNPrintF(buffer, "WASM_function_#%d", function.func_index);
SNPrintF(buffer, "WASM_function_#%d:%.*s", function.func_index, name.length, func_name = Vector<const char>::cast(buffer.SubVector(0, chars));
name.name); } else {
func_name = buffer.start(); func_name = ArrayVector("wasm");
}
} }
CompilationInfo info(func_name, isolate, jsgraph->graph()->zone(), flags); CompilationInfo info(func_name, isolate, jsgraph->graph()->zone(), flags);
compiler::ZonePool::Scope pipeline_zone_scope(&zone_pool); compiler::ZonePool::Scope pipeline_zone_scope(&zone_pool);
...@@ -2977,9 +2981,7 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate, ...@@ -2977,9 +2981,7 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
code = Handle<Code>::null(); code = Handle<Code>::null();
} }
if (debugging) { buffer.Dispose();
buffer.Dispose();
}
if (!code.is_null()) { if (!code.is_null()) {
RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, "WASM_function", RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, "WASM_function",
function.func_index, function.func_index,
......
...@@ -24,6 +24,9 @@ class Vector { ...@@ -24,6 +24,9 @@ class Vector {
DCHECK(length == 0 || (length > 0 && data != NULL)); DCHECK(length == 0 || (length > 0 && data != NULL));
} }
template <int N>
explicit Vector(T (&arr)[N]) : start_(arr), length_(N) {}
static Vector<T> New(int length) { static Vector<T> New(int length) {
return Vector<T>(NewArray<T>(length), length); return Vector<T>(NewArray<T>(length), length);
} }
...@@ -201,6 +204,10 @@ inline Vector<char> MutableCStrVector(char* data, int max) { ...@@ -201,6 +204,10 @@ inline Vector<char> MutableCStrVector(char* data, int max) {
return Vector<char>(data, (length < max) ? length : max); return Vector<char>(data, (length < max) ? length : max);
} }
template <typename T, int N>
inline Vector<T> ArrayVector(T (&arr)[N]) {
return Vector<T>(arr);
}
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
...@@ -52,6 +52,10 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& function); ...@@ -52,6 +52,10 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& function);
struct WasmName { struct WasmName {
const char* name; const char* name;
uint32_t length; uint32_t length;
// TODO(clemensh): Remove whole WasmName, replace by Vector<const char>
inline Vector<const char> toVec() const {
return Vector<const char>(name, length);
}
}; };
// TODO(titzer): Renumber all the opcodes to fill in holes. // TODO(titzer): Renumber all the opcodes to fill in holes.
......
...@@ -65,7 +65,7 @@ class RawMachineAssemblerTester : public HandleAndZoneScope, ...@@ -65,7 +65,7 @@ class RawMachineAssemblerTester : public HandleAndZoneScope,
Schedule* schedule = this->Export(); Schedule* schedule = this->Export();
CallDescriptor* call_descriptor = this->call_descriptor(); CallDescriptor* call_descriptor = this->call_descriptor();
Graph* graph = this->graph(); Graph* graph = this->graph();
CompilationInfo info("testing", main_isolate(), main_zone()); CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone());
code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph, code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph,
schedule); schedule);
} }
......
...@@ -277,7 +277,7 @@ class GraphBuilderTester : public HandleAndZoneScope, ...@@ -277,7 +277,7 @@ class GraphBuilderTester : public HandleAndZoneScope,
Zone* zone = graph()->zone(); Zone* zone = graph()->zone();
CallDescriptor* desc = CallDescriptor* desc =
Linkage::GetSimplifiedCDescriptor(zone, this->csig_); Linkage::GetSimplifiedCDescriptor(zone, this->csig_);
CompilationInfo info("testing", main_isolate(), main_zone()); CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone());
code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph()); code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph());
#ifdef ENABLE_DISASSEMBLER #ifdef ENABLE_DISASSEMBLER
if (!code_.is_null() && FLAG_print_opt_code) { if (!code_.is_null() && FLAG_print_opt_code) {
......
...@@ -98,7 +98,8 @@ TEST(TestLinkageStubCall) { ...@@ -98,7 +98,8 @@ TEST(TestLinkageStubCall) {
Isolate* isolate = CcTest::InitIsolateOnce(); Isolate* isolate = CcTest::InitIsolateOnce();
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
ToNumberStub stub(isolate); ToNumberStub stub(isolate);
CompilationInfo info("test", isolate, &zone, Code::ComputeFlags(Code::STUB)); CompilationInfo info(ArrayVector("test"), isolate, &zone,
Code::ComputeFlags(Code::STUB));
CallInterfaceDescriptor interface_descriptor = CallInterfaceDescriptor interface_descriptor =
stub.GetCallInterfaceDescriptor(); stub.GetCallInterfaceDescriptor();
CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
......
...@@ -85,7 +85,8 @@ TEST(ReturnThreeValues) { ...@@ -85,7 +85,8 @@ TEST(ReturnThreeValues) {
Node* mul = m.Int32Mul(p0, p1); Node* mul = m.Int32Mul(p0, p1);
m.Return(add, sub, mul); m.Return(add, sub, mul);
CompilationInfo info("testing", handles.main_isolate(), handles.main_zone()); CompilationInfo info(ArrayVector("testing"), handles.main_isolate(),
handles.main_zone());
Handle<Code> code = Handle<Code> code =
Pipeline::GenerateCodeForTesting(&info, desc, m.graph(), m.Export()); Pipeline::GenerateCodeForTesting(&info, desc, m.graph(), m.Export());
#ifdef ENABLE_DISASSEMBLER #ifdef ENABLE_DISASSEMBLER
......
...@@ -255,7 +255,7 @@ class Int32Signature : public MachineSignature { ...@@ -255,7 +255,7 @@ class Int32Signature : public MachineSignature {
Handle<Code> CompileGraph(const char* name, CallDescriptor* desc, Graph* graph, Handle<Code> CompileGraph(const char* name, CallDescriptor* desc, Graph* graph,
Schedule* schedule = nullptr) { Schedule* schedule = nullptr) {
Isolate* isolate = CcTest::InitIsolateOnce(); Isolate* isolate = CcTest::InitIsolateOnce();
CompilationInfo info("testing", isolate, graph->zone()); CompilationInfo info(ArrayVector("testing"), isolate, graph->zone());
Handle<Code> code = Handle<Code> code =
Pipeline::GenerateCodeForTesting(&info, desc, graph, schedule); Pipeline::GenerateCodeForTesting(&info, desc, graph, schedule);
CHECK(!code.is_null()); CHECK(!code.is_null());
......
...@@ -27,7 +27,7 @@ TEST(RunStringLengthStub) { ...@@ -27,7 +27,7 @@ TEST(RunStringLengthStub) {
// Create code and an accompanying descriptor. // Create code and an accompanying descriptor.
StringLengthStub stub(isolate); StringLengthStub stub(isolate);
Handle<Code> code = stub.GenerateCode(); Handle<Code> code = stub.GenerateCode();
CompilationInfo info("test", isolate, zone, CompilationInfo info(ArrayVector("test"), isolate, zone,
Code::ComputeFlags(Code::HANDLER)); Code::ComputeFlags(Code::HANDLER));
CallInterfaceDescriptor interface_descriptor = CallInterfaceDescriptor interface_descriptor =
stub.GetCallInterfaceDescriptor(); stub.GetCallInterfaceDescriptor();
......
...@@ -589,7 +589,7 @@ static void TestGeneralizeRepresentation( ...@@ -589,7 +589,7 @@ static void TestGeneralizeRepresentation(
// Create new maps by generalizing representation of propX field. // Create new maps by generalizing representation of propX field.
Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate); Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate);
CompilationInfo info("testing", isolate, &zone); CompilationInfo info(ArrayVector("testing"), isolate, &zone);
CHECK(!info.dependencies()->HasAborted()); CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner); info.dependencies()->AssumeFieldType(field_owner);
...@@ -968,7 +968,7 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation( ...@@ -968,7 +968,7 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate); Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
CompilationInfo info("testing", isolate, &zone); CompilationInfo info(ArrayVector("testing"), isolate, &zone);
CHECK(!info.dependencies()->HasAborted()); CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner); info.dependencies()->AssumeFieldType(field_owner);
...@@ -1053,7 +1053,7 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial( ...@@ -1053,7 +1053,7 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate); Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
CompilationInfo info("testing", isolate, &zone); CompilationInfo info(ArrayVector("testing"), isolate, &zone);
CHECK(!info.dependencies()->HasAborted()); CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner); info.dependencies()->AssumeFieldType(field_owner);
......
...@@ -122,13 +122,15 @@ TEST(CollectDetailedWasmStack_WasmError) { ...@@ -122,13 +122,15 @@ TEST(CollectDetailedWasmStack_WasmError) {
TestSignatures sigs; TestSignatures sigs;
TestingModule module; TestingModule module;
WasmFunctionCompiler comp1(sigs.i_v(), &module, "exec_unreachable"); WasmFunctionCompiler comp1(sigs.i_v(), &module,
ArrayVector("exec_unreachable"));
// Set the execution context, such that a runtime error can be thrown. // Set the execution context, such that a runtime error can be thrown.
comp1.SetModuleContext(); comp1.SetModuleContext();
BUILD(comp1, WASM_UNREACHABLE); BUILD(comp1, WASM_UNREACHABLE);
uint32_t wasm_index = comp1.CompileAndAdd(); uint32_t wasm_index = comp1.CompileAndAdd();
WasmFunctionCompiler comp2(sigs.i_v(), &module, "call_exec_unreachable"); WasmFunctionCompiler comp2(sigs.i_v(), &module,
ArrayVector("call_exec_unreachable"));
BUILD(comp2, WASM_CALL_FUNCTION0(wasm_index)); BUILD(comp2, WASM_CALL_FUNCTION0(wasm_index));
uint32_t wasm_index_2 = comp2.CompileAndAdd(); uint32_t wasm_index_2 = comp2.CompileAndAdd();
......
...@@ -382,7 +382,7 @@ class WasmFunctionWrapper : public HandleAndZoneScope, ...@@ -382,7 +382,7 @@ class WasmFunctionWrapper : public HandleAndZoneScope,
r.LowerGraph(); r.LowerGraph();
} }
CompilationInfo info("testing", isolate, graph()->zone()); CompilationInfo info(ArrayVector("testing"), isolate, graph()->zone());
code_ = code_ =
Pipeline::GenerateCodeForTesting(&info, descriptor, graph(), nullptr); Pipeline::GenerateCodeForTesting(&info, descriptor, graph(), nullptr);
CHECK(!code_.is_null()); CHECK(!code_.is_null());
...@@ -412,8 +412,9 @@ class WasmFunctionWrapper : public HandleAndZoneScope, ...@@ -412,8 +412,9 @@ class WasmFunctionWrapper : public HandleAndZoneScope,
class WasmFunctionCompiler : public HandleAndZoneScope, class WasmFunctionCompiler : public HandleAndZoneScope,
private GraphAndBuilders { private GraphAndBuilders {
public: public:
explicit WasmFunctionCompiler(FunctionSig* sig, TestingModule* module, explicit WasmFunctionCompiler(
const char* debug_name = "<WASM UNNAMED>") FunctionSig* sig, TestingModule* module,
Vector<const char> debug_name = ArrayVector("<WASM UNNAMED>"))
: GraphAndBuilders(main_zone()), : GraphAndBuilders(main_zone()),
jsgraph(this->isolate(), this->graph(), this->common(), nullptr, jsgraph(this->isolate(), this->graph(), this->common(), nullptr,
nullptr, this->machine()), nullptr, this->machine()),
...@@ -443,7 +444,7 @@ class WasmFunctionCompiler : public HandleAndZoneScope, ...@@ -443,7 +444,7 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
// The call descriptor is initialized when the function is compiled. // The call descriptor is initialized when the function is compiled.
CallDescriptor* descriptor_; CallDescriptor* descriptor_;
TestingModule* testing_module_; TestingModule* testing_module_;
const char* debug_name_; Vector<const char> debug_name_;
WasmFunction* function_; WasmFunction* function_;
int function_index_; int function_index_;
LocalDeclEncoder local_decls; LocalDeclEncoder local_decls;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment