| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "src/compiler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 return AbortOptimization( | 468 return AbortOptimization( |
| 469 info()->shared_info()->disable_optimization_reason()); | 469 info()->shared_info()->disable_optimization_reason()); |
| 470 } | 470 } |
| 471 | 471 |
| 472 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic) | 472 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic) |
| 473 ? new (info()->zone()) | 473 ? new (info()->zone()) |
| 474 HOptimizedGraphBuilderWithPositions(info()) | 474 HOptimizedGraphBuilderWithPositions(info()) |
| 475 : new (info()->zone()) HOptimizedGraphBuilder(info()); | 475 : new (info()->zone()) HOptimizedGraphBuilder(info()); |
| 476 | 476 |
| 477 Timer t(this, &time_taken_to_create_graph_); | 477 Timer t(this, &time_taken_to_create_graph_); |
| 478 info()->SetThisHasUses(false); | |
| 479 graph_ = graph_builder_->CreateGraph(); | 478 graph_ = graph_builder_->CreateGraph(); |
| 480 | 479 |
| 481 if (isolate()->has_pending_exception()) { | 480 if (isolate()->has_pending_exception()) { |
| 482 return SetLastStatus(FAILED); | 481 return SetLastStatus(FAILED); |
| 483 } | 482 } |
| 484 | 483 |
| 485 if (graph_ == NULL) return SetLastStatus(BAILED_OUT); | 484 if (graph_ == NULL) return SetLastStatus(BAILED_OUT); |
| 486 | 485 |
| 487 if (info()->HasAbortedDueToDependencyChange()) { | 486 if (info()->HasAbortedDueToDependencyChange()) { |
| 488 // Dependency has changed during graph creation. Let's try again later. | 487 // Dependency has changed during graph creation. Let's try again later. |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 parse_info_ = nullptr; | 1579 parse_info_ = nullptr; |
| 1581 } | 1580 } |
| 1582 | 1581 |
| 1583 #if DEBUG | 1582 #if DEBUG |
| 1584 void CompilationInfo::PrintAstForTesting() { | 1583 void CompilationInfo::PrintAstForTesting() { |
| 1585 PrintF("--- Source from AST ---\n%s\n", | 1584 PrintF("--- Source from AST ---\n%s\n", |
| 1586 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1585 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
| 1587 } | 1586 } |
| 1588 #endif | 1587 #endif |
| 1589 } } // namespace v8::internal | 1588 } } // namespace v8::internal |
| OLD | NEW |