| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 Label receiver_not_smi; | 818 Label receiver_not_smi; |
| 819 __ Bind(&check_for_mint); | 819 __ Bind(&check_for_mint); |
| 820 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Receiver. | 820 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Receiver. |
| 821 __ testl(EAX, Immediate(kSmiTagMask)); | 821 __ testl(EAX, Immediate(kSmiTagMask)); |
| 822 __ j(NOT_ZERO, &receiver_not_smi); | 822 __ j(NOT_ZERO, &receiver_not_smi); |
| 823 | 823 |
| 824 // Note that an instance of Mint never contains a value that can be | 824 // Note that an instance of Mint never contains a value that can be |
| 825 // represented by Smi. | 825 // represented by Smi. |
| 826 // Left is Smi, return false if right is Mint, otherwise fall through. | 826 // Left is Smi, return false if right is Mint, otherwise fall through. |
| 827 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. | 827 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. |
| 828 __ CompareClassId(EAX, kMint, EAX); | 828 __ CompareClassId(EAX, kMint, EDI); |
| 829 __ j(NOT_EQUAL, &fall_through); | 829 __ j(NOT_EQUAL, &fall_through); |
| 830 __ LoadObject(EAX, bool_false); // Smi == Mint -> false. | 830 __ LoadObject(EAX, bool_false); // Smi == Mint -> false. |
| 831 __ ret(); | 831 __ ret(); |
| 832 | 832 |
| 833 __ Bind(&receiver_not_smi); | 833 __ Bind(&receiver_not_smi); |
| 834 // EAX:: receiver. | 834 // EAX:: receiver. |
| 835 __ CompareClassId(EAX, kMint, EAX); | 835 __ CompareClassId(EAX, kMint, EDI); |
| 836 __ j(NOT_EQUAL, &fall_through); | 836 __ j(NOT_EQUAL, &fall_through); |
| 837 // Receiver is Mint, return false if right is Smi. | 837 // Receiver is Mint, return false if right is Smi. |
| 838 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. | 838 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. |
| 839 __ testl(EAX, Immediate(kSmiTagMask)); | 839 __ testl(EAX, Immediate(kSmiTagMask)); |
| 840 __ j(NOT_ZERO, &fall_through); | 840 __ j(NOT_ZERO, &fall_through); |
| 841 __ LoadObject(EAX, bool_false); // Smi == Mint -> false. | 841 __ LoadObject(EAX, bool_false); // Smi == Mint -> false. |
| 842 __ ret(); | 842 __ ret(); |
| 843 // TODO(srdjan): Implement Mint == Mint comparison. | 843 // TODO(srdjan): Implement Mint == Mint comparison. |
| 844 | 844 |
| 845 __ Bind(&fall_through); | 845 __ Bind(&fall_through); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 __ Bind(&is_true); | 1351 __ Bind(&is_true); |
| 1352 __ LoadObject(EAX, bool_true); | 1352 __ LoadObject(EAX, bool_true); |
| 1353 __ ret(); | 1353 __ ret(); |
| 1354 return true; | 1354 return true; |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 #undef __ | 1357 #undef __ |
| 1358 } // namespace dart | 1358 } // namespace dart |
| 1359 | 1359 |
| 1360 #endif // defined TARGET_ARCH_IA32 | 1360 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |