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

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

Issue 392343002: Cleanup of class id loading sequences. (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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/intermediate_language_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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 intptr_t deopt_id, 1305 intptr_t deopt_id,
1306 intptr_t token_pos, 1306 intptr_t token_pos,
1307 LocationSummary* locs) { 1307 LocationSummary* locs) {
1308 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); 1308 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table();
1309 const String& name = String::Handle(ic_data.target_name()); 1309 const String& name = String::Handle(ic_data.target_name());
1310 const Array& arguments_descriptor = 1310 const Array& arguments_descriptor =
1311 Array::ZoneHandle(ic_data.arguments_descriptor()); 1311 Array::ZoneHandle(ic_data.arguments_descriptor());
1312 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1312 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1313 const MegamorphicCache& cache = 1313 const MegamorphicCache& cache =
1314 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor)); 1314 MegamorphicCache::ZoneHandle(table->Lookup(name, arguments_descriptor));
1315 __ movq(RAX, Address(RSP, (argument_count - 1) * kWordSize)); 1315 __ movq(RBX, Address(RSP, (argument_count - 1) * kWordSize));
1316 __ LoadTaggedClassIdMayBeSmi(RAX, RAX); 1316 __ LoadTaggedClassIdMayBeSmi(RAX, RBX);
1317 1317
1318 // RAX: class ID of the receiver (smi). 1318 // RAX: class ID of the receiver (smi).
1319 __ LoadObject(RBX, cache, PP); 1319 __ LoadObject(RBX, cache, PP);
1320 __ movq(RDI, FieldAddress(RBX, MegamorphicCache::buckets_offset())); 1320 __ movq(RDI, FieldAddress(RBX, MegamorphicCache::buckets_offset()));
1321 __ movq(RBX, FieldAddress(RBX, MegamorphicCache::mask_offset())); 1321 __ movq(RBX, FieldAddress(RBX, MegamorphicCache::mask_offset()));
1322 // RDI: cache buckets array. 1322 // RDI: cache buckets array.
1323 // RBX: mask. 1323 // RBX: mask.
1324 __ movq(RCX, RAX); 1324 __ movq(RCX, RAX);
1325 1325
1326 Label loop, update, call_target_function; 1326 Label loop, update, call_target_function;
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 __ movups(reg, Address(RSP, 0)); 1726 __ movups(reg, Address(RSP, 0));
1727 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1727 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1728 } 1728 }
1729 1729
1730 1730
1731 #undef __ 1731 #undef __
1732 1732
1733 } // namespace dart 1733 } // namespace dart
1734 1734
1735 #endif // defined TARGET_ARCH_X64 1735 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698