| 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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 const String& class_name = String::Handle(Symbols::New(class_name_p)); | 1238 const String& class_name = String::Handle(Symbols::New(class_name_p)); |
| 1239 const String& field_name = String::Handle(Symbols::New(field_name_p)); | 1239 const String& field_name = String::Handle(Symbols::New(field_name_p)); |
| 1240 const Class& cls = Class::Handle(Library::Handle( | 1240 const Class& cls = Class::Handle(Library::Handle( |
| 1241 Library::CoreImplLibrary()).LookupClass(class_name)); | 1241 Library::CoreImplLibrary()).LookupClass(class_name)); |
| 1242 ASSERT(!cls.IsNull()); | 1242 ASSERT(!cls.IsNull()); |
| 1243 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name)); | 1243 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name)); |
| 1244 ASSERT(!field.IsNull()); | 1244 ASSERT(!field.IsNull()); |
| 1245 return field.Offset(); | 1245 return field.Offset(); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 static const char* kFixedSizeArrayIteratorClassName = "FixedSizeArrayIterator"; | 1248 static const char* kFixedSizeArrayIteratorClassName = "_FixedSizeArrayIterator"; |
| 1249 | 1249 |
| 1250 // Class 'FixedSizeArrayIterator': | 1250 // Class 'FixedSizeArrayIterator': |
| 1251 // T next() { | 1251 // T next() { |
| 1252 // return _array[_pos++]; | 1252 // return _array[_pos++]; |
| 1253 // } | 1253 // } |
| 1254 // Intrinsify: return _array[_pos++]; | 1254 // Intrinsify: return _array[_pos++]; |
| 1255 // TODO(srdjan): Throw a 'NoMoreElementsException' exception if the iterator | 1255 // TODO(srdjan): Throw a 'NoMoreElementsException' exception if the iterator |
| 1256 // has no more elements. | 1256 // has no more elements. |
| 1257 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) { | 1257 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) { |
| 1258 Label fall_through; | 1258 Label fall_through; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 __ LoadObject(RAX, bool_true); | 1383 __ LoadObject(RAX, bool_true); |
| 1384 __ ret(); | 1384 __ ret(); |
| 1385 return true; | 1385 return true; |
| 1386 } | 1386 } |
| 1387 | 1387 |
| 1388 #undef __ | 1388 #undef __ |
| 1389 | 1389 |
| 1390 } // namespace dart | 1390 } // namespace dart |
| 1391 | 1391 |
| 1392 #endif // defined TARGET_ARCH_X64 | 1392 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |