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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 10830333: Make all variants of RelationalOp work with SSA. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 10728)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -628,8 +628,8 @@
LocationSummary* RelationalOpComp::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 2;
if ((operands_class_id() == kSmiCid) || (operands_class_id() == kDoubleCid)) {
- const intptr_t kNumInputs = 2;
const intptr_t kNumTemps = 1;
LocationSummary* summary =
new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
@@ -639,7 +639,13 @@
summary->set_temp(0, Location::RequiresRegister());
return summary;
}
- return MakeCallSummary();
+ const intptr_t kNumTemps = 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ locs->set_in(0, Location::RegisterLocation(EAX));
Kevin Millikin (Google) 2012/08/15 15:31:17 Maybe the code here should have a comment that the
Florian Schneider 2012/08/16 08:30:37 Done.
+ locs->set_in(1, Location::RegisterLocation(ECX));
+ locs->set_out(Location::RegisterLocation(EAX));
+ return locs;
}
@@ -658,14 +664,22 @@
Label* deopt = compiler->AddDeoptStub(deopt_id(),
try_index(),
kDeoptRelationalOp);
- // Load receiver into EAX, class into EDI.
+ // Push arguments for the call.
+ // TODO(fschneider): Split this instruction into different types to avoid
+ // explicitly pushing arguments to the call here.
+ Register left = locs()->in(0).reg();
+ Register right = locs()->in(1).reg();
srdjan 2012/08/15 21:48:38 Left, right computation as well as pushing them c
Florian Schneider 2012/08/16 08:30:37 Done.
+ __ pushl(left);
+ __ pushl(right);
+
+ // Load class into EDI.
+ ASSERT((left != EDI) && (right != EDI));
Label done;
const intptr_t kNumArguments = 2;
__ movl(EDI, Immediate(kSmiCid));
- __ movl(EAX, Address(ESP, (kNumArguments - 1) * kWordSize));
- __ testl(EAX, Immediate(kSmiTagMask));
+ __ testl(left, Immediate(kSmiTagMask));
__ j(ZERO, &done);
- __ LoadClassId(EDI, EAX);
+ __ LoadClassId(EDI, left);
__ Bind(&done);
compiler->EmitTestAndCall(ICData::Handle(ic_data()->AsUnaryClassChecks()),
EDI, // Class id register.
@@ -677,8 +691,17 @@
token_pos(),
try_index(),
locs()->stack_bitmap());
+ ASSERT(locs()->out().reg() == EAX);
return;
}
+ // Push arguments for the call.
+ // TODO(fschneider): Split this instruction into different types to avoid
+ // explicitly pushing arguments to the call here.
+ Register left = locs()->in(0).reg();
+ Register right = locs()->in(1).reg();
+ __ pushl(left);
+ __ pushl(right);
+
const String& function_name =
String::ZoneHandle(Symbols::New(Token::Str(kind())));
compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,

Powered by Google App Engine
This is Rietveld 408576698