OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/compiler.h" |
8 #include "vm/constant_propagator.h" | 9 #include "vm/constant_propagator.h" |
9 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
10 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
11 #include "vm/flow_graph_allocator.h" | 12 #include "vm/flow_graph_allocator.h" |
12 #include "vm/flow_graph_builder.h" | 13 #include "vm/flow_graph_builder.h" |
13 #include "vm/flow_graph_compiler.h" | 14 #include "vm/flow_graph_compiler.h" |
14 #include "vm/flow_graph_optimizer.h" | 15 #include "vm/flow_graph_optimizer.h" |
15 #include "vm/flow_graph_range_analysis.h" | 16 #include "vm/flow_graph_range_analysis.h" |
16 #include "vm/locations.h" | 17 #include "vm/locations.h" |
17 #include "vm/method_recognizer.h" | 18 #include "vm/method_recognizer.h" |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 CatchBlockEntryInstr* GraphEntryInstr::GetCatchEntry(intptr_t index) { | 531 CatchBlockEntryInstr* GraphEntryInstr::GetCatchEntry(intptr_t index) { |
531 // TODO(fschneider): Sort the catch entries by catch_try_index to avoid | 532 // TODO(fschneider): Sort the catch entries by catch_try_index to avoid |
532 // searching. | 533 // searching. |
533 for (intptr_t i = 0; i < catch_entries_.length(); ++i) { | 534 for (intptr_t i = 0; i < catch_entries_.length(); ++i) { |
534 if (catch_entries_[i]->catch_try_index() == index) return catch_entries_[i]; | 535 if (catch_entries_[i]->catch_try_index() == index) return catch_entries_[i]; |
535 } | 536 } |
536 return NULL; | 537 return NULL; |
537 } | 538 } |
538 | 539 |
539 | 540 |
| 541 bool GraphEntryInstr::IsCompiledForOsr() const { |
| 542 return osr_id_ != Compiler::kNoOSRDeoptId; |
| 543 } |
| 544 |
| 545 |
540 // ==== Support for visiting flow graphs. | 546 // ==== Support for visiting flow graphs. |
541 | 547 |
542 #define DEFINE_ACCEPT(ShortName) \ | 548 #define DEFINE_ACCEPT(ShortName) \ |
543 void ShortName##Instr::Accept(FlowGraphVisitor* visitor) { \ | 549 void ShortName##Instr::Accept(FlowGraphVisitor* visitor) { \ |
544 visitor->Visit##ShortName(this); \ | 550 visitor->Visit##ShortName(this); \ |
545 } | 551 } |
546 | 552 |
547 FOR_EACH_INSTRUCTION(DEFINE_ACCEPT) | 553 FOR_EACH_INSTRUCTION(DEFINE_ACCEPT) |
548 | 554 |
549 #undef DEFINE_ACCEPT | 555 #undef DEFINE_ACCEPT |
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3646 case Token::kTRUNCDIV: return 0; | 3652 case Token::kTRUNCDIV: return 0; |
3647 case Token::kMOD: return 1; | 3653 case Token::kMOD: return 1; |
3648 default: UNIMPLEMENTED(); return -1; | 3654 default: UNIMPLEMENTED(); return -1; |
3649 } | 3655 } |
3650 } | 3656 } |
3651 | 3657 |
3652 | 3658 |
3653 #undef __ | 3659 #undef __ |
3654 | 3660 |
3655 } // namespace dart | 3661 } // namespace dart |
OLD | NEW |