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

Unified Diff: vm/flow_graph_compiler_x64.cc

Issue 10541112: - Do not use near jumps for large number of sequential class id (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/flow_graph_compiler_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_compiler_x64.cc
===================================================================
--- vm/flow_graph_compiler_x64.cc (revision 8524)
+++ vm/flow_graph_compiler_x64.cc (working copy)
@@ -994,13 +994,15 @@
__ testq(instance_reg, Immediate(kSmiTagMask));
__ j(ZERO, deopt);
Label is_ok;
+ bool jump_style = (class_ids.length() < 5) ?
+ Assembler::kNearJump : Assembler::kFarJump;
__ LoadClassId(temp_reg, instance_reg);
for (intptr_t i = 0; i < class_ids.length(); i++) {
__ cmpl(temp_reg, Immediate(class_ids[i]));
if (i == (class_ids.length() - 1)) {
__ j(NOT_EQUAL, deopt);
} else {
- __ j(EQUAL, &is_ok, Assembler::kNearJump);
+ __ j(EQUAL, &is_ok, jump_style);
}
}
__ Bind(&is_ok);
« no previous file with comments | « vm/flow_graph_compiler_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698