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()); | |
404 return SetLastStatus(SUCCEEDED); | 403 return SetLastStatus(SUCCEEDED); |
405 } | 404 } |
406 } | 405 } |
407 | 406 |
408 // Do not use Crankshaft if the code is intended to be serialized. | 407 // Do not use Crankshaft if the code is intended to be serialized. |
409 if (!isolate()->use_crankshaft()) return SetLastStatus(FAILED); | 408 if (!isolate()->use_crankshaft()) return SetLastStatus(FAILED); |
410 | 409 |
411 if (FLAG_trace_opt) { | 410 if (FLAG_trace_opt) { |
412 OFStream os(stdout); | 411 OFStream os(stdout); |
413 os << "[compiling method " << Brief(*info()->closure()) | 412 os << "[compiling method " << Brief(*info()->closure()) |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1542 } | 1541 } |
1543 | 1542 |
1544 | 1543 |
1545 #if DEBUG | 1544 #if DEBUG |
1546 void CompilationInfo::PrintAstForTesting() { | 1545 void CompilationInfo::PrintAstForTesting() { |
1547 PrintF("--- Source from AST ---\n%s\n", | 1546 PrintF("--- Source from AST ---\n%s\n", |
1548 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1547 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1549 } | 1548 } |
1550 #endif | 1549 #endif |
1551 } } // namespace v8::internal | 1550 } } // namespace v8::internal |
OLD | NEW |