| 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 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
| 6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
| 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
| 8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
| 9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 __ testl(EBX, Immediate(kSmiTagMask)); | 228 __ testl(EBX, Immediate(kSmiTagMask)); |
| 229 // Index not Smi. | 229 // Index not Smi. |
| 230 __ j(NOT_ZERO, &fall_through); | 230 __ j(NOT_ZERO, &fall_through); |
| 231 __ movl(EAX, Address(ESP, + 3 * kWordSize)); // Array. | 231 __ movl(EAX, Address(ESP, + 3 * kWordSize)); // Array. |
| 232 // Range check. | 232 // Range check. |
| 233 __ cmpl(EBX, FieldAddress(EAX, Array::length_offset())); | 233 __ cmpl(EBX, FieldAddress(EAX, Array::length_offset())); |
| 234 // Runtime throws exception. | 234 // Runtime throws exception. |
| 235 __ j(ABOVE_EQUAL, &fall_through); | 235 __ j(ABOVE_EQUAL, &fall_through); |
| 236 // Note that EBX is Smi, i.e, times 2. | 236 // Note that EBX is Smi, i.e, times 2. |
| 237 ASSERT(kSmiTagShift == 1); | 237 ASSERT(kSmiTagShift == 1); |
| 238 // Destroy ECX as we will not continue in the function. | 238 // Destroy ECX (ic data) as we will not continue in the function. |
| 239 __ movl(ECX, Address(ESP, + 1 * kWordSize)); // Value. | 239 __ movl(ECX, Address(ESP, + 1 * kWordSize)); // Value. |
| 240 __ StoreIntoObject(EAX, | 240 __ StoreIntoObject(EAX, |
| 241 FieldAddress(EAX, EBX, TIMES_2, Array::data_offset()), | 241 FieldAddress(EAX, EBX, TIMES_2, Array::data_offset()), |
| 242 ECX); | 242 ECX); |
| 243 // Caller is responsible of preserving the value if necessary. | 243 // Caller is responsible of preserving the value if necessary. |
| 244 __ ret(); | 244 __ ret(); |
| 245 __ Bind(&fall_through); | 245 __ Bind(&fall_through); |
| 246 return false; | 246 return false; |
| 247 } | 247 } |
| 248 | 248 |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 __ ret(); | 1761 __ ret(); |
| 1762 | 1762 |
| 1763 __ Bind(&fall_through); | 1763 __ Bind(&fall_through); |
| 1764 return false; | 1764 return false; |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 #undef __ | 1767 #undef __ |
| 1768 } // namespace dart | 1768 } // namespace dart |
| 1769 | 1769 |
| 1770 #endif // defined TARGET_ARCH_IA32 | 1770 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |