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

Side by Side Diff: src/compiler/pipeline.cc

Issue 1911313002: Pass debug name as Vector instead of const char* (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-1
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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 1315
1316 Handle<Code> code = pipeline.ScheduleAndGenerateCode(call_descriptor); 1316 Handle<Code> code = pipeline.ScheduleAndGenerateCode(call_descriptor);
1317 return code; 1317 return code;
1318 } 1318 }
1319 1319
1320 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, 1320 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
1321 CallDescriptor* call_descriptor, 1321 CallDescriptor* call_descriptor,
1322 Graph* graph, Schedule* schedule, 1322 Graph* graph, Schedule* schedule,
1323 Code::Flags flags, 1323 Code::Flags flags,
1324 const char* debug_name) { 1324 const char* debug_name) {
1325 CompilationInfo info(debug_name, isolate, graph->zone(), flags); 1325 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags);
1326 1326
1327 // Construct a pipeline for scheduling and code generation. 1327 // Construct a pipeline for scheduling and code generation.
1328 ZonePool zone_pool(isolate->allocator()); 1328 ZonePool zone_pool(isolate->allocator());
1329 PipelineData data(&zone_pool, &info, graph, schedule); 1329 PipelineData data(&zone_pool, &info, graph, schedule);
1330 base::SmartPointer<PipelineStatistics> pipeline_statistics; 1330 base::SmartPointer<PipelineStatistics> pipeline_statistics;
1331 if (FLAG_turbo_stats) { 1331 if (FLAG_turbo_stats) {
1332 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool)); 1332 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool));
1333 pipeline_statistics->BeginPhaseKind("stub codegen"); 1333 pipeline_statistics->BeginPhaseKind("stub codegen");
1334 } 1334 }
1335 1335
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 return pipeline.ScheduleAndGenerateCode(call_descriptor); 1384 return pipeline.ScheduleAndGenerateCode(call_descriptor);
1385 } 1385 }
1386 1386
1387 OptimizedCompileJob* Pipeline::NewCompilationJob(CompilationInfo* info) { 1387 OptimizedCompileJob* Pipeline::NewCompilationJob(CompilationInfo* info) {
1388 return new (info->zone()) PipelineCompilationJob(info); 1388 return new (info->zone()) PipelineCompilationJob(info);
1389 } 1389 }
1390 1390
1391 bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config, 1391 bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config,
1392 InstructionSequence* sequence, 1392 InstructionSequence* sequence,
1393 bool run_verifier) { 1393 bool run_verifier) {
1394 CompilationInfo info("testing", sequence->isolate(), sequence->zone()); 1394 CompilationInfo info(ArrayVector("testing"), sequence->isolate(),
1395 sequence->zone());
1395 ZonePool zone_pool(sequence->isolate()->allocator()); 1396 ZonePool zone_pool(sequence->isolate()->allocator());
1396 PipelineData data(&zone_pool, &info, sequence); 1397 PipelineData data(&zone_pool, &info, sequence);
1397 Pipeline pipeline(&info); 1398 Pipeline pipeline(&info);
1398 pipeline.data_ = &data; 1399 pipeline.data_ = &data;
1399 pipeline.data_->InitializeFrameData(nullptr); 1400 pipeline.data_->InitializeFrameData(nullptr);
1400 pipeline.AllocateRegisters(config, nullptr, run_verifier); 1401 pipeline.AllocateRegisters(config, nullptr, run_verifier);
1401 return !data.compilation_failed(); 1402 return !data.compilation_failed();
1402 } 1403 }
1403 1404
1404 1405
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 } 1595 }
1595 1596
1596 data->DeleteRegisterAllocationZone(); 1597 data->DeleteRegisterAllocationZone();
1597 } 1598 }
1598 1599
1599 Isolate* Pipeline::isolate() const { return info()->isolate(); } 1600 Isolate* Pipeline::isolate() const { return info()->isolate(); }
1600 1601
1601 } // namespace compiler 1602 } // namespace compiler
1602 } // namespace internal 1603 } // namespace internal
1603 } // namespace v8 1604 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698