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/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/constant_propagator.h" | 10 #include "vm/constant_propagator.h" |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 // Update def-use chains whenever instructions are added to the graph | 623 // Update def-use chains whenever instructions are added to the graph |
624 // after initial graph construction. | 624 // after initial graph construction. |
625 for (intptr_t i = tail->InputCount() - 1; i >= 0; --i) { | 625 for (intptr_t i = tail->InputCount() - 1; i >= 0; --i) { |
626 Value* input = tail->InputAt(i); | 626 Value* input = tail->InputAt(i); |
627 input->definition()->AddInputUse(input); | 627 input->definition()->AddInputUse(input); |
628 } | 628 } |
629 return tail; | 629 return tail; |
630 } | 630 } |
631 | 631 |
632 | 632 |
633 BlockEntryInstr* Instruction::GetBlock() const { | 633 BlockEntryInstr* Instruction::GetBlock() { |
634 // TODO(fschneider): Implement a faster way to get the block of an | 634 // TODO(fschneider): Implement a faster way to get the block of an |
635 // instruction. | 635 // instruction. |
636 ASSERT(previous() != NULL); | 636 ASSERT(previous() != NULL); |
637 Instruction* result = previous(); | 637 Instruction* result = previous(); |
638 while (!result->IsBlockEntry()) result = result->previous(); | 638 while (!result->IsBlockEntry()) result = result->previous(); |
639 return result->AsBlockEntry(); | 639 return result->AsBlockEntry(); |
640 } | 640 } |
641 | 641 |
642 | 642 |
643 void ForwardInstructionIterator::RemoveCurrentFromGraph() { | 643 void ForwardInstructionIterator::RemoveCurrentFromGraph() { |
(...skipping 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3678 set_native_c_function(native_function); | 3678 set_native_c_function(native_function); |
3679 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3679 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
3680 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3680 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
3681 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3681 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
3682 set_is_bootstrap_native(is_bootstrap_native); | 3682 set_is_bootstrap_native(is_bootstrap_native); |
3683 } | 3683 } |
3684 | 3684 |
3685 #undef __ | 3685 #undef __ |
3686 | 3686 |
3687 } // namespace dart | 3687 } // namespace dart |
OLD | NEW |