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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 info()->MarkAsContextSpecializing(); | 393 info()->MarkAsContextSpecializing(); |
394 } else if (FLAG_turbo_type_feedback) { | 394 } else if (FLAG_turbo_type_feedback) { |
395 info()->MarkAsTypeFeedbackEnabled(); | 395 info()->MarkAsTypeFeedbackEnabled(); |
396 info()->EnsureFeedbackVector(); | 396 info()->EnsureFeedbackVector(); |
397 } | 397 } |
398 | 398 |
399 Timer t(this, &time_taken_to_create_graph_); | 399 Timer t(this, &time_taken_to_create_graph_); |
400 compiler::Pipeline pipeline(info()); | 400 compiler::Pipeline pipeline(info()); |
401 pipeline.GenerateCode(); | 401 pipeline.GenerateCode(); |
402 if (!info()->code().is_null()) { | 402 if (!info()->code().is_null()) { |
| 403 info()->dependencies()->Commit(info()->code()); |
403 return SetLastStatus(SUCCEEDED); | 404 return SetLastStatus(SUCCEEDED); |
404 } | 405 } |
405 } | 406 } |
406 | 407 |
407 // Do not use Crankshaft if the code is intended to be serialized. | 408 // Do not use Crankshaft if the code is intended to be serialized. |
408 if (!isolate()->use_crankshaft()) return SetLastStatus(FAILED); | 409 if (!isolate()->use_crankshaft()) return SetLastStatus(FAILED); |
409 | 410 |
410 if (FLAG_trace_opt) { | 411 if (FLAG_trace_opt) { |
411 OFStream os(stdout); | 412 OFStream os(stdout); |
412 os << "[compiling method " << Brief(*info()->closure()) | 413 os << "[compiling method " << Brief(*info()->closure()) |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 } | 1542 } |
1542 | 1543 |
1543 | 1544 |
1544 #if DEBUG | 1545 #if DEBUG |
1545 void CompilationInfo::PrintAstForTesting() { | 1546 void CompilationInfo::PrintAstForTesting() { |
1546 PrintF("--- Source from AST ---\n%s\n", | 1547 PrintF("--- Source from AST ---\n%s\n", |
1547 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1548 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1548 } | 1549 } |
1549 #endif | 1550 #endif |
1550 } } // namespace v8::internal | 1551 } } // namespace v8::internal |
OLD | NEW |