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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 OFStream os(stdout); | 432 OFStream os(stdout); |
433 os << "[compiling method " << Brief(*info()->closure()) | 433 os << "[compiling method " << Brief(*info()->closure()) |
434 << " using TurboFan"; | 434 << " using TurboFan"; |
435 if (info()->is_osr()) os << " OSR"; | 435 if (info()->is_osr()) os << " OSR"; |
436 os << "]" << std::endl; | 436 os << "]" << std::endl; |
437 } | 437 } |
438 | 438 |
439 if (info()->shared_info()->asm_function()) { | 439 if (info()->shared_info()->asm_function()) { |
440 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); | 440 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); |
441 info()->MarkAsFunctionContextSpecializing(); | 441 info()->MarkAsFunctionContextSpecializing(); |
| 442 } else if (info()->has_global_object() && |
| 443 FLAG_native_context_specialization) { |
| 444 info()->MarkAsNativeContextSpecializing(); |
442 } else if (FLAG_turbo_type_feedback) { | 445 } else if (FLAG_turbo_type_feedback) { |
443 info()->MarkAsTypeFeedbackEnabled(); | 446 info()->MarkAsTypeFeedbackEnabled(); |
444 info()->EnsureFeedbackVector(); | 447 info()->EnsureFeedbackVector(); |
445 } | 448 } |
446 if (!info()->shared_info()->asm_function() || | 449 if (!info()->shared_info()->asm_function() || |
447 FLAG_turbo_asm_deoptimization) { | 450 FLAG_turbo_asm_deoptimization) { |
448 info()->MarkAsDeoptimizationEnabled(); | 451 info()->MarkAsDeoptimizationEnabled(); |
449 } | 452 } |
450 if (info()->has_global_object() && FLAG_native_context_specialization) { | |
451 info()->MarkAsNativeContextSpecializing(); | |
452 } | |
453 | 453 |
454 Timer t(this, &time_taken_to_create_graph_); | 454 Timer t(this, &time_taken_to_create_graph_); |
455 compiler::Pipeline pipeline(info()); | 455 compiler::Pipeline pipeline(info()); |
456 pipeline.GenerateCode(); | 456 pipeline.GenerateCode(); |
457 if (!info()->code().is_null()) { | 457 if (!info()->code().is_null()) { |
458 return SetLastStatus(SUCCEEDED); | 458 return SetLastStatus(SUCCEEDED); |
459 } | 459 } |
460 } | 460 } |
461 | 461 |
462 if (!isolate()->use_crankshaft() || dont_crankshaft) { | 462 if (!isolate()->use_crankshaft() || dont_crankshaft) { |
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 } | 1797 } |
1798 | 1798 |
1799 #if DEBUG | 1799 #if DEBUG |
1800 void CompilationInfo::PrintAstForTesting() { | 1800 void CompilationInfo::PrintAstForTesting() { |
1801 PrintF("--- Source from AST ---\n%s\n", | 1801 PrintF("--- Source from AST ---\n%s\n", |
1802 PrettyPrinter(isolate(), zone()).PrintProgram(literal())); | 1802 PrettyPrinter(isolate(), zone()).PrintProgram(literal())); |
1803 } | 1803 } |
1804 #endif | 1804 #endif |
1805 } // namespace internal | 1805 } // namespace internal |
1806 } // namespace v8 | 1806 } // namespace v8 |
OLD | NEW |