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

Unified Diff: src/compiler/effect-control-linearizer.cc

Issue 2504913003: [turbofan] track source positions in EffectControlLinearizer (Closed)
Patch Set: 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
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/effect-control-linearizer.cc
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc
index ad86ca5d81ce62f8093b0611444ffc177c06206a..ae6b622b988a59c2d3ef208e14219bf389a00c0f 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -6,6 +6,7 @@
#include "src/code-factory.h"
#include "src/compiler/access-builder.h"
+#include "src/compiler/compiler-source-position-table.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h"
@@ -17,10 +18,13 @@ namespace v8 {
namespace internal {
namespace compiler {
-EffectControlLinearizer::EffectControlLinearizer(JSGraph* js_graph,
- Schedule* schedule,
- Zone* temp_zone)
- : js_graph_(js_graph), schedule_(schedule), temp_zone_(temp_zone) {}
+EffectControlLinearizer::EffectControlLinearizer(
+ JSGraph* js_graph, Schedule* schedule, Zone* temp_zone,
+ SourcePositionTable* source_positions)
+ : js_graph_(js_graph),
+ schedule_(schedule),
+ temp_zone_(temp_zone),
+ source_positions_(source_positions) {}
Graph* EffectControlLinearizer::graph() const { return js_graph_->graph(); }
CommonOperatorBuilder* EffectControlLinearizer::common() const {
@@ -428,7 +432,13 @@ void EffectControlLinearizer::Run() {
// Process the ordinary instructions.
for (; instr < block->NodeCount(); instr++) {
Node* node = block->NodeAt(instr);
- ProcessNode(node, &frame_state, &effect, &control);
+ if (source_positions_) {
+ SourcePositionTable::Scope scope(
+ source_positions_, source_positions_->GetSourcePosition(node));
+ ProcessNode(node, &frame_state, &effect, &control);
+ } else {
+ ProcessNode(node, &frame_state, &effect, &control);
+ }
}
switch (block->control()) {
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698