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

Unified Diff: src/compiler/pipeline.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/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 3f6c1bb461c2710521046492d15e8e82e408cc71..e4835ee336205840635529bef1f461d7fef445cc 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -427,38 +427,6 @@ void TraceSchedule(CompilationInfo* info, Schedule* schedule) {
}
-class AstGraphBuilderWithPositions final : public AstGraphBuilder {
- public:
- AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info,
- JSGraph* jsgraph,
- LoopAssignmentAnalysis* loop_assignment,
- TypeHintAnalysis* type_hint_analysis,
- SourcePositionTable* source_positions)
- : AstGraphBuilder(local_zone, info, jsgraph, 1.0f, loop_assignment,
- type_hint_analysis),
- source_positions_(source_positions),
- start_position_(info->shared_info()->start_position()) {}
-
- bool CreateGraph() {
- SourcePositionTable::Scope pos_scope(source_positions_, start_position_);
- return AstGraphBuilder::CreateGraph();
- }
-
-#define DEF_VISIT(type) \
- void Visit##type(type* node) override { \
- SourcePositionTable::Scope pos(source_positions_, \
- SourcePosition(node->position())); \
- AstGraphBuilder::Visit##type(node); \
- }
- AST_NODE_LIST(DEF_VISIT)
-#undef DEF_VISIT
-
- private:
- SourcePositionTable* const source_positions_;
- SourcePosition const start_position_;
-};
-
-
class SourcePositionWrapper final : public Reducer {
public:
SourcePositionWrapper(Reducer* reducer, SourcePositionTable* table)
@@ -753,8 +721,9 @@ struct GraphBuilderPhase {
succeeded = graph_builder.CreateGraph();
} else {
AstGraphBuilderWithPositions graph_builder(
- temp_zone, data->info(), data->jsgraph(), data->loop_assignment(),
- data->type_hint_analysis(), data->source_positions());
+ temp_zone, data->info(), data->jsgraph(), 1.0f,
+ data->loop_assignment(), data->type_hint_analysis(),
+ data->source_positions());
succeeded = graph_builder.CreateGraph();
}
@@ -807,11 +776,11 @@ struct InliningPhase {
JSNativeContextSpecialization native_context_specialization(
&graph_reducer, data->jsgraph(), flags, data->native_context(),
data->info()->dependencies(), temp_zone);
- JSInliningHeuristic inlining(&graph_reducer,
- data->info()->is_inlining_enabled()
- ? JSInliningHeuristic::kGeneralInlining
- : JSInliningHeuristic::kRestrictedInlining,
- temp_zone, data->info(), data->jsgraph());
+ JSInliningHeuristic inlining(
+ &graph_reducer, data->info()->is_inlining_enabled()
+ ? JSInliningHeuristic::kGeneralInlining
+ : JSInliningHeuristic::kRestrictedInlining,
+ temp_zone, data->info(), data->jsgraph(), data->source_positions());
JSIntrinsicLowering intrinsic_lowering(
&graph_reducer, data->jsgraph(),
data->info()->is_deoptimization_enabled()

Powered by Google App Engine
This is Rietveld 408576698