| 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/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 3810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3821 compiler->SetNeedsStacktrace(catch_try_index()); | 3821 compiler->SetNeedsStacktrace(catch_try_index()); |
| 3822 compiler->GenerateCallRuntime(token_pos(), | 3822 compiler->GenerateCallRuntime(token_pos(), |
| 3823 deopt_id(), | 3823 deopt_id(), |
| 3824 kReThrowRuntimeEntry, | 3824 kReThrowRuntimeEntry, |
| 3825 2, | 3825 2, |
| 3826 locs()); | 3826 locs()); |
| 3827 __ break_(0); | 3827 __ break_(0); |
| 3828 } | 3828 } |
| 3829 | 3829 |
| 3830 | 3830 |
| 3831 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3832 if (!compiler->CanFallThroughTo(normal_entry())) { |
| 3833 __ b(compiler->GetJumpLabel(normal_entry())); |
| 3834 } |
| 3835 } |
| 3836 |
| 3837 |
| 3831 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3838 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3832 __ Bind(compiler->GetJumpLabel(this)); | 3839 __ Bind(compiler->GetJumpLabel(this)); |
| 3833 if (!compiler->is_optimizing()) { | 3840 if (!compiler->is_optimizing()) { |
| 3834 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 3841 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 3835 deopt_id_, | 3842 deopt_id_, |
| 3836 Scanner::kDummyTokenIndex); | 3843 Scanner::kDummyTokenIndex); |
| 3837 // Add an edge counter. | 3844 // Add an edge counter. |
| 3838 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); | 3845 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); |
| 3839 counter.SetAt(0, Smi::Handle(Smi::New(0))); | 3846 counter.SetAt(0, Smi::Handle(Smi::New(0))); |
| 3840 Label done; | 3847 Label done; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3898 __ b(compiler->GetJumpLabel(false_successor())); | 3905 __ b(compiler->GetJumpLabel(false_successor())); |
| 3899 } | 3906 } |
| 3900 } | 3907 } |
| 3901 | 3908 |
| 3902 | 3909 |
| 3903 // The comparison result is in CMPRES. | 3910 // The comparison result is in CMPRES. |
| 3904 void ControlInstruction::EmitBranchOnCondition(FlowGraphCompiler* compiler, | 3911 void ControlInstruction::EmitBranchOnCondition(FlowGraphCompiler* compiler, |
| 3905 Condition true_condition) { | 3912 Condition true_condition) { |
| 3906 __ TraceSimMsg("ControlInstruction::EmitBranchOnCondition"); | 3913 __ TraceSimMsg("ControlInstruction::EmitBranchOnCondition"); |
| 3907 if (compiler->CanFallThroughTo(false_successor())) { | 3914 if (compiler->CanFallThroughTo(false_successor())) { |
| 3908 // If the next block is the false successor we will fall through to it. | 3915 // If the next block is the false successor, fall through to it. |
| 3909 Label* label = compiler->GetJumpLabel(true_successor()); | 3916 Label* label = compiler->GetJumpLabel(true_successor()); |
| 3910 EmitBranchAfterCompare(compiler, true_condition, label); | 3917 EmitBranchAfterCompare(compiler, true_condition, label); |
| 3911 } else { | 3918 } else { |
| 3912 // If the next block is the true successor we negate comparison and fall | 3919 // If the next block is not the false successor, branch to it. |
| 3913 // through to it. | |
| 3914 Condition false_condition = NegateCondition(true_condition); | 3920 Condition false_condition = NegateCondition(true_condition); |
| 3915 Label* label = compiler->GetJumpLabel(false_successor()); | 3921 Label* label = compiler->GetJumpLabel(false_successor()); |
| 3916 EmitBranchAfterCompare(compiler, false_condition, label); | 3922 EmitBranchAfterCompare(compiler, false_condition, label); |
| 3917 // Fall through or jump to the true successor. | 3923 // Fall through or jump to the true successor. |
| 3918 if (!compiler->CanFallThroughTo(true_successor())) { | 3924 if (!compiler->CanFallThroughTo(true_successor())) { |
| 3919 __ b(compiler->GetJumpLabel(true_successor())); | 3925 __ b(compiler->GetJumpLabel(true_successor())); |
| 3920 } | 3926 } |
| 3921 } | 3927 } |
| 3922 } | 3928 } |
| 3923 | 3929 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4107 compiler->GenerateCall(token_pos(), | 4113 compiler->GenerateCall(token_pos(), |
| 4108 &label, | 4114 &label, |
| 4109 PcDescriptors::kOther, | 4115 PcDescriptors::kOther, |
| 4110 locs()); | 4116 locs()); |
| 4111 __ Drop(2); // Discard type arguments and receiver. | 4117 __ Drop(2); // Discard type arguments and receiver. |
| 4112 } | 4118 } |
| 4113 | 4119 |
| 4114 } // namespace dart | 4120 } // namespace dart |
| 4115 | 4121 |
| 4116 #endif // defined TARGET_ARCH_MIPS | 4122 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |