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

Unified Diff: src/compilation-info.h

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « src/assembler.cc ('k') | src/compilation-info.cc » ('j') | src/crankshaft/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698