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

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

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: addressed comments 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 8ab07c5fa67cf7ecfd62e171e38688c898ab59b6..b773df0d20ec9dc2751b5d6e1d1d7278cd9cb628 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -510,7 +510,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.
@@ -530,7 +531,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.
@@ -549,8 +551,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