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

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

Issue 10933039: Make int an abstract class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now with correct base. 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
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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 __ cmpl(EDI, raw_null); 333 __ cmpl(EDI, raw_null);
334 __ j(EQUAL, is_instance_lbl); 334 __ j(EQUAL, is_instance_lbl);
335 const Type& object_type = Type::ZoneHandle(Type::ObjectType()); 335 const Type& object_type = Type::ZoneHandle(Type::ObjectType());
336 __ CompareObject(EDI, object_type); 336 __ CompareObject(EDI, object_type);
337 __ j(EQUAL, is_instance_lbl); 337 __ j(EQUAL, is_instance_lbl);
338 338
339 // For Smi check quickly against int and num interfaces. 339 // For Smi check quickly against int and num interfaces.
340 Label not_smi; 340 Label not_smi;
341 __ testl(EAX, Immediate(kSmiTagMask)); // Value is Smi? 341 __ testl(EAX, Immediate(kSmiTagMask)); // Value is Smi?
342 __ j(NOT_ZERO, &not_smi, Assembler::kNearJump); 342 __ j(NOT_ZERO, &not_smi, Assembler::kNearJump);
343 __ CompareObject(EDI, Type::ZoneHandle(Type::IntInterface())); 343 __ CompareObject(EDI, Type::ZoneHandle(Type::IntType()));
344 __ j(EQUAL, is_instance_lbl); 344 __ j(EQUAL, is_instance_lbl);
345 __ CompareObject(EDI, Type::ZoneHandle(Type::Number())); 345 __ CompareObject(EDI, Type::ZoneHandle(Type::Number()));
346 __ j(EQUAL, is_instance_lbl); 346 __ j(EQUAL, is_instance_lbl);
347 // Smi must be handled in runtime. 347 // Smi must be handled in runtime.
348 __ jmp(&fall_through); 348 __ jmp(&fall_through);
349 349
350 __ Bind(&not_smi); 350 __ Bind(&not_smi);
351 // EDX: instantiator type arguments. 351 // EDX: instantiator type arguments.
352 // EAX: instance. 352 // EAX: instance.
353 const Register kInstanceReg = EAX; 353 const Register kInstanceReg = EAX;
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 __ popl(ECX); 1383 __ popl(ECX);
1384 __ popl(EAX); 1384 __ popl(EAX);
1385 } 1385 }
1386 1386
1387 1387
1388 #undef __ 1388 #undef __
1389 1389
1390 } // namespace dart 1390 } // namespace dart
1391 1391
1392 #endif // defined TARGET_ARCH_IA32 1392 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698