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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10702195: Equality compare should record two arguments in IC data. INline double equality comparison. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/code_generator.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 9640)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -469,9 +469,37 @@
}
+void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition,
+ XmmRegister left,
+ XmmRegister right,
+ BranchInstr* branch) {
+ ASSERT(branch != NULL);
+ assembler()->comisd(left, right);
+ BlockEntryInstr* nan_result = branch->is_negated() ?
+ branch->true_successor() : branch->false_successor();
+ assembler()->j(PARITY_EVEN, GetBlockLabel(nan_result));
+ branch->EmitBranchOnCondition(this, true_condition);
+}
+void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
+ XmmRegister left,
+ XmmRegister right,
+ Register result) {
+ assembler()->comisd(left, right);
+ Label is_false, is_true, done;
+ assembler()->j(PARITY_EVEN, &is_false, Assembler::kNearJump); // NaN false;
+ assembler()->j(true_condition, &is_true, Assembler::kNearJump);
+ assembler()->Bind(&is_false);
+ assembler()->LoadObject(result, bool_false());
+ assembler()->jmp(&done);
+ assembler()->Bind(&is_true);
+ assembler()->LoadObject(result, bool_true());
+ assembler()->Bind(&done);
+}
+
+
Register FrameRegisterAllocator::AllocateFreeRegister(bool* blocked_registers) {
for (intptr_t regno = 0; regno < kNumberOfCpuRegisters; regno++) {
if (!blocked_registers[regno] && (registers_[regno] == NULL)) {
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698