| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 6813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6824 locs->set_out(0, Location::RequiresRegister()); | 6824 locs->set_out(0, Location::RequiresRegister()); |
| 6825 return locs; | 6825 return locs; |
| 6826 } | 6826 } |
| 6827 | 6827 |
| 6828 | 6828 |
| 6829 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 6829 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
| 6830 BranchLabels labels) { | 6830 BranchLabels labels) { |
| 6831 Location left = locs()->in(0); | 6831 Location left = locs()->in(0); |
| 6832 Location right = locs()->in(1); | 6832 Location right = locs()->in(1); |
| 6833 ASSERT(!left.IsConstant() || !right.IsConstant()); | 6833 ASSERT(!left.IsConstant() || !right.IsConstant()); |
| 6834 Condition true_condition; |
| 6834 if (left.IsConstant()) { | 6835 if (left.IsConstant()) { |
| 6835 compiler->EmitEqualityRegConstCompare(right.reg(), | 6836 true_condition = compiler->EmitEqualityRegConstCompare(right.reg(), |
| 6836 left.constant(), | 6837 left.constant(), |
| 6837 needs_number_check(), | 6838 needs_number_check(), |
| 6838 token_pos()); | 6839 token_pos()); |
| 6839 } else if (right.IsConstant()) { | 6840 } else if (right.IsConstant()) { |
| 6840 compiler->EmitEqualityRegConstCompare(left.reg(), | 6841 true_condition = compiler->EmitEqualityRegConstCompare(left.reg(), |
| 6841 right.constant(), | 6842 right.constant(), |
| 6842 needs_number_check(), | 6843 needs_number_check(), |
| 6843 token_pos()); | 6844 token_pos()); |
| 6844 } else { | 6845 } else { |
| 6845 compiler->EmitEqualityRegRegCompare(left.reg(), | 6846 true_condition = compiler->EmitEqualityRegRegCompare(left.reg(), |
| 6846 right.reg(), | 6847 right.reg(), |
| 6847 needs_number_check(), | 6848 needs_number_check(), |
| 6848 token_pos()); | 6849 token_pos()); |
| 6849 } | 6850 } |
| 6850 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE; | 6851 if (kind() != Token::kEQ_STRICT) { |
| 6852 ASSERT(kind() == Token::kNE_STRICT); |
| 6853 true_condition = NegateCondition(true_condition); |
| 6854 } |
| 6851 return true_condition; | 6855 return true_condition; |
| 6852 } | 6856 } |
| 6853 | 6857 |
| 6854 | 6858 |
| 6855 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6859 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 6856 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); | 6860 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| 6857 | 6861 |
| 6858 // The ARM code does not use true- and false-labels here. | 6862 // The ARM code does not use true- and false-labels here. |
| 6859 BranchLabels labels = { NULL, NULL, NULL }; | 6863 BranchLabels labels = { NULL, NULL, NULL }; |
| 6860 Condition true_condition = EmitComparisonCode(compiler, labels); | 6864 Condition true_condition = EmitComparisonCode(compiler, labels); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6922 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6926 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 6923 #if defined(DEBUG) | 6927 #if defined(DEBUG) |
| 6924 __ LoadImmediate(R4, kInvalidObjectPointer); | 6928 __ LoadImmediate(R4, kInvalidObjectPointer); |
| 6925 __ LoadImmediate(R5, kInvalidObjectPointer); | 6929 __ LoadImmediate(R5, kInvalidObjectPointer); |
| 6926 #endif | 6930 #endif |
| 6927 } | 6931 } |
| 6928 | 6932 |
| 6929 } // namespace dart | 6933 } // namespace dart |
| 6930 | 6934 |
| 6931 #endif // defined TARGET_ARCH_ARM | 6935 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |