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

Side by Side Diff: runtime/vm/intrinsifier_x64.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/vm/intrinsifier_ia32.cc ('k') | tests/co19/co19-dart2dart.status » ('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 #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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 } 1429 }
1430 1430
1431 1431
1432 static const char* kFixedSizeArrayIteratorClassName = "_FixedSizeArrayIterator"; 1432 static const char* kFixedSizeArrayIteratorClassName = "_FixedSizeArrayIterator";
1433 1433
1434 // Class 'FixedSizeArrayIterator': 1434 // Class 'FixedSizeArrayIterator':
1435 // T next() { 1435 // T next() {
1436 // return _array[_pos++]; 1436 // return _array[_pos++];
1437 // } 1437 // }
1438 // Intrinsify: return _array[_pos++]; 1438 // Intrinsify: return _array[_pos++];
1439 // TODO(srdjan): Throw a 'NoMoreElementsException' exception if the iterator 1439 // TODO(srdjan): Throw a 'StateError' exception if the iterator
1440 // has no more elements. 1440 // has no more elements.
1441 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) { 1441 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) {
1442 Label fall_through; 1442 Label fall_through;
1443 const intptr_t array_offset = 1443 const intptr_t array_offset =
1444 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_array"); 1444 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_array");
1445 const intptr_t pos_offset = 1445 const intptr_t pos_offset =
1446 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos"); 1446 GetOffsetForField(kFixedSizeArrayIteratorClassName, "_pos");
1447 ASSERT((array_offset >= 0) && (pos_offset >= 0)); 1447 ASSERT((array_offset >= 0) && (pos_offset >= 0));
1448 // Receiver is not NULL. 1448 // Receiver is not NULL.
1449 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver. 1449 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698