Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: runtime/vm/intrinsifier_ia32.cc

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 FieldAddress(EAX, pos_offset), 1569 FieldAddress(EAX, pos_offset),
1570 EBX); // Store _pos. 1570 EBX); // Store _pos.
1571 __ movl(EAX, EDI); 1571 __ movl(EAX, EDI);
1572 __ ret(); 1572 __ ret();
1573 __ Bind(&fall_through); 1573 __ Bind(&fall_through);
1574 return false; 1574 return false;
1575 } 1575 }
1576 1576
1577 1577
1578 // Class 'FixedSizeArrayIterator': 1578 // Class 'FixedSizeArrayIterator':
1579 // bool hasNext() { 1579 // bool get hasNext {
1580 // return _length > _pos; 1580 // return _length > _pos;
1581 // } 1581 // }
1582 bool Intrinsifier::FixedSizeArrayIterator_hasNext(Assembler* assembler) { 1582 bool Intrinsifier::FixedSizeArrayIterator_getHasNext(Assembler* assembler) {
1583 Label fall_through, is_true; 1583 Label fall_through, is_true;
1584 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); 1584 const Bool& bool_true = Bool::ZoneHandle(Bool::True());
1585 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); 1585 const Bool& bool_false = Bool::ZoneHandle(Bool::False());
1586 intptr_t length_offset = 1586 intptr_t length_offset =
1587 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_length"); 1587 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_length");
1588 intptr_t pos_offset = 1588 intptr_t pos_offset =
1589 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos"); 1589 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos");
1590 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Receiver. 1590 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Receiver.
1591 __ movl(EBX, FieldAddress(EAX, length_offset)); // Field _length. 1591 __ movl(EBX, FieldAddress(EAX, length_offset)); // Field _length.
1592 __ movl(EAX, FieldAddress(EAX, pos_offset)); // Field _pos. 1592 __ movl(EAX, FieldAddress(EAX, pos_offset)); // Field _pos.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 __ Bind(&is_true); 1663 __ Bind(&is_true);
1664 __ LoadObject(EAX, bool_true); 1664 __ LoadObject(EAX, bool_true);
1665 __ ret(); 1665 __ ret();
1666 return true; 1666 return true;
1667 } 1667 }
1668 1668
1669 #undef __ 1669 #undef __
1670 } // namespace dart 1670 } // namespace dart
1671 1671
1672 #endif // defined TARGET_ARCH_IA32 1672 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698