OLD | NEW |
1 | 1 |
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
7 #if defined(TARGET_ARCH_ARM) | 7 #if defined(TARGET_ARCH_ARM) |
8 | 8 |
9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
10 | 10 |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 __ b(result ? labels.true_label : labels.false_label, EQ); | 808 __ b(result ? labels.true_label : labels.false_label, EQ); |
809 __ LoadClassId(cid_reg, val_reg); | 809 __ LoadClassId(cid_reg, val_reg); |
810 | 810 |
811 for (intptr_t i = 2; i < data.length(); i += 2) { | 811 for (intptr_t i = 2; i < data.length(); i += 2) { |
812 const intptr_t test_cid = data[i]; | 812 const intptr_t test_cid = data[i]; |
813 ASSERT(test_cid != kSmiCid); | 813 ASSERT(test_cid != kSmiCid); |
814 result = data[i + 1] == true_result; | 814 result = data[i + 1] == true_result; |
815 __ CompareImmediate(cid_reg, test_cid); | 815 __ CompareImmediate(cid_reg, test_cid); |
816 __ b(result ? labels.true_label : labels.false_label, EQ); | 816 __ b(result ? labels.true_label : labels.false_label, EQ); |
817 } | 817 } |
818 // No match found, deoptimize or false. | 818 // No match found, deoptimize or default action. |
819 if (deopt == NULL) { | 819 if (deopt == NULL) { |
| 820 // If the cid is not in the list, jump to the opposite label from the cids |
| 821 // that are in the list. These must be all the same (see asserts in the |
| 822 // constructor). |
820 Label* target = result ? labels.false_label : labels.true_label; | 823 Label* target = result ? labels.false_label : labels.true_label; |
821 if (target != labels.fall_through) { | 824 if (target != labels.fall_through) { |
822 __ b(target); | 825 __ b(target); |
823 } | 826 } |
824 } else { | 827 } else { |
825 __ b(deopt); | 828 __ b(deopt); |
826 } | 829 } |
827 // Dummy result as the last instruction is a jump, any conditional | 830 // Dummy result as the last instruction is a jump, any conditional |
828 // branch using the result will therefore be skipped. | 831 // branch using the result will therefore be skipped. |
829 return EQ; | 832 return EQ; |
(...skipping 6424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7254 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 7257 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
7255 kGrowRegExpStackRuntimeEntry, 1, locs()); | 7258 kGrowRegExpStackRuntimeEntry, 1, locs()); |
7256 __ Drop(1); | 7259 __ Drop(1); |
7257 __ Pop(result); | 7260 __ Pop(result); |
7258 } | 7261 } |
7259 | 7262 |
7260 | 7263 |
7261 } // namespace dart | 7264 } // namespace dart |
7262 | 7265 |
7263 #endif // defined TARGET_ARCH_ARM | 7266 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |