| 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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 // Get length. | 1459 // Get length. |
| 1460 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object. | 1460 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object. |
| 1461 __ movq(RAX, FieldAddress(RAX, String::length_offset())); | 1461 __ movq(RAX, FieldAddress(RAX, String::length_offset())); |
| 1462 __ cmpq(RAX, Immediate(Smi::RawValue(0))); | 1462 __ cmpq(RAX, Immediate(Smi::RawValue(0))); |
| 1463 __ j(EQUAL, &is_true, Assembler::kNearJump); | 1463 __ j(EQUAL, &is_true, Assembler::kNearJump); |
| 1464 __ LoadObject(RAX, Bool::False()); | 1464 __ LoadObject(RAX, Bool::False()); |
| 1465 __ ret(); | 1465 __ ret(); |
| 1466 __ Bind(&is_true); | 1466 __ Bind(&is_true); |
| 1467 __ LoadObject(RAX, Bool::True()); | 1467 __ LoadObject(RAX, Bool::True()); |
| 1468 __ ret(); | 1468 __ ret(); |
| 1469 return true; | 1469 return false; |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 | 1472 |
| 1473 bool Intrinsifier::OneByteString_getHashCode(Assembler* assembler) { | 1473 bool Intrinsifier::OneByteString_getHashCode(Assembler* assembler) { |
| 1474 Label compute_hash; | 1474 Label compute_hash; |
| 1475 __ movq(RBX, Address(RSP, + 1 * kWordSize)); // OneByteString object. | 1475 __ movq(RBX, Address(RSP, + 1 * kWordSize)); // OneByteString object. |
| 1476 __ movq(RAX, FieldAddress(RBX, String::hash_offset())); | 1476 __ movq(RAX, FieldAddress(RBX, String::hash_offset())); |
| 1477 __ cmpq(RAX, Immediate(0)); | 1477 __ cmpq(RAX, Immediate(0)); |
| 1478 __ j(EQUAL, &compute_hash, Assembler::kNearJump); | 1478 __ j(EQUAL, &compute_hash, Assembler::kNearJump); |
| 1479 __ ret(); | 1479 __ ret(); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 __ Bind(&fall_through); | 1687 __ Bind(&fall_through); |
| 1688 return false; | 1688 return false; |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 | 1691 |
| 1692 #undef __ | 1692 #undef __ |
| 1693 | 1693 |
| 1694 } // namespace dart | 1694 } // namespace dart |
| 1695 | 1695 |
| 1696 #endif // defined TARGET_ARCH_X64 | 1696 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |