| 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 <memory> | 8 #include <memory> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 if (FLAG_print_turbo_replay) { | 1505 if (FLAG_print_turbo_replay) { |
| 1506 // Print a replay of the initial graph. | 1506 // Print a replay of the initial graph. |
| 1507 GraphReplayPrinter::PrintReplay(data->graph()); | 1507 GraphReplayPrinter::PrintReplay(data->graph()); |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 // Run the type-sensitive lowerings and optimizations on the graph. | 1510 // Run the type-sensitive lowerings and optimizations on the graph. |
| 1511 { | 1511 { |
| 1512 // Determine the Typer operation flags. | 1512 // Determine the Typer operation flags. |
| 1513 Typer::Flags flags = Typer::kNoFlags; | 1513 Typer::Flags flags = Typer::kNoFlags; |
| 1514 if (is_sloppy(info()->shared_info()->language_mode()) && | 1514 if (is_sloppy(info()->shared_info()->language_mode()) && |
| 1515 !info()->shared_info()->IsBuiltin()) { | 1515 info()->shared_info()->IsUserJavaScript()) { |
| 1516 // Sloppy mode functions always have an Object for this. | 1516 // Sloppy mode functions always have an Object for this. |
| 1517 flags |= Typer::kThisIsReceiver; | 1517 flags |= Typer::kThisIsReceiver; |
| 1518 } | 1518 } |
| 1519 if (IsClassConstructor(info()->shared_info()->kind())) { | 1519 if (IsClassConstructor(info()->shared_info()->kind())) { |
| 1520 // Class constructors cannot be [[Call]]ed. | 1520 // Class constructors cannot be [[Call]]ed. |
| 1521 flags |= Typer::kNewTargetIsReceiver; | 1521 flags |= Typer::kNewTargetIsReceiver; |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 // Type the graph and keep the Typer running on newly created nodes within | 1524 // Type the graph and keep the Typer running on newly created nodes within |
| 1525 // this scope; the Typer is automatically unlinked from the Graph once we | 1525 // this scope; the Typer is automatically unlinked from the Graph once we |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 data->DeleteRegisterAllocationZone(); | 1974 data->DeleteRegisterAllocationZone(); |
| 1975 } | 1975 } |
| 1976 | 1976 |
| 1977 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1977 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 1978 | 1978 |
| 1979 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1979 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 1980 | 1980 |
| 1981 } // namespace compiler | 1981 } // namespace compiler |
| 1982 } // namespace internal | 1982 } // namespace internal |
| 1983 } // namespace v8 | 1983 } // namespace v8 |
| OLD | NEW |