CpuProfiler: convert List<InlinedFunctionInfo> into std::vector<InlinedFunctionInfo>
this is the first part of https://codereview.chromium.org/1012633002. mechanical change. The motivation: the original patch needs to use List of List but list is not copiable. BUG=chromium:452067 LOG=n Review URL: https://codereview.chromium.org/1011733002 Cr-Commit-Position: refs/heads/master@{#27221}
This commit is contained in:
parent
567e45a192
commit
3e29f36ba4
@ -117,7 +117,7 @@ void CompilationInfo::Initialize(Isolate* isolate,
|
||||
no_frame_ranges_ = isolate->cpu_profiler()->is_profiling()
|
||||
? new List<OffsetRange>(2) : NULL;
|
||||
if (FLAG_hydrogen_track_positions) {
|
||||
inlined_function_infos_ = new List<InlinedFunctionInfo>(5);
|
||||
inlined_function_infos_ = new std::vector<InlinedFunctionInfo>();
|
||||
} else {
|
||||
inlined_function_infos_ = NULL;
|
||||
}
|
||||
@ -279,7 +279,7 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
||||
DCHECK(FLAG_hydrogen_track_positions);
|
||||
DCHECK(inlined_function_infos_);
|
||||
|
||||
int inline_id = inlined_function_infos_->length();
|
||||
int inline_id = static_cast<int>(inlined_function_infos_->size());
|
||||
InlinedFunctionInfo info(parent_id, position, UnboundScript::kNoScriptId,
|
||||
shared->start_position());
|
||||
if (!shared->script()->IsUndefined()) {
|
||||
@ -306,7 +306,7 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
||||
}
|
||||
}
|
||||
|
||||
inlined_function_infos_->Add(info);
|
||||
inlined_function_infos_->push_back(info);
|
||||
|
||||
if (inline_id != 0) {
|
||||
CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer());
|
||||
|
@ -337,7 +337,7 @@ class CompilationInfo {
|
||||
return result;
|
||||
}
|
||||
|
||||
List<InlinedFunctionInfo>* inlined_function_infos() {
|
||||
std::vector<InlinedFunctionInfo>* inlined_function_infos() {
|
||||
return inlined_function_infos_;
|
||||
}
|
||||
int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
||||
@ -448,7 +448,7 @@ class CompilationInfo {
|
||||
int prologue_offset_;
|
||||
|
||||
List<OffsetRange>* no_frame_ranges_;
|
||||
List<InlinedFunctionInfo>* inlined_function_infos_;
|
||||
std::vector<InlinedFunctionInfo>* inlined_function_infos_;
|
||||
|
||||
// A copy of shared_info()->opt_count() to avoid handle deref
|
||||
// during graph optimization.
|
||||
|
Loading…
Reference in New Issue
Block a user