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/ast-numbering.h" | 9 #include "src/ast/ast-numbering.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 OFStream os(stdout); | 414 OFStream os(stdout); |
415 os << "[compiling method " << Brief(*info()->closure()) | 415 os << "[compiling method " << Brief(*info()->closure()) |
416 << " using TurboFan"; | 416 << " using TurboFan"; |
417 if (info()->is_osr()) os << " OSR"; | 417 if (info()->is_osr()) os << " OSR"; |
418 os << "]" << std::endl; | 418 os << "]" << std::endl; |
419 } | 419 } |
420 | 420 |
421 if (info()->shared_info()->asm_function()) { | 421 if (info()->shared_info()->asm_function()) { |
422 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); | 422 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); |
423 info()->MarkAsFunctionContextSpecializing(); | 423 info()->MarkAsFunctionContextSpecializing(); |
424 } else if (info()->has_global_object() && | 424 } else { |
425 FLAG_native_context_specialization) { | 425 if (!FLAG_always_opt) { |
426 info()->MarkAsNativeContextSpecializing(); | 426 info()->MarkAsBailoutOnUninitialized(); |
427 info()->MarkAsTypingEnabled(); | 427 } |
| 428 if (FLAG_native_context_specialization) { |
| 429 info()->MarkAsNativeContextSpecializing(); |
| 430 info()->MarkAsTypingEnabled(); |
| 431 } |
428 } | 432 } |
429 if (!info()->shared_info()->asm_function() || | 433 if (!info()->shared_info()->asm_function() || |
430 FLAG_turbo_asm_deoptimization) { | 434 FLAG_turbo_asm_deoptimization) { |
431 info()->MarkAsDeoptimizationEnabled(); | 435 info()->MarkAsDeoptimizationEnabled(); |
432 } | 436 } |
433 | 437 |
434 Timer t(this, &time_taken_to_create_graph_); | 438 Timer t(this, &time_taken_to_create_graph_); |
435 compiler::Pipeline pipeline(info()); | 439 compiler::Pipeline pipeline(info()); |
436 pipeline.GenerateCode(); | 440 pipeline.GenerateCode(); |
437 if (!info()->code().is_null()) { | 441 if (!info()->code().is_null()) { |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 } | 1888 } |
1885 | 1889 |
1886 #if DEBUG | 1890 #if DEBUG |
1887 void CompilationInfo::PrintAstForTesting() { | 1891 void CompilationInfo::PrintAstForTesting() { |
1888 PrintF("--- Source from AST ---\n%s\n", | 1892 PrintF("--- Source from AST ---\n%s\n", |
1889 PrettyPrinter(isolate()).PrintProgram(literal())); | 1893 PrettyPrinter(isolate()).PrintProgram(literal())); |
1890 } | 1894 } |
1891 #endif | 1895 #endif |
1892 } // namespace internal | 1896 } // namespace internal |
1893 } // namespace v8 | 1897 } // namespace v8 |
OLD | NEW |