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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 if (FLAG_print_turbo_replay) { | 1500 if (FLAG_print_turbo_replay) { |
1501 // Print a replay of the initial graph. | 1501 // Print a replay of the initial graph. |
1502 GraphReplayPrinter::PrintReplay(data->graph()); | 1502 GraphReplayPrinter::PrintReplay(data->graph()); |
1503 } | 1503 } |
1504 | 1504 |
1505 // Run the type-sensitive lowerings and optimizations on the graph. | 1505 // Run the type-sensitive lowerings and optimizations on the graph. |
1506 { | 1506 { |
1507 // Determine the Typer operation flags. | 1507 // Determine the Typer operation flags. |
1508 Typer::Flags flags = Typer::kNoFlags; | 1508 Typer::Flags flags = Typer::kNoFlags; |
1509 if (is_sloppy(info()->shared_info()->language_mode()) && | 1509 if (is_sloppy(info()->shared_info()->language_mode()) && |
1510 info()->shared_info()->IsUserJavaScript()) { | 1510 !info()->shared_info()->IsBuiltin()) { |
1511 // Sloppy mode functions always have an Object for this. | 1511 // Sloppy mode functions always have an Object for this. |
1512 flags |= Typer::kThisIsReceiver; | 1512 flags |= Typer::kThisIsReceiver; |
1513 } | 1513 } |
1514 if (IsClassConstructor(info()->shared_info()->kind())) { | 1514 if (IsClassConstructor(info()->shared_info()->kind())) { |
1515 // Class constructors cannot be [[Call]]ed. | 1515 // Class constructors cannot be [[Call]]ed. |
1516 flags |= Typer::kNewTargetIsReceiver; | 1516 flags |= Typer::kNewTargetIsReceiver; |
1517 } | 1517 } |
1518 | 1518 |
1519 // Type the graph and keep the Typer running on newly created nodes within | 1519 // Type the graph and keep the Typer running on newly created nodes within |
1520 // this scope; the Typer is automatically unlinked from the Graph once we | 1520 // this scope; the Typer is automatically unlinked from the Graph once we |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 data->DeleteRegisterAllocationZone(); | 1964 data->DeleteRegisterAllocationZone(); |
1965 } | 1965 } |
1966 | 1966 |
1967 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1967 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1968 | 1968 |
1969 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1969 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1970 | 1970 |
1971 } // namespace compiler | 1971 } // namespace compiler |
1972 } // namespace internal | 1972 } // namespace internal |
1973 } // namespace v8 | 1973 } // namespace v8 |
OLD | NEW |