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" |
11 #include "vm/assembler_macros.h" | 11 #include "vm/assembler_macros.h" |
12 #include "vm/instructions.h" | 12 #include "vm/instructions.h" |
13 #include "vm/object_store.h" | 13 #include "vm/object_store.h" |
| 14 #include "vm/symbols.h" |
14 | 15 |
15 namespace dart { | 16 namespace dart { |
16 | 17 |
17 DECLARE_FLAG(bool, enable_type_checks); | 18 DECLARE_FLAG(bool, enable_type_checks); |
18 | 19 |
19 // When entering intrinsics code: | 20 // When entering intrinsics code: |
20 // RBX: IC Data | 21 // RBX: IC Data |
21 // R10: Arguments descriptor | 22 // R10: Arguments descriptor |
22 // TOS: Return address | 23 // TOS: Return address |
23 // The RBX, R10 registers can be destroyed only if there is no slow-path (i.e., | 24 // The RBX, R10 registers can be destroyed only if there is no slow-path (i.e., |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 __ ret(); | 1164 __ ret(); |
1164 __ Bind(&is_true); | 1165 __ Bind(&is_true); |
1165 __ LoadObject(RAX, bool_true); | 1166 __ LoadObject(RAX, bool_true); |
1166 __ ret(); | 1167 __ ret(); |
1167 return true; | 1168 return true; |
1168 } | 1169 } |
1169 | 1170 |
1170 | 1171 |
1171 static intptr_t GetOffsetForField(const char* class_name_p, | 1172 static intptr_t GetOffsetForField(const char* class_name_p, |
1172 const char* field_name_p) { | 1173 const char* field_name_p) { |
1173 const String& class_name = String::Handle(String::NewSymbol(class_name_p)); | 1174 const String& class_name = String::Handle(Symbols::New(class_name_p)); |
1174 const String& field_name = String::Handle(String::NewSymbol(field_name_p)); | 1175 const String& field_name = String::Handle(Symbols::New(field_name_p)); |
1175 const Class& cls = Class::Handle(Library::Handle( | 1176 const Class& cls = Class::Handle(Library::Handle( |
1176 Library::CoreImplLibrary()).LookupClass(class_name)); | 1177 Library::CoreImplLibrary()).LookupClass(class_name)); |
1177 ASSERT(!cls.IsNull()); | 1178 ASSERT(!cls.IsNull()); |
1178 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name)); | 1179 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name)); |
1179 ASSERT(!field.IsNull()); | 1180 ASSERT(!field.IsNull()); |
1180 return field.Offset(); | 1181 return field.Offset(); |
1181 } | 1182 } |
1182 | 1183 |
1183 static const char* kFixedSizeArrayIteratorClassName = "FixedSizeArrayIterator"; | 1184 static const char* kFixedSizeArrayIteratorClassName = "FixedSizeArrayIterator"; |
1184 | 1185 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 __ LoadObject(RAX, bool_true); | 1319 __ LoadObject(RAX, bool_true); |
1319 __ ret(); | 1320 __ ret(); |
1320 return true; | 1321 return true; |
1321 } | 1322 } |
1322 | 1323 |
1323 #undef __ | 1324 #undef __ |
1324 | 1325 |
1325 } // namespace dart | 1326 } // namespace dart |
1326 | 1327 |
1327 #endif // defined TARGET_ARCH_X64 | 1328 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |