Chromium Code Reviews| Index: src/compiler.cc |
| diff --git a/src/compiler.cc b/src/compiler.cc |
| index 6340773eab6fe4cee7da8eed08de2d5d77a77d07..a66103471bbd6cb5ae9b049bfaf00007f3e08f50 100644 |
| --- a/src/compiler.cc |
| +++ b/src/compiler.cc |
| @@ -308,11 +308,19 @@ static bool MakeCrankshaftCode(CompilationInfo* info) { |
| } |
| if (graph != NULL) { |
| - Handle<Code> optimized_code = graph->Compile(); |
| - if (!optimized_code.is_null()) { |
| - info->SetCode(optimized_code); |
| - FinishOptimization(info->closure(), start); |
| - return true; |
| + const char* bailout_reason = NULL; |
| + if (!graph->Optimize(&bailout_reason)) { |
| + builder.Bailout(bailout_reason); |
| + } else { |
| + LChunk* chunk = Lithium::CreateChunk(graph, &builder); |
|
danno
2012/07/11 10:04:57
How about LChunk::NewChunk?
|
| + if (chunk != NULL) { |
| + Handle<Code> optimized_code = Lithium::Codegen(chunk); |
|
danno
2012/07/11 10:04:57
How about chunk->Codegen(); ?
|
| + if (!optimized_code.is_null()) { |
| + info->SetCode(optimized_code); |
| + FinishOptimization(info->closure(), start); |
| + return true; |
| + } |
| + } |
| } |
| } |