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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 406 } |
407 | 407 |
408 ASSERT(info()->shared_info()->has_deoptimization_support()); | 408 ASSERT(info()->shared_info()->has_deoptimization_support()); |
409 | 409 |
410 // Check the whitelist for TurboFan. | 410 // Check the whitelist for TurboFan. |
411 if (info()->closure()->PassesFilter(FLAG_turbo_filter) && | 411 if (info()->closure()->PassesFilter(FLAG_turbo_filter) && |
412 // TODO(turbofan): Make try-catch work and remove this bailout. | 412 // TODO(turbofan): Make try-catch work and remove this bailout. |
413 info()->function()->dont_optimize_reason() != kTryCatchStatement && | 413 info()->function()->dont_optimize_reason() != kTryCatchStatement && |
414 info()->function()->dont_optimize_reason() != kTryFinallyStatement && | 414 info()->function()->dont_optimize_reason() != kTryFinallyStatement && |
415 // TODO(turbofan): Make OSR work and remove this bailout. | 415 // TODO(turbofan): Make OSR work and remove this bailout. |
416 !info()->is_osr()) { | 416 !info()->is_osr() && |
| 417 // TODO(mstarzinger): Extend test coverage to unsupported targets. |
| 418 compiler::Pipeline::SupportedTarget()) { |
417 compiler::Pipeline pipeline(info()); | 419 compiler::Pipeline pipeline(info()); |
418 pipeline.GenerateCode(); | 420 pipeline.GenerateCode(); |
419 return SetLastStatus(SUCCEEDED); | 421 if (!info()->code().is_null()) { |
| 422 return SetLastStatus(SUCCEEDED); |
| 423 } |
420 } | 424 } |
421 | 425 |
422 if (FLAG_trace_hydrogen) { | 426 if (FLAG_trace_hydrogen) { |
423 Handle<String> name = info()->function()->debug_name(); | 427 Handle<String> name = info()->function()->debug_name(); |
424 PrintF("-----------------------------------------------------------\n"); | 428 PrintF("-----------------------------------------------------------\n"); |
425 PrintF("Compiling method %s using hydrogen\n", name->ToCString().get()); | 429 PrintF("Compiling method %s using hydrogen\n", name->ToCString().get()); |
426 isolate()->GetHTracer()->TraceCompilation(info()); | 430 isolate()->GetHTracer()->TraceCompilation(info()); |
427 } | 431 } |
428 | 432 |
429 // Type-check the function. | 433 // Type-check the function. |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 AllowHandleDereference allow_deref; | 1384 AllowHandleDereference allow_deref; |
1381 bool tracing_on = info()->IsStub() | 1385 bool tracing_on = info()->IsStub() |
1382 ? FLAG_trace_hydrogen_stubs | 1386 ? FLAG_trace_hydrogen_stubs |
1383 : (FLAG_trace_hydrogen && | 1387 : (FLAG_trace_hydrogen && |
1384 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1388 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1385 return (tracing_on && | 1389 return (tracing_on && |
1386 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1390 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1387 } | 1391 } |
1388 | 1392 |
1389 } } // namespace v8::internal | 1393 } } // namespace v8::internal |
OLD | NEW |