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

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

Issue 11269045: Convert NoMoreElementsException and EmptyQueueException to StateError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/lib/byte_array.dart ('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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 1595
1596 1596
1597 static const char* kFixedSizeArrayIteratorClassName = "_FixedSizeArrayIterator"; 1597 static const char* kFixedSizeArrayIteratorClassName = "_FixedSizeArrayIterator";
1598 1598
1599 1599
1600 // Class 'FixedSizeArrayIterator': 1600 // Class 'FixedSizeArrayIterator':
1601 // T next() { 1601 // T next() {
1602 // return _array[_pos++]; 1602 // return _array[_pos++];
1603 // } 1603 // }
1604 // Intrinsify: return _array[_pos++]; 1604 // Intrinsify: return _array[_pos++];
1605 // TODO(srdjan): Throw a 'NoMoreElementsException' exception if the iterator 1605 // TODO(srdjan): Throw a 'StateError' exception if the iterator
1606 // has no more elements. 1606 // has no more elements.
1607 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) { 1607 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) {
1608 Label fall_through; 1608 Label fall_through;
1609 intptr_t array_offset = 1609 intptr_t array_offset =
1610 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_array"); 1610 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_array");
1611 intptr_t pos_offset = 1611 intptr_t pos_offset =
1612 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos"); 1612 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos");
1613 ASSERT(array_offset >= 0 && pos_offset >= 0); 1613 ASSERT(array_offset >= 0 && pos_offset >= 0);
1614 // Receiver is not NULL. 1614 // Receiver is not NULL.
1615 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Receiver. 1615 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Receiver.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 __ Bind(&is_true); 1732 __ Bind(&is_true);
1733 __ LoadObject(EAX, bool_true); 1733 __ LoadObject(EAX, bool_true);
1734 __ ret(); 1734 __ ret();
1735 return true; 1735 return true;
1736 } 1736 }
1737 1737
1738 #undef __ 1738 #undef __
1739 } // namespace dart 1739 } // namespace dart
1740 1740
1741 #endif // defined TARGET_ARCH_IA32 1741 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/lib/byte_array.dart ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698