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

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

Issue 10874071: Eliminate interface bool (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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_optimizer.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_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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 __ Bind(&compare_classes); 228 __ Bind(&compare_classes);
229 const Register kClassIdReg = R10; 229 const Register kClassIdReg = R10;
230 __ LoadClassId(kClassIdReg, kInstanceReg); 230 __ LoadClassId(kClassIdReg, kInstanceReg);
231 // If type is an interface, we can skip the class equality check. 231 // If type is an interface, we can skip the class equality check.
232 if (!type_class.is_interface()) { 232 if (!type_class.is_interface()) {
233 __ cmpl(kClassIdReg, Immediate(type_class.id())); 233 __ cmpl(kClassIdReg, Immediate(type_class.id()));
234 __ j(EQUAL, is_instance_lbl); 234 __ j(EQUAL, is_instance_lbl);
235 } 235 }
236 // Bool interface can be implemented only by core class Bool. 236 // Bool interface can be implemented only by core class Bool.
237 // (see ClassFinalizer::ResolveInterfaces for list of restricted interfaces). 237 // (see ClassFinalizer::ResolveInterfaces for list of restricted interfaces).
238 if (type.IsBoolInterface()) { 238 if (type.IsBoolType()) {
239 __ cmpl(kClassIdReg, Immediate(kBoolCid)); 239 __ cmpl(kClassIdReg, Immediate(kBoolCid));
240 __ j(EQUAL, is_instance_lbl); 240 __ j(EQUAL, is_instance_lbl);
241 __ jmp(is_not_instance_lbl); 241 __ jmp(is_not_instance_lbl);
242 return false; 242 return false;
243 } 243 }
244 if (type.IsFunctionType()) { 244 if (type.IsFunctionType()) {
245 // Check if instance is a closure. 245 // Check if instance is a closure.
246 const Immediate raw_null = 246 const Immediate raw_null =
247 Immediate(reinterpret_cast<intptr_t>(Object::null())); 247 Immediate(reinterpret_cast<intptr_t>(Object::null()));
248 __ LoadClassById(R13, kClassIdReg); 248 __ LoadClassById(R13, kClassIdReg);
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1300 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1301 __ Exchange(mem1, mem2); 1301 __ Exchange(mem1, mem2);
1302 } 1302 }
1303 1303
1304 1304
1305 #undef __ 1305 #undef __
1306 1306
1307 } // namespace dart 1307 } // namespace dart
1308 1308
1309 #endif // defined TARGET_ARCH_X64 1309 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698