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

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

Issue 10933025: PolymorphicInstanceCall: eliminate duplicate printing of ICData; eliminate Smi class id loading if … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/intermediate_language_ia32.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 instance_call()->ArgumentCount(), 2195 instance_call()->ArgumentCount(),
2196 instance_call()->argument_names(), 2196 instance_call()->argument_names(),
2197 locs()); 2197 locs());
2198 return; 2198 return;
2199 } 2199 }
2200 2200
2201 // Load receiver into RAX. 2201 // Load receiver into RAX.
2202 __ movq(RAX, 2202 __ movq(RAX,
2203 Address(RSP, (instance_call()->ArgumentCount() - 1) * kWordSize)); 2203 Address(RSP, (instance_call()->ArgumentCount() - 1) * kWordSize));
2204 Label done; 2204 Label done;
2205 __ movq(RDI, Immediate(kSmiCid)); 2205 if (ic_data().GetReceiverClassIdAt(0) == kSmiCid) {
2206 __ testq(RAX, Immediate(kSmiTagMask)); 2206 __ movq(RDI, Immediate(kSmiCid));
2207 __ j(ZERO, &done); 2207 __ testq(RAX, Immediate(kSmiTagMask));
2208 __ j(ZERO, &done, Assembler::kNearJump);
2209 } else {
2210 __ testq(RAX, Immediate(kSmiTagMask));
2211 __ j(ZERO, deopt);
2212 }
2208 __ LoadClassId(RDI, RAX); 2213 __ LoadClassId(RDI, RAX);
2209 __ Bind(&done); 2214 __ Bind(&done);
2210 compiler->EmitTestAndCall(ic_data(), 2215 compiler->EmitTestAndCall(ic_data(),
2211 RDI, // Class id register. 2216 RDI, // Class id register.
2212 instance_call()->ArgumentCount(), 2217 instance_call()->ArgumentCount(),
2213 instance_call()->argument_names(), 2218 instance_call()->argument_names(),
2214 deopt, 2219 deopt,
2215 instance_call()->deopt_id(), 2220 instance_call()->deopt_id(),
2216 instance_call()->token_pos(), 2221 instance_call()->token_pos(),
2217 locs()); 2222 locs());
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 __ j(ABOVE_EQUAL, deopt); 2331 __ j(ABOVE_EQUAL, deopt);
2327 } 2332 }
2328 } 2333 }
2329 2334
2330 2335
2331 } // namespace dart 2336 } // namespace dart
2332 2337
2333 #undef __ 2338 #undef __
2334 2339
2335 #endif // defined TARGET_ARCH_X64 2340 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698