| 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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 // Get length. | 1543 // Get length. |
| 1544 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object. | 1544 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object. |
| 1545 __ movl(EAX, FieldAddress(EAX, String::length_offset())); | 1545 __ movl(EAX, FieldAddress(EAX, String::length_offset())); |
| 1546 __ cmpl(EAX, Immediate(Smi::RawValue(0))); | 1546 __ cmpl(EAX, Immediate(Smi::RawValue(0))); |
| 1547 __ j(EQUAL, &is_true, Assembler::kNearJump); | 1547 __ j(EQUAL, &is_true, Assembler::kNearJump); |
| 1548 __ LoadObject(EAX, Bool::False()); | 1548 __ LoadObject(EAX, Bool::False()); |
| 1549 __ ret(); | 1549 __ ret(); |
| 1550 __ Bind(&is_true); | 1550 __ Bind(&is_true); |
| 1551 __ LoadObject(EAX, Bool::True()); | 1551 __ LoadObject(EAX, Bool::True()); |
| 1552 __ ret(); | 1552 __ ret(); |
| 1553 return true; | 1553 return false; |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 | 1556 |
| 1557 bool Intrinsifier::OneByteString_getHashCode(Assembler* assembler) { | 1557 bool Intrinsifier::OneByteString_getHashCode(Assembler* assembler) { |
| 1558 Label compute_hash; | 1558 Label compute_hash; |
| 1559 __ movl(EBX, Address(ESP, + 1 * kWordSize)); // OneByteString object. | 1559 __ movl(EBX, Address(ESP, + 1 * kWordSize)); // OneByteString object. |
| 1560 __ movl(EAX, FieldAddress(EBX, String::hash_offset())); | 1560 __ movl(EAX, FieldAddress(EBX, String::hash_offset())); |
| 1561 __ cmpl(EAX, Immediate(0)); | 1561 __ cmpl(EAX, Immediate(0)); |
| 1562 __ j(EQUAL, &compute_hash, Assembler::kNearJump); | 1562 __ j(EQUAL, &compute_hash, Assembler::kNearJump); |
| 1563 __ ret(); | 1563 __ ret(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 __ ret(); | 1767 __ ret(); |
| 1768 | 1768 |
| 1769 __ Bind(&fall_through); | 1769 __ Bind(&fall_through); |
| 1770 return false; | 1770 return false; |
| 1771 } | 1771 } |
| 1772 | 1772 |
| 1773 #undef __ | 1773 #undef __ |
| 1774 } // namespace dart | 1774 } // namespace dart |
| 1775 | 1775 |
| 1776 #endif // defined TARGET_ARCH_IA32 | 1776 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |