| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 426 |
| 427 // We may reattempt compilation if the function needs to be assembled using | 427 // We may reattempt compilation if the function needs to be assembled using |
| 428 // far branches on ARM and MIPS. In the else branch of the setjmp call, | 428 // far branches on ARM and MIPS. In the else branch of the setjmp call, |
| 429 // done is set to false, and use_far_branches is set to true if there is a | 429 // done is set to false, and use_far_branches is set to true if there is a |
| 430 // longjmp from the ARM or MIPS assemblers. In all other paths through this | 430 // longjmp from the ARM or MIPS assemblers. In all other paths through this |
| 431 // while loop, done is set to true. use_far_branches is always false on ia32 | 431 // while loop, done is set to true. use_far_branches is always false on ia32 |
| 432 // and x64. | 432 // and x64. |
| 433 bool done = false; | 433 bool done = false; |
| 434 // volatile because the variable may be clobbered by a longjmp. | 434 // volatile because the variable may be clobbered by a longjmp. |
| 435 volatile bool use_far_branches = false; | 435 volatile bool use_far_branches = false; |
| 436 volatile bool use_speculative_inlining = true; | 436 volatile bool use_speculative_inlining = |
| 437 FLAG_max_speculative_inlining_attempts > 0; |
| 437 GrowableArray<intptr_t> inlining_black_list; | 438 GrowableArray<intptr_t> inlining_black_list; |
| 438 | 439 |
| 439 while (!done) { | 440 while (!done) { |
| 440 const intptr_t prev_deopt_id = thread->deopt_id(); | 441 const intptr_t prev_deopt_id = thread->deopt_id(); |
| 441 thread->set_deopt_id(0); | 442 thread->set_deopt_id(0); |
| 442 LongJumpScope jump; | 443 LongJumpScope jump; |
| 443 const intptr_t val = setjmp(*jump.Set()); | 444 const intptr_t val = setjmp(*jump.Set()); |
| 444 if (val == 0) { | 445 if (val == 0) { |
| 445 FlowGraph* flow_graph = NULL; | 446 FlowGraph* flow_graph = NULL; |
| 446 | 447 |
| (...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 } | 1889 } |
| 1889 | 1890 |
| 1890 | 1891 |
| 1891 void BackgroundCompiler::EnsureInit(Thread* thread) { | 1892 void BackgroundCompiler::EnsureInit(Thread* thread) { |
| 1892 UNREACHABLE(); | 1893 UNREACHABLE(); |
| 1893 } | 1894 } |
| 1894 | 1895 |
| 1895 #endif // DART_PRECOMPILED | 1896 #endif // DART_PRECOMPILED |
| 1896 | 1897 |
| 1897 } // namespace dart | 1898 } // namespace dart |
| OLD | NEW |