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

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

Issue 11698002: Fix instance of test for classes that implement call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return false; 225 return false;
226 } 226 }
227 if (type.IsFunctionType()) { 227 if (type.IsFunctionType()) {
228 // Check if instance is a closure. 228 // Check if instance is a closure.
229 const Immediate raw_null = 229 const Immediate raw_null =
230 Immediate(reinterpret_cast<intptr_t>(Object::null())); 230 Immediate(reinterpret_cast<intptr_t>(Object::null()));
231 __ LoadClassById(R13, kClassIdReg); 231 __ LoadClassById(R13, kClassIdReg);
232 __ movq(R13, FieldAddress(R13, Class::signature_function_offset())); 232 __ movq(R13, FieldAddress(R13, Class::signature_function_offset()));
233 __ cmpq(R13, raw_null); 233 __ cmpq(R13, raw_null);
234 __ j(NOT_EQUAL, is_instance_lbl); 234 __ j(NOT_EQUAL, is_instance_lbl);
235 __ jmp(is_not_instance_lbl);
236 return false;
237 } 235 }
238 // Custom checking for numbers (Smi, Mint, Bigint and Double). 236 // Custom checking for numbers (Smi, Mint, Bigint and Double).
239 // Note that instance is not Smi (checked above). 237 // Note that instance is not Smi (checked above).
240 if (type.IsSubtypeOf(Type::Handle(Type::Number()), NULL)) { 238 if (type.IsSubtypeOf(Type::Handle(Type::Number()), NULL)) {
241 GenerateNumberTypeCheck( 239 GenerateNumberTypeCheck(
242 kClassIdReg, type, is_instance_lbl, is_not_instance_lbl); 240 kClassIdReg, type, is_instance_lbl, is_not_instance_lbl);
243 return false; 241 return false;
244 } 242 }
245 if (type.IsStringType()) { 243 if (type.IsStringType()) {
246 GenerateStringTypeCheck(kClassIdReg, is_instance_lbl, is_not_instance_lbl); 244 GenerateStringTypeCheck(kClassIdReg, is_instance_lbl, is_not_instance_lbl);
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1477 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1480 __ Exchange(mem1, mem2); 1478 __ Exchange(mem1, mem2);
1481 } 1479 }
1482 1480
1483 1481
1484 #undef __ 1482 #undef __
1485 1483
1486 } // namespace dart 1484 } // namespace dart
1487 1485
1488 #endif // defined TARGET_ARCH_X64 1486 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698