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

Unified Diff: src/compiler/js-inlining.cc

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/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 6afc45f8905d99ed3f7a50109e4361928fc37390..0e122a6c14de1589e512d9d475236a255d069d3d 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -523,7 +523,8 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
// Remember that we inlined this function. This needs to be called right
// after we ensure deoptimization support so that the code flusher
// does not remove the code with the deoptimization support.
- info_->AddInlinedFunction(shared_info);
+ int inlining_id = info_->AddInlinedFunction(
+ shared_info, source_positions_->GetSourcePosition(node));
// ----------------------------------------------------------------
// After this point, we've made a decision to inline this function.
@@ -543,7 +544,8 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
// Run the BytecodeGraphBuilder to create the subgraph.
Graph::SubgraphScope scope(graph());
BytecodeGraphBuilder graph_builder(&zone, &info, jsgraph(),
- call.frequency(), nullptr);
+ call.frequency(), source_positions_,
+ inlining_id);
graph_builder.CreateGraph(false);
// Extract the inlinee start/end nodes.
@@ -562,8 +564,9 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
// Run the AstGraphBuilder to create the subgraph.
Graph::SubgraphScope scope(graph());
- AstGraphBuilder graph_builder(&zone, &info, jsgraph(), call.frequency(),
- loop_assignment, type_hint_analysis);
+ AstGraphBuilderWithPositions graph_builder(
+ &zone, &info, jsgraph(), call.frequency(), loop_assignment,
+ type_hint_analysis, source_positions_, inlining_id);
graph_builder.CreateGraph(false);
// Extract the inlinee start/end nodes.

Powered by Google App Engine
This is Rietveld 408576698