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

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

Issue 383443002: Removes branches from LoadTaggedClassIdMayBeSmi. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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_test.cc ('k') | runtime/vm/intermediate_language_ia32.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_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 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 LocationSummary* locs) { 1271 LocationSummary* locs) {
1272 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); 1272 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table();
1273 const String& name = String::Handle(ic_data.target_name()); 1273 const String& name = String::Handle(ic_data.target_name());
1274 const Array& arguments_descriptor = 1274 const Array& arguments_descriptor =
1275 Array::ZoneHandle(ic_data.arguments_descriptor()); 1275 Array::ZoneHandle(ic_data.arguments_descriptor());
1276 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1276 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1277 const MegamorphicCache& cache = 1277 const MegamorphicCache& cache =
1278 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); 1278 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor));
1279 Label load_cache; 1279 Label load_cache;
1280 __ movl(EAX, Address(ESP, (argument_count - 1) * kWordSize)); 1280 __ movl(EAX, Address(ESP, (argument_count - 1) * kWordSize));
1281 __ LoadTaggedClassIdMayBeSmi(EAX, EAX); 1281 __ LoadTaggedClassIdMayBeSmi(EAX, EAX, EBX);
1282 1282
1283 // EAX: class ID of the receiver (smi). 1283 // EAX: class ID of the receiver (smi).
1284 __ Bind(&load_cache); 1284 __ Bind(&load_cache);
1285 __ LoadObject(EBX, cache); 1285 __ LoadObject(EBX, cache);
1286 __ movl(EDI, FieldAddress(EBX, MegamorphicCache::buckets_offset())); 1286 __ movl(EDI, FieldAddress(EBX, MegamorphicCache::buckets_offset()));
1287 __ movl(EBX, FieldAddress(EBX, MegamorphicCache::mask_offset())); 1287 __ movl(EBX, FieldAddress(EBX, MegamorphicCache::mask_offset()));
1288 // EDI: cache buckets array. 1288 // EDI: cache buckets array.
1289 // EBX: mask. 1289 // EBX: mask.
1290 __ movl(ECX, EAX); 1290 __ movl(ECX, EAX);
1291 1291
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 __ movups(reg, Address(ESP, 0)); 1768 __ movups(reg, Address(ESP, 0));
1769 __ addl(ESP, Immediate(kFpuRegisterSize)); 1769 __ addl(ESP, Immediate(kFpuRegisterSize));
1770 } 1770 }
1771 1771
1772 1772
1773 #undef __ 1773 #undef __
1774 1774
1775 } // namespace dart 1775 } // namespace dart
1776 1776
1777 #endif // defined TARGET_ARCH_IA32 1777 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698