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 #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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 FieldAddress(RAX, pos_offset), | 1472 FieldAddress(RAX, pos_offset), |
1473 RCX); // Store _pos. | 1473 RCX); // Store _pos. |
1474 __ movq(RAX, RDI); | 1474 __ movq(RAX, RDI); |
1475 __ ret(); | 1475 __ ret(); |
1476 __ Bind(&fall_through); | 1476 __ Bind(&fall_through); |
1477 return false; | 1477 return false; |
1478 } | 1478 } |
1479 | 1479 |
1480 | 1480 |
1481 // Class 'FixedSizeArrayIterator': | 1481 // Class 'FixedSizeArrayIterator': |
1482 // bool hasNext() { | 1482 // bool get hasNext { |
1483 // return _length > _pos; | 1483 // return _length > _pos; |
1484 // } | 1484 // } |
1485 bool Intrinsifier::FixedSizeArrayIterator_hasNext(Assembler* assembler) { | 1485 bool Intrinsifier::FixedSizeArrayIterator_getHasNext(Assembler* assembler) { |
1486 Label fall_through, is_true; | 1486 Label fall_through, is_true; |
1487 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); | 1487 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); |
1488 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); | 1488 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); |
1489 const intptr_t length_offset = | 1489 const intptr_t length_offset = |
1490 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_length"); | 1490 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_length"); |
1491 const intptr_t pos_offset = | 1491 const intptr_t pos_offset = |
1492 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos"); | 1492 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos"); |
1493 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver. | 1493 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver. |
1494 __ movq(RCX, FieldAddress(RAX, length_offset)); // Field _length. | 1494 __ movq(RCX, FieldAddress(RAX, length_offset)); // Field _length. |
1495 __ movq(RAX, FieldAddress(RAX, pos_offset)); // Field _pos. | 1495 __ movq(RAX, FieldAddress(RAX, pos_offset)); // Field _pos. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 __ LoadObject(RAX, bool_true); | 1567 __ LoadObject(RAX, bool_true); |
1568 __ ret(); | 1568 __ ret(); |
1569 return true; | 1569 return true; |
1570 } | 1570 } |
1571 | 1571 |
1572 #undef __ | 1572 #undef __ |
1573 | 1573 |
1574 } // namespace dart | 1574 } // namespace dart |
1575 | 1575 |
1576 #endif // defined TARGET_ARCH_X64 | 1576 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |