OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/adapters.h" | 10 #include "src/base/adapters.h" |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 } | 497 } |
498 }; | 498 }; |
499 | 499 |
500 | 500 |
501 struct InliningPhase { | 501 struct InliningPhase { |
502 static const char* phase_name() { return "inlining"; } | 502 static const char* phase_name() { return "inlining"; } |
503 | 503 |
504 void Run(PipelineData* data, Zone* temp_zone) { | 504 void Run(PipelineData* data, Zone* temp_zone) { |
505 SourcePositionTable::Scope pos(data->source_positions(), | 505 SourcePositionTable::Scope pos(data->source_positions(), |
506 SourcePosition::Unknown()); | 506 SourcePosition::Unknown()); |
507 JSInliner inliner(data->info()->is_inlining_enabled() | 507 GraphReducer graph_reducer(data->graph(), temp_zone); |
508 ? JSInliner::kGeneralInlining | 508 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() |
509 : JSInliner::kBuiltinsInlining, | 509 ? JSInliner::kGeneralInlining |
| 510 : JSInliner::kBuiltinsInlining, |
510 temp_zone, data->info(), data->jsgraph()); | 511 temp_zone, data->info(), data->jsgraph()); |
511 GraphReducer graph_reducer(data->graph(), temp_zone); | |
512 AddReducer(data, &graph_reducer, &inliner); | 512 AddReducer(data, &graph_reducer, &inliner); |
513 graph_reducer.ReduceGraph(); | 513 graph_reducer.ReduceGraph(); |
514 } | 514 } |
515 }; | 515 }; |
516 | 516 |
517 | 517 |
518 struct TyperPhase { | 518 struct TyperPhase { |
519 static const char* phase_name() { return "typer"; } | 519 static const char* phase_name() { return "typer"; } |
520 | 520 |
521 void Run(PipelineData* data, Zone* temp_zone) { data->typer()->Run(); } | 521 void Run(PipelineData* data, Zone* temp_zone) { data->typer()->Run(); } |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 tcf << AsC1VRegisterAllocationData("CodeGen", | 1347 tcf << AsC1VRegisterAllocationData("CodeGen", |
1348 data->register_allocation_data()); | 1348 data->register_allocation_data()); |
1349 } | 1349 } |
1350 | 1350 |
1351 data->DeleteRegisterAllocationZone(); | 1351 data->DeleteRegisterAllocationZone(); |
1352 } | 1352 } |
1353 | 1353 |
1354 } // namespace compiler | 1354 } // namespace compiler |
1355 } // namespace internal | 1355 } // namespace internal |
1356 } // namespace v8 | 1356 } // namespace v8 |
OLD | NEW |