| 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 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2727 UNREACHABLE(); | 2727 UNREACHABLE(); |
| 2728 return NULL; | 2728 return NULL; |
| 2729 } | 2729 } |
| 2730 | 2730 |
| 2731 | 2731 |
| 2732 void JoinEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2732 void JoinEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2733 __ Bind(compiler->GetJumpLabel(this)); | 2733 __ Bind(compiler->GetJumpLabel(this)); |
| 2734 if (!compiler->is_optimizing()) { | 2734 if (!compiler->is_optimizing()) { |
| 2735 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | 2735 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
| 2736 GetDeoptId(), | 2736 GetDeoptId(), |
| 2737 Scanner::kNoSourcePos); | 2737 Token::kNoSourcePos); |
| 2738 } | 2738 } |
| 2739 if (HasParallelMove()) { | 2739 if (HasParallelMove()) { |
| 2740 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 2740 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 2741 } | 2741 } |
| 2742 } | 2742 } |
| 2743 | 2743 |
| 2744 | 2744 |
| 2745 LocationSummary* TargetEntryInstr::MakeLocationSummary(Zone* zone, | 2745 LocationSummary* TargetEntryInstr::MakeLocationSummary(Zone* zone, |
| 2746 bool optimizing) const { | 2746 bool optimizing) const { |
| 2747 UNREACHABLE(); | 2747 UNREACHABLE(); |
| 2748 return NULL; | 2748 return NULL; |
| 2749 } | 2749 } |
| 2750 | 2750 |
| 2751 | 2751 |
| 2752 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2752 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2753 __ Bind(compiler->GetJumpLabel(this)); | 2753 __ Bind(compiler->GetJumpLabel(this)); |
| 2754 if (!compiler->is_optimizing()) { | 2754 if (!compiler->is_optimizing()) { |
| 2755 if (compiler->NeedsEdgeCounter(this)) { | 2755 if (compiler->NeedsEdgeCounter(this)) { |
| 2756 compiler->EmitEdgeCounter(preorder_number()); | 2756 compiler->EmitEdgeCounter(preorder_number()); |
| 2757 } | 2757 } |
| 2758 // The deoptimization descriptor points after the edge counter code for | 2758 // The deoptimization descriptor points after the edge counter code for |
| 2759 // uniformity with ARM and MIPS, where we can reuse pattern matching | 2759 // uniformity with ARM and MIPS, where we can reuse pattern matching |
| 2760 // code that matches backwards from the end of the pattern. | 2760 // code that matches backwards from the end of the pattern. |
| 2761 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | 2761 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
| 2762 GetDeoptId(), | 2762 GetDeoptId(), |
| 2763 Scanner::kNoSourcePos); | 2763 Token::kNoSourcePos); |
| 2764 } | 2764 } |
| 2765 if (HasParallelMove()) { | 2765 if (HasParallelMove()) { |
| 2766 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 2766 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 2767 } | 2767 } |
| 2768 } | 2768 } |
| 2769 | 2769 |
| 2770 | 2770 |
| 2771 void IndirectGotoInstr::ComputeOffsetTable() { | 2771 void IndirectGotoInstr::ComputeOffsetTable() { |
| 2772 if (GetBlock()->offset() < 0) { | 2772 if (GetBlock()->offset() < 0) { |
| 2773 // Don't generate a table when contained in an unreachable block. | 2773 // Don't generate a table when contained in an unreachable block. |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3697 set_native_c_function(native_function); | 3697 set_native_c_function(native_function); |
| 3698 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3698 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
| 3699 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3699 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
| 3700 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3700 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
| 3701 set_is_bootstrap_native(is_bootstrap_native); | 3701 set_is_bootstrap_native(is_bootstrap_native); |
| 3702 } | 3702 } |
| 3703 | 3703 |
| 3704 #undef __ | 3704 #undef __ |
| 3705 | 3705 |
| 3706 } // namespace dart | 3706 } // namespace dart |
| OLD | NEW |