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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10536145: Fuse comparisons that are used by branches together. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments 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 | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index eb4a278059377335990acd5144363e4f78760297..a36b040d81fee2800e0561e5dac4b6e51f9243a2 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -59,8 +59,7 @@ void FlowGraphCompiler::GenerateBoolToJump(Register bool_register,
Label fall_through;
__ cmpq(bool_register, raw_null);
__ j(EQUAL, &fall_through, Assembler::kNearJump);
- const Bool& bool_true = Bool::ZoneHandle(Bool::True());
- __ CompareObject(bool_register, bool_true);
+ __ CompareObject(bool_register, bool_true());
__ j(EQUAL, is_true);
__ jmp(is_false);
__ Bind(&fall_through);
@@ -566,8 +565,6 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t cid,
const AbstractType& type,
bool negate_result) {
ASSERT(type.IsFinalized() && !type.IsMalformed());
- const Bool& bool_true = Bool::ZoneHandle(Bool::True());
- const Bool& bool_false = Bool::ZoneHandle(Bool::False());
const Immediate raw_null =
Immediate(reinterpret_cast<intptr_t>(Object::null()));
@@ -612,21 +609,21 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t cid,
Label done;
if (negate_result) {
__ popq(RDX);
- __ LoadObject(RAX, bool_true);
+ __ LoadObject(RAX, bool_true());
__ cmpq(RDX, RAX);
__ j(NOT_EQUAL, &done, Assembler::kNearJump);
- __ LoadObject(RAX, bool_false);
+ __ LoadObject(RAX, bool_false());
} else {
__ popq(RAX);
}
__ jmp(&done, Assembler::kNearJump);
__ Bind(&is_not_instance);
- __ LoadObject(RAX, negate_result ? bool_true : bool_false);
+ __ LoadObject(RAX, negate_result ? bool_true() : bool_false());
__ jmp(&done, Assembler::kNearJump);
__ Bind(&is_instance);
- __ LoadObject(RAX, negate_result ? bool_false : bool_true);
+ __ LoadObject(RAX, negate_result ? bool_false() : bool_true());
__ Bind(&done);
__ popq(RDX); // Remove pushed instantiator type arguments.
__ popq(RCX); // Remove pushed instantiator.
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698