| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 intptr_t deopt_id, | 1229 intptr_t deopt_id, |
| 1230 intptr_t token_pos, | 1230 intptr_t token_pos, |
| 1231 LocationSummary* locs) { | 1231 LocationSummary* locs) { |
| 1232 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); | 1232 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); |
| 1233 const String& name = String::Handle(ic_data.target_name()); | 1233 const String& name = String::Handle(ic_data.target_name()); |
| 1234 const Array& arguments_descriptor = | 1234 const Array& arguments_descriptor = |
| 1235 Array::ZoneHandle(ic_data.arguments_descriptor()); | 1235 Array::ZoneHandle(ic_data.arguments_descriptor()); |
| 1236 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); | 1236 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); |
| 1237 const MegamorphicCache& cache = | 1237 const MegamorphicCache& cache = |
| 1238 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); | 1238 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); |
| 1239 Label not_smi, load_cache; | |
| 1240 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); | 1239 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); |
| 1241 __ tst(R0, Operand(kSmiTagMask)); | 1240 __ LoadTaggedClassIdMayBeSmi(R0, R0); |
| 1242 __ b(¬_smi, NE); | |
| 1243 __ mov(R0, Operand(Smi::RawValue(kSmiCid))); | |
| 1244 __ b(&load_cache); | |
| 1245 | |
| 1246 __ Bind(¬_smi); | |
| 1247 __ LoadClassId(R0, R0); | |
| 1248 __ SmiTag(R0); | |
| 1249 | 1241 |
| 1250 // R0: class ID of the receiver (smi). | 1242 // R0: class ID of the receiver (smi). |
| 1251 __ Bind(&load_cache); | |
| 1252 __ LoadObject(R1, cache); | 1243 __ LoadObject(R1, cache); |
| 1253 __ ldr(R2, FieldAddress(R1, MegamorphicCache::buckets_offset())); | 1244 __ ldr(R2, FieldAddress(R1, MegamorphicCache::buckets_offset())); |
| 1254 __ ldr(R1, FieldAddress(R1, MegamorphicCache::mask_offset())); | 1245 __ ldr(R1, FieldAddress(R1, MegamorphicCache::mask_offset())); |
| 1255 // R2: cache buckets array. | 1246 // R2: cache buckets array. |
| 1256 // R1: mask. | 1247 // R1: mask. |
| 1257 __ mov(R3, Operand(R0)); | 1248 __ mov(R3, Operand(R0)); |
| 1258 | 1249 |
| 1259 Label loop, update, call_target_function; | 1250 Label loop, update, call_target_function; |
| 1260 __ b(&loop); | 1251 __ b(&loop); |
| 1261 | 1252 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 DRegister dreg = EvenDRegisterOf(reg); | 1765 DRegister dreg = EvenDRegisterOf(reg); |
| 1775 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1766 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1776 } | 1767 } |
| 1777 | 1768 |
| 1778 | 1769 |
| 1779 #undef __ | 1770 #undef __ |
| 1780 | 1771 |
| 1781 } // namespace dart | 1772 } // namespace dart |
| 1782 | 1773 |
| 1783 #endif // defined TARGET_ARCH_ARM | 1774 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |