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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | tests/isolate/port_test.dart » ('J')
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/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(EDI, kClassIdReg); 231 __ LoadClassById(EDI, kClassIdReg);
232 __ movl(EDI, FieldAddress(EDI, Class::signature_function_offset())); 232 __ movl(EDI, FieldAddress(EDI, Class::signature_function_offset()));
233 __ cmpl(EDI, raw_null); 233 __ cmpl(EDI, 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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 __ popl(ECX); 1499 __ popl(ECX);
1502 __ popl(EAX); 1500 __ popl(EAX);
1503 } 1501 }
1504 1502
1505 1503
1506 #undef __ 1504 #undef __
1507 1505
1508 } // namespace dart 1506 } // namespace dart
1509 1507
1510 #endif // defined TARGET_ARCH_IA32 1508 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | tests/isolate/port_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698