| 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 __ LoadObject(EAX, Bool::True()); | 729 __ LoadObject(EAX, Bool::True()); |
| 730 __ ret(); | 730 __ ret(); |
| 731 | 731 |
| 732 // At least one of the arguments was not Smi. | 732 // At least one of the arguments was not Smi. |
| 733 Label receiver_not_smi; | 733 Label receiver_not_smi; |
| 734 __ Bind(&check_for_mint); | 734 __ Bind(&check_for_mint); |
| 735 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Receiver. | 735 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Receiver. |
| 736 __ testl(EAX, Immediate(kSmiTagMask)); | 736 __ testl(EAX, Immediate(kSmiTagMask)); |
| 737 __ j(NOT_ZERO, &receiver_not_smi); | 737 __ j(NOT_ZERO, &receiver_not_smi); |
| 738 | 738 |
| 739 // Left (receiver) is Smi, return false if right is not Double. | 739 // Left (receiver) is Smi, return false if right is not Double or Pixels. |
| 740 // Note that an instance of Mint or Bigint never contains a value that can be | 740 // Note that an instance of Mint or Bigint never contains a value that can be |
| 741 // represented by Smi. | 741 // represented by Smi. |
| 742 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. | 742 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. |
| 743 __ CompareClassId(EAX, kDoubleCid, EDI); | 743 __ LoadClassId(EDI, EAX); |
| 744 __ cmpl(EDI, Immediate(kDoubleCid)); |
| 745 __ j(EQUAL, &fall_through); |
| 746 __ cmpl(EDI, Immediate(kPixelsCid)); |
| 744 __ j(EQUAL, &fall_through); | 747 __ j(EQUAL, &fall_through); |
| 745 __ LoadObject(EAX, Bool::False()); // Smi == Mint -> false. | 748 __ LoadObject(EAX, Bool::False()); // Smi == Mint -> false. |
| 746 __ ret(); | 749 __ ret(); |
| 747 | 750 |
| 748 __ Bind(&receiver_not_smi); | 751 __ Bind(&receiver_not_smi); |
| 749 // EAX:: receiver. | 752 // EAX:: receiver. |
| 750 __ CompareClassId(EAX, kMintCid, EDI); | 753 __ CompareClassId(EAX, kMintCid, EDI); |
| 751 __ j(NOT_EQUAL, &fall_through); | 754 __ j(NOT_EQUAL, &fall_through); |
| 752 // Receiver is Mint, return false if right is Smi. | 755 // Receiver is Mint, return false if right is Smi. |
| 753 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. | 756 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument. |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2154 __ Bind(&true_label); | 2157 __ Bind(&true_label); |
| 2155 __ LoadObject(EAX, Bool::True()); | 2158 __ LoadObject(EAX, Bool::True()); |
| 2156 __ ret(); | 2159 __ ret(); |
| 2157 } | 2160 } |
| 2158 | 2161 |
| 2159 #undef __ | 2162 #undef __ |
| 2160 | 2163 |
| 2161 } // namespace dart | 2164 } // namespace dart |
| 2162 | 2165 |
| 2163 #endif // defined TARGET_ARCH_IA32 | 2166 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |