Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 313083008: Add LoadTaggedClassIdMayBeSmi to assembly and improve performance of inline cache stubs. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 intptr_t deopt_id, 1225 intptr_t deopt_id,
1226 intptr_t token_pos, 1226 intptr_t token_pos,
1227 LocationSummary* locs) { 1227 LocationSummary* locs) {
1228 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); 1228 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table();
1229 const String& name = String::Handle(ic_data.target_name()); 1229 const String& name = String::Handle(ic_data.target_name());
1230 const Array& arguments_descriptor = 1230 const Array& arguments_descriptor =
1231 Array::ZoneHandle(ic_data.arguments_descriptor()); 1231 Array::ZoneHandle(ic_data.arguments_descriptor());
1232 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1232 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1233 const MegamorphicCache& cache = 1233 const MegamorphicCache& cache =
1234 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); 1234 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor));
1235 Label not_smi, load_cache;
1236 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); 1235 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize);
1237 __ tst(R0, Operand(kSmiTagMask)); 1236 __ LoadTaggedClassIdMayBeSmi(R0, R0);
1238 __ LoadClassId(R0, R0, NE);
1239 __ SmiTag(R0, NE);
1240 __ mov(R0, Operand(Smi::RawValue(kSmiCid)), EQ);
1241 __ b(&load_cache, EQ);
1242 1237
1243 // R0: class ID of the receiver (smi). 1238 // R0: class ID of the receiver (smi).
1244 __ Bind(&load_cache);
1245 __ LoadObject(R1, cache); 1239 __ LoadObject(R1, cache);
1246 __ ldr(R2, FieldAddress(R1, MegamorphicCache::buckets_offset())); 1240 __ ldr(R2, FieldAddress(R1, MegamorphicCache::buckets_offset()));
1247 __ ldr(R1, FieldAddress(R1, MegamorphicCache::mask_offset())); 1241 __ ldr(R1, FieldAddress(R1, MegamorphicCache::mask_offset()));
1248 // R2: cache buckets array. 1242 // R2: cache buckets array.
1249 // R1: mask. 1243 // R1: mask.
1250 __ mov(R3, Operand(R0)); 1244 __ mov(R3, Operand(R0));
1251 1245
1252 Label loop, update, call_target_function; 1246 Label loop, update, call_target_function;
1253 __ b(&loop); 1247 __ b(&loop);
1254 1248
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 DRegister dreg = EvenDRegisterOf(reg); 1761 DRegister dreg = EvenDRegisterOf(reg);
1768 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1762 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1769 } 1763 }
1770 1764
1771 1765
1772 #undef __ 1766 #undef __
1773 1767
1774 } // namespace dart 1768 } // namespace dart
1775 1769
1776 #endif // defined TARGET_ARCH_ARM 1770 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698