Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index e58562664732af04b5fb4fa589440ec30b5482bc..61f75cd3cd3aef444b81f8a7577c577fbd370d8e 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -97,7 +97,7 @@ struct InlinedFunctionInfo { |
SourcePosition inline_position; |
int script_id; |
int start_position; |
- std::vector<int> deopt_pc_offsets; |
+ std::vector<size_t> deopt_pc_offsets; |
static const int kNoParentId = -1; |
}; |
@@ -337,17 +337,19 @@ class CompilationInfo { |
// to the current frame base. Used in CPU profiler to detect stack |
// samples where top frame is not set up. |
inline void AddNoFrameRange(int from, int to) { |
- if (no_frame_ranges_) no_frame_ranges_->Add(OffsetRange(from, to)); |
+ if (!no_frame_ranges_.is_empty()) |
+ no_frame_ranges_->Add(OffsetRange(from, to)); |
} |
List<OffsetRange>* ReleaseNoFrameRanges() { |
- List<OffsetRange>* result = no_frame_ranges_; |
- no_frame_ranges_ = NULL; |
- return result; |
+ return no_frame_ranges_.Detach(); |
} |
int start_position_for(uint32_t inlining_id) { |
- return inlined_function_infos_.at(inlining_id).start_position; |
+ return inlined_function_infos_->at(inlining_id).start_position; |
+ } |
+ std::vector<InlinedFunctionInfo>* ReleaseInlinedFunctionInfos() { |
+ return inlined_function_infos_.Detach(); |
Sven Panne
2015/03/23 10:13:27
This is horribly complicated: Can't we simply retu
|
} |
void LogDeoptCallPosition(int pc_offset, int inlining_id); |
@@ -459,8 +461,8 @@ class CompilationInfo { |
int prologue_offset_; |
- List<OffsetRange>* no_frame_ranges_; |
- std::vector<InlinedFunctionInfo> inlined_function_infos_; |
+ SmartPointer<List<OffsetRange>> no_frame_ranges_; |
+ SmartPointer<std::vector<InlinedFunctionInfo>> inlined_function_infos_; |
Sven Panne
2015/03/23 10:13:26
Following the KISS principle, leave the instance f
|
bool track_positions_; |
// A copy of shared_info()->opt_count() to avoid handle deref |