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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 #endif | 567 #endif |
568 CSTAT_TIMER_SCOPE(thread(), codegen_timer); | 568 CSTAT_TIMER_SCOPE(thread(), codegen_timer); |
569 HANDLESCOPE(thread()); | 569 HANDLESCOPE(thread()); |
570 | 570 |
571 // We may reattempt compilation if the function needs to be assembled using | 571 // We may reattempt compilation if the function needs to be assembled using |
572 // far branches on ARM and MIPS. In the else branch of the setjmp call, | 572 // far branches on ARM and MIPS. In the else branch of the setjmp call, |
573 // done is set to false, and use_far_branches is set to true if there is a | 573 // done is set to false, and use_far_branches is set to true if there is a |
574 // longjmp from the ARM or MIPS assemblers. In all other paths through this | 574 // longjmp from the ARM or MIPS assemblers. In all other paths through this |
575 // while loop, done is set to true. use_far_branches is always false on ia32 | 575 // while loop, done is set to true. use_far_branches is always false on ia32 |
576 // and x64. | 576 // and x64. |
577 bool done = false; | 577 volatile bool done = false; |
578 // volatile because the variable may be clobbered by a longjmp. | 578 // volatile because the variable may be clobbered by a longjmp. |
579 volatile bool use_far_branches = false; | 579 volatile bool use_far_branches = false; |
580 const bool use_speculative_inlining = false; | 580 const bool use_speculative_inlining = false; |
581 | 581 |
582 while (!done) { | 582 while (!done) { |
583 const intptr_t prev_deopt_id = thread()->deopt_id(); | 583 const intptr_t prev_deopt_id = thread()->deopt_id(); |
584 thread()->set_deopt_id(0); | 584 thread()->set_deopt_id(0); |
585 LongJumpScope jump; | 585 LongJumpScope jump; |
586 const intptr_t val = setjmp(*jump.Set()); | 586 const intptr_t val = setjmp(*jump.Set()); |
587 if (val == 0) { | 587 if (val == 0) { |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 } | 1882 } |
1883 | 1883 |
1884 | 1884 |
1885 void BackgroundCompiler::EnsureInit(Thread* thread) { | 1885 void BackgroundCompiler::EnsureInit(Thread* thread) { |
1886 UNREACHABLE(); | 1886 UNREACHABLE(); |
1887 } | 1887 } |
1888 | 1888 |
1889 #endif // DART_PRECOMPILED_RUNTIME | 1889 #endif // DART_PRECOMPILED_RUNTIME |
1890 | 1890 |
1891 } // namespace dart | 1891 } // namespace dart |
OLD | NEW |