OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 if (optimized() && !function.IsOptimizable()) { | 711 if (optimized() && !function.IsOptimizable()) { |
712 return Code::null(); | 712 return Code::null(); |
713 } | 713 } |
714 Zone* const zone = thread()->zone(); | 714 Zone* const zone = thread()->zone(); |
715 NOT_IN_PRODUCT(TimelineStream* compiler_timeline = | 715 NOT_IN_PRODUCT(TimelineStream* compiler_timeline = |
716 Timeline::GetCompilerStream()); | 716 Timeline::GetCompilerStream()); |
717 CSTAT_TIMER_SCOPE(thread(), codegen_timer); | 717 CSTAT_TIMER_SCOPE(thread(), codegen_timer); |
718 HANDLESCOPE(thread()); | 718 HANDLESCOPE(thread()); |
719 | 719 |
720 // We may reattempt compilation if the function needs to be assembled using | 720 // We may reattempt compilation if the function needs to be assembled using |
721 // far branches on ARM and MIPS. In the else branch of the setjmp call, | 721 // far branches on ARM. In the else branch of the setjmp call, done is set to |
722 // done is set to false, and use_far_branches is set to true if there is a | 722 // false, and use_far_branches is set to true if there is a longjmp from the |
723 // longjmp from the ARM or MIPS assemblers. In all other paths through this | 723 // ARM assembler. In all other paths through this while loop, done is set to |
724 // while loop, done is set to true. use_far_branches is always false on ia32 | 724 // true. use_far_branches is always false on ia32 and x64. |
725 // and x64. | |
726 volatile bool done = false; | 725 volatile bool done = false; |
727 // volatile because the variable may be clobbered by a longjmp. | 726 // volatile because the variable may be clobbered by a longjmp. |
728 volatile bool use_far_branches = false; | 727 volatile bool use_far_branches = false; |
729 const bool use_speculative_inlining = false; | 728 const bool use_speculative_inlining = false; |
730 | 729 |
731 Code* volatile result = &Code::ZoneHandle(zone); | 730 Code* volatile result = &Code::ZoneHandle(zone); |
732 while (!done) { | 731 while (!done) { |
733 *result = Code::null(); | 732 *result = Code::null(); |
734 const intptr_t prev_deopt_id = thread()->deopt_id(); | 733 const intptr_t prev_deopt_id = thread()->deopt_id(); |
735 thread()->set_deopt_id(0); | 734 thread()->set_deopt_id(0); |
(...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2334 | 2333 |
2335 | 2334 |
2336 bool BackgroundCompiler::IsDisabled() { | 2335 bool BackgroundCompiler::IsDisabled() { |
2337 UNREACHABLE(); | 2336 UNREACHABLE(); |
2338 return true; | 2337 return true; |
2339 } | 2338 } |
2340 | 2339 |
2341 #endif // DART_PRECOMPILED_RUNTIME | 2340 #endif // DART_PRECOMPILED_RUNTIME |
2342 | 2341 |
2343 } // namespace dart | 2342 } // namespace dart |
OLD | NEW |