| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 intptr_t token_pos, | 1274 intptr_t token_pos, |
| 1275 LocationSummary* locs) { | 1275 LocationSummary* locs) { |
| 1276 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); | 1276 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); |
| 1277 const String& name = String::Handle(ic_data.target_name()); | 1277 const String& name = String::Handle(ic_data.target_name()); |
| 1278 const Array& arguments_descriptor = | 1278 const Array& arguments_descriptor = |
| 1279 Array::ZoneHandle(ic_data.arguments_descriptor()); | 1279 Array::ZoneHandle(ic_data.arguments_descriptor()); |
| 1280 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); | 1280 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); |
| 1281 const MegamorphicCache& cache = | 1281 const MegamorphicCache& cache = |
| 1282 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); | 1282 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); |
| 1283 __ TraceSimMsg("MegamorphicInstanceCall"); | 1283 __ TraceSimMsg("MegamorphicInstanceCall"); |
| 1284 __ lw(T0, Address(SP, (argument_count - 1) * kWordSize)); | 1284 __ lw(T1, Address(SP, (argument_count - 1) * kWordSize)); |
| 1285 __ LoadTaggedClassIdMayBeSmi(T0, T0); | 1285 __ LoadTaggedClassIdMayBeSmi(T0, T1); |
| 1286 | 1286 |
| 1287 // T0: class ID of the receiver (smi). | 1287 // T0: class ID of the receiver (smi). |
| 1288 __ LoadObject(T1, cache); | 1288 __ LoadObject(T1, cache); |
| 1289 __ lw(T2, FieldAddress(T1, MegamorphicCache::buckets_offset())); | 1289 __ lw(T2, FieldAddress(T1, MegamorphicCache::buckets_offset())); |
| 1290 __ lw(T1, FieldAddress(T1, MegamorphicCache::mask_offset())); | 1290 __ lw(T1, FieldAddress(T1, MegamorphicCache::mask_offset())); |
| 1291 // T2: cache buckets array. | 1291 // T2: cache buckets array. |
| 1292 // T1: mask. | 1292 // T1: mask. |
| 1293 __ mov(T3, T0); | 1293 __ mov(T3, T0); |
| 1294 | 1294 |
| 1295 Label loop, update, call_target_function; | 1295 Label loop, update, call_target_function; |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1816 __ AddImmediate(SP, kDoubleSize); | 1816 __ AddImmediate(SP, kDoubleSize); |
| 1817 } | 1817 } |
| 1818 | 1818 |
| 1819 | 1819 |
| 1820 #undef __ | 1820 #undef __ |
| 1821 | 1821 |
| 1822 | 1822 |
| 1823 } // namespace dart | 1823 } // namespace dart |
| 1824 | 1824 |
| 1825 #endif // defined TARGET_ARCH_MIPS | 1825 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |