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