| 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 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | 1239 Label not_smi, load_cache; |
| 1240 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); | 1240 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); |
| 1241 __ tst(R0, Operand(kSmiTagMask)); | 1241 __ tst(R0, Operand(kSmiTagMask)); |
| 1242 __ b(¬_smi, NE); | 1242 __ LoadClassId(R0, R0, NE); |
| 1243 __ mov(R0, Operand(Smi::RawValue(kSmiCid))); | 1243 __ SmiTag(R0, NE); |
| 1244 __ b(&load_cache); | 1244 __ mov(R0, Operand(Smi::RawValue(kSmiCid)), EQ); |
| 1245 | 1245 __ b(&load_cache, EQ); |
| 1246 __ Bind(¬_smi); | |
| 1247 __ LoadClassId(R0, R0); | |
| 1248 __ SmiTag(R0); | |
| 1249 | 1246 |
| 1250 // R0: class ID of the receiver (smi). | 1247 // R0: class ID of the receiver (smi). |
| 1251 __ Bind(&load_cache); | 1248 __ Bind(&load_cache); |
| 1252 __ LoadObject(R1, cache); | 1249 __ LoadObject(R1, cache); |
| 1253 __ ldr(R2, FieldAddress(R1, MegamorphicCache::buckets_offset())); | 1250 __ ldr(R2, FieldAddress(R1, MegamorphicCache::buckets_offset())); |
| 1254 __ ldr(R1, FieldAddress(R1, MegamorphicCache::mask_offset())); | 1251 __ ldr(R1, FieldAddress(R1, MegamorphicCache::mask_offset())); |
| 1255 // R2: cache buckets array. | 1252 // R2: cache buckets array. |
| 1256 // R1: mask. | 1253 // R1: mask. |
| 1257 __ mov(R3, Operand(R0)); | 1254 __ mov(R3, Operand(R0)); |
| 1258 | 1255 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 DRegister dreg = EvenDRegisterOf(reg); | 1771 DRegister dreg = EvenDRegisterOf(reg); |
| 1775 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1772 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1776 } | 1773 } |
| 1777 | 1774 |
| 1778 | 1775 |
| 1779 #undef __ | 1776 #undef __ |
| 1780 | 1777 |
| 1781 } // namespace dart | 1778 } // namespace dart |
| 1782 | 1779 |
| 1783 #endif // defined TARGET_ARCH_ARM | 1780 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |