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

Unified Diff: vm/intermediate_language_ia32.cc

Issue 10823258: Match input operand count of BranchInstr with the input location count. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | « no previous file | vm/intermediate_language_x64.cc » ('j') | vm/intermediate_language_x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language_ia32.cc
===================================================================
--- vm/intermediate_language_ia32.cc (revision 10446)
+++ vm/intermediate_language_ia32.cc (working copy)
@@ -1999,7 +1999,13 @@
// Otherwise polymorphic dispatch.
}
// Call.
- return Computation::MakeCallSummary();
+ const intptr_t kNumInputs = 2;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ locs->set_in(0, Location::RegisterLocation(EAX));
+ locs->set_in(1, Location::RegisterLocation(ECX));
srdjan 2012/08/09 19:56:49 Why do you require EAX, ECX to hold inputs?
+ return locs;
}
@@ -2032,6 +2038,10 @@
}
// Otherwise polymorphic dispatch?
}
+ Register left = locs()->in(0).reg();
+ Register right = locs()->in(1).reg();
+ __ pushl(left);
+ __ pushl(right);
// Not equal is always split into '==' and negate,
Condition branch_condition = (kind() == Token::kNE) ? NOT_EQUAL : EQUAL;
Token::Kind call_kind = (kind() == Token::kNE) ? Token::kEQ : kind();
@@ -2050,8 +2060,7 @@
kNumArguments,
Array::ZoneHandle(), // No optional arguments.
kNumArgsChecked);
- ASSERT(locs()->out().reg() == EAX);
- __ CompareObject(locs()->out().reg(), compiler->bool_true());
+ __ CompareObject(EAX, compiler->bool_true());
EmitBranchOnCondition(compiler, branch_condition);
}
« no previous file with comments | « no previous file | vm/intermediate_language_x64.cc » ('j') | vm/intermediate_language_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698