Index: src/compilation-info.h |
diff --git a/src/compilation-info.h b/src/compilation-info.h |
index 0bd7bc46dc8037cfffb5a5fa7a65fed946387f86..83bc92ed0503c6a438f3de70ad2568a853178b87 100644 |
--- a/src/compilation-info.h |
+++ b/src/compilation-info.h |
@@ -283,18 +283,29 @@ class CompilationInfo final { |
// Do not remove. |
Handle<Code> inlined_code_object_root; |
+ InliningPosition position; |
+ |
InlinedFunctionHolder(Handle<SharedFunctionInfo> inlined_shared_info, |
- Handle<Code> inlined_code_object_root) |
+ Handle<Code> inlined_code_object_root, |
+ SourcePosition pos) |
: shared_info(inlined_shared_info), |
- inlined_code_object_root(inlined_code_object_root) {} |
+ inlined_code_object_root(inlined_code_object_root) { |
+ position.position = pos; |
+ // initialized when generating the deoptimization literals |
+ position.inlined_function_id = -1; |
+ } |
+ |
+ void RegisterInlinedFunctionId(size_t inlined_function_id) { |
+ position.inlined_function_id = static_cast<int>(inlined_function_id); |
+ } |
}; |
typedef std::vector<InlinedFunctionHolder> InlinedFunctionList; |
- InlinedFunctionList const& inlined_functions() const { |
- return inlined_functions_; |
- } |
+ InlinedFunctionList& inlined_functions() { return inlined_functions_; } |
- void AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function); |
+ // Returns the inlining id for source position tracking. |
+ int AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function, |
+ SourcePosition pos); |
std::unique_ptr<char[]> GetDebugName() const; |