| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 96edf2d3b92478545674cb920dc2e4dde18ee9da..29eca0614ca1a023d16561a4fc4913382cba39ee 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -123,9 +123,8 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub,
|
| deferred_handles_(nullptr),
|
| bailout_reason_(kNoReason),
|
| prologue_offset_(Code::kPrologueOffsetNotSet),
|
| - no_frame_ranges_(isolate->cpu_profiler()->is_profiling()
|
| - ? new List<OffsetRange>(2)
|
| - : nullptr),
|
| + no_frame_ranges_(nullptr),
|
| + inlined_function_infos_(nullptr),
|
| track_positions_(FLAG_hydrogen_track_positions),
|
| opt_count_(has_shared_info() ? shared_info()->opt_count() : 0),
|
| parameter_count_(0),
|
| @@ -133,6 +132,13 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub,
|
| aborted_due_to_dependency_change_(false),
|
| osr_expr_stack_height_(0) {
|
| std::fill_n(dependencies_, DependentCode::kGroupCount, nullptr);
|
| + if (isolate->cpu_profiler()->is_profiling()) {
|
| + no_frame_ranges_ = new List<OffsetRange>(2);
|
| + track_positions_ = true;
|
| + }
|
| + if (track_positions_) {
|
| + inlined_function_infos_ = new std::vector<InlinedFunctionInfo>();
|
| + }
|
| }
|
|
|
|
|
| @@ -140,6 +146,7 @@ CompilationInfo::~CompilationInfo() {
|
| DisableFutureOptimization();
|
| delete deferred_handles_;
|
| delete no_frame_ranges_;
|
| + delete inlined_function_infos_;
|
| #ifdef DEBUG
|
| // Check that no dependent maps have been added or added dependent maps have
|
| // been rolled back or committed.
|
| @@ -245,7 +252,7 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
| int parent_id) {
|
| DCHECK(track_positions_);
|
|
|
| - int inline_id = static_cast<int>(inlined_function_infos_.size());
|
| + int inline_id = static_cast<int>(inlined_function_infos_->size());
|
| InlinedFunctionInfo info(parent_id, position, UnboundScript::kNoScriptId,
|
| shared->start_position());
|
| if (!shared->script()->IsUndefined()) {
|
| @@ -267,12 +274,11 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
| os << AsReversiblyEscapedUC16(c);
|
| }
|
| }
|
| -
|
| os << "\n--- END ---\n";
|
| }
|
| }
|
|
|
| - inlined_function_infos_.push_back(info);
|
| + inlined_function_infos_->push_back(info);
|
|
|
| if (FLAG_hydrogen_track_positions && inline_id != 0) {
|
| CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer());
|
| @@ -288,8 +294,9 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
|
|
| void CompilationInfo::LogDeoptCallPosition(int pc_offset, int inlining_id) {
|
| if (!track_positions_ || IsStub()) return;
|
| - DCHECK_LT(static_cast<size_t>(inlining_id), inlined_function_infos_.size());
|
| - inlined_function_infos_.at(inlining_id).deopt_pc_offsets.push_back(pc_offset);
|
| + DCHECK_LT(static_cast<size_t>(inlining_id), inlined_function_infos_->size());
|
| + inlined_function_infos_->at(inlining_id)
|
| + .deopt_pc_offsets.push_back(pc_offset);
|
| }
|
|
|
|
|
|
|