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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 11674011: Small code cleanup in instanceof test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 16516)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -200,21 +200,18 @@
ASSERT(!type_class.HasTypeArguments());
const Register kInstanceReg = EAX;
- Label compare_classes;
__ testl(kInstanceReg, Immediate(kSmiTagMask));
- __ j(NOT_ZERO, &compare_classes, Assembler::kNearJump);
- // Instance is Smi, check directly.
+ // If instance is Smi, check directly.
const Class& smi_class = Class::Handle(Smi::Class());
if (smi_class.IsSubtypeOf(TypeArguments::Handle(),
type_class,
TypeArguments::Handle(),
NULL)) {
- __ jmp(is_instance_lbl);
+ __ j(ZERO, is_instance_lbl);
} else {
- __ jmp(is_not_instance_lbl);
+ __ j(ZERO, is_not_instance_lbl);
}
// Compare if the classes are equal.
- __ Bind(&compare_classes);
const Register kClassIdReg = ECX;
__ LoadClassId(kClassIdReg, kInstanceReg);
__ cmpl(kClassIdReg, Immediate(type_class.id()));
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698