| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 __ movq(RAX, Address(RSP, + 3 * kWordSize)); // Array. | 182 __ movq(RAX, Address(RSP, + 3 * kWordSize)); // Array. |
| 183 Label fall_through; | 183 Label fall_through; |
| 184 __ testq(RCX, Immediate(kSmiTagMask)); | 184 __ testq(RCX, Immediate(kSmiTagMask)); |
| 185 __ j(NOT_ZERO, &fall_through); | 185 __ j(NOT_ZERO, &fall_through); |
| 186 // Range check. | 186 // Range check. |
| 187 __ cmpq(RCX, FieldAddress(RAX, Array::length_offset())); | 187 __ cmpq(RCX, FieldAddress(RAX, Array::length_offset())); |
| 188 // Runtime throws exception. | 188 // Runtime throws exception. |
| 189 __ j(ABOVE_EQUAL, &fall_through); | 189 __ j(ABOVE_EQUAL, &fall_through); |
| 190 // Note that RBX is Smi, i.e, times 2. | 190 // Note that RBX is Smi, i.e, times 2. |
| 191 ASSERT(kSmiTagShift == 1); | 191 ASSERT(kSmiTagShift == 1); |
| 192 // Destroy RCX as we will not continue in the function. | 192 // Destroy RCX (ic data) as we will not continue in the function. |
| 193 __ StoreIntoObject(RAX, | 193 __ StoreIntoObject(RAX, |
| 194 FieldAddress(RAX, RCX, TIMES_4, Array::data_offset()), | 194 FieldAddress(RAX, RCX, TIMES_4, Array::data_offset()), |
| 195 RDX); | 195 RDX); |
| 196 // Caller is responsible of preserving the value if necessary. | 196 // Caller is responsible of preserving the value if necessary. |
| 197 __ ret(); | 197 __ ret(); |
| 198 __ Bind(&fall_through); | 198 __ Bind(&fall_through); |
| 199 return false; | 199 return false; |
| 200 } | 200 } |
| 201 | 201 |
| 202 | 202 |
| (...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 __ Bind(&fall_through); | 1681 __ Bind(&fall_through); |
| 1682 return false; | 1682 return false; |
| 1683 } | 1683 } |
| 1684 | 1684 |
| 1685 | 1685 |
| 1686 #undef __ | 1686 #undef __ |
| 1687 | 1687 |
| 1688 } // namespace dart | 1688 } // namespace dart |
| 1689 | 1689 |
| 1690 #endif // defined TARGET_ARCH_X64 | 1690 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |