OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 intptr_t token_pos, | 1269 intptr_t token_pos, |
1270 LocationSummary* locs) { | 1270 LocationSummary* locs) { |
1271 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); | 1271 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); |
1272 const String& name = String::Handle(ic_data.target_name()); | 1272 const String& name = String::Handle(ic_data.target_name()); |
1273 const Array& arguments_descriptor = | 1273 const Array& arguments_descriptor = |
1274 Array::ZoneHandle(ic_data.arguments_descriptor()); | 1274 Array::ZoneHandle(ic_data.arguments_descriptor()); |
1275 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); | 1275 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); |
1276 const MegamorphicCache& cache = | 1276 const MegamorphicCache& cache = |
1277 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); | 1277 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); |
1278 Label load_cache; | 1278 Label load_cache; |
1279 __ movl(EAX, Address(ESP, (argument_count - 1) * kWordSize)); | 1279 __ movl(EBX, Address(ESP, (argument_count - 1) * kWordSize)); |
1280 __ LoadTaggedClassIdMayBeSmi(EAX, EAX, EBX); | 1280 __ LoadTaggedClassIdMayBeSmi(EAX, EBX); |
1281 | 1281 |
1282 // EAX: class ID of the receiver (smi). | 1282 // EAX: class ID of the receiver (smi). |
1283 __ Bind(&load_cache); | 1283 __ Bind(&load_cache); |
1284 __ LoadObject(EBX, cache); | 1284 __ LoadObject(EBX, cache); |
1285 __ movl(EDI, FieldAddress(EBX, MegamorphicCache::buckets_offset())); | 1285 __ movl(EDI, FieldAddress(EBX, MegamorphicCache::buckets_offset())); |
1286 __ movl(EBX, FieldAddress(EBX, MegamorphicCache::mask_offset())); | 1286 __ movl(EBX, FieldAddress(EBX, MegamorphicCache::mask_offset())); |
1287 // EDI: cache buckets array. | 1287 // EDI: cache buckets array. |
1288 // EBX: mask. | 1288 // EBX: mask. |
1289 __ movl(ECX, EAX); | 1289 __ movl(ECX, EAX); |
1290 | 1290 |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 __ movups(reg, Address(ESP, 0)); | 1765 __ movups(reg, Address(ESP, 0)); |
1766 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1766 __ addl(ESP, Immediate(kFpuRegisterSize)); |
1767 } | 1767 } |
1768 | 1768 |
1769 | 1769 |
1770 #undef __ | 1770 #undef __ |
1771 | 1771 |
1772 } // namespace dart | 1772 } // namespace dart |
1773 | 1773 |
1774 #endif // defined TARGET_ARCH_IA32 | 1774 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |