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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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/il_printer.cc ('k') | runtime/vm/intermediate_language_x64.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) 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_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 instance_call()->argument_names(), 2169 instance_call()->argument_names(),
2170 locs()); 2170 locs());
2171 return; 2171 return;
2172 } 2172 }
2173 2173
2174 // Load receiver into EAX. 2174 // Load receiver into EAX.
2175 __ movl(EAX, 2175 __ movl(EAX,
2176 Address(ESP, (instance_call()->ArgumentCount() - 1) * kWordSize)); 2176 Address(ESP, (instance_call()->ArgumentCount() - 1) * kWordSize));
2177 2177
2178 Label done; 2178 Label done;
2179 __ movl(EDI, Immediate(kSmiCid)); 2179 if (ic_data().GetReceiverClassIdAt(0) == kSmiCid) {
2180 __ testl(EAX, Immediate(kSmiTagMask)); 2180 __ movl(EDI, Immediate(kSmiCid));
2181 __ j(ZERO, &done); 2181 __ testl(EAX, Immediate(kSmiTagMask));
2182 __ j(ZERO, &done, Assembler::kNearJump);
2183 } else {
2184 __ testl(EAX, Immediate(kSmiTagMask));
2185 __ j(ZERO, deopt);
2186 }
2182 __ LoadClassId(EDI, EAX); 2187 __ LoadClassId(EDI, EAX);
2183 __ Bind(&done); 2188 __ Bind(&done);
2184 2189
2185 compiler->EmitTestAndCall(ic_data(), 2190 compiler->EmitTestAndCall(ic_data(),
2186 EDI, // Class id register. 2191 EDI, // Class id register.
2187 instance_call()->ArgumentCount(), 2192 instance_call()->ArgumentCount(),
2188 instance_call()->argument_names(), 2193 instance_call()->argument_names(),
2189 deopt, 2194 deopt,
2190 instance_call()->deopt_id(), 2195 instance_call()->deopt_id(),
2191 instance_call()->token_pos(), 2196 instance_call()->token_pos(),
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 __ j(ABOVE_EQUAL, deopt); 2306 __ j(ABOVE_EQUAL, deopt);
2302 } 2307 }
2303 } 2308 }
2304 2309
2305 2310
2306 } // namespace dart 2311 } // namespace dart
2307 2312
2308 #undef __ 2313 #undef __
2309 2314
2310 #endif // defined TARGET_ARCH_X64 2315 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698