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

Unified Diff: vm/intermediate_language_ia32.cc

Issue 10831178: Refactor Instruction classes to use a template base class. (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 | « vm/intermediate_language.cc ('k') | vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language_ia32.cc
===================================================================
--- vm/intermediate_language_ia32.cc (revision 10287)
+++ vm/intermediate_language_ia32.cc (working copy)
@@ -1023,14 +1023,19 @@
LocationSummary* CreateArrayComp::MakeLocationSummary() const {
- return MakeCallSummary();
+ const intptr_t kNumInputs = 1;
Kevin Millikin (Google) 2012/08/07 10:06:03 I have a feeling that this is always InputCount()
Florian Schneider 2012/08/07 10:23:55 Yes, that will be the case once all call-instructi
+ const intptr_t kNumTemps = 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ locs->set_in(0, Location::RegisterLocation(ECX));
Kevin Millikin (Google) 2012/08/07 10:06:03 I don't really like the number '0' here. It has t
Florian Schneider 2012/08/07 10:23:55 Agreed. Let's consider removing those 0s and 1s in
+ locs->set_out(Location::RegisterLocation(EAX));
+ return locs;
}
void CreateArrayComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- // TODO(fschneider): Support call-instructions that take inputs in registers.
// Allocate the array. EDX = length, ECX = element type.
- __ popl(ECX);
+ ASSERT(locs()->in(0).reg() == ECX);
Kevin Millikin (Google) 2012/08/07 10:06:03 There's the 0 again.
__ movl(EDX, Immediate(Smi::RawValue(ElementCount())));
compiler->GenerateCall(token_pos(),
try_index(),
« no previous file with comments | « vm/intermediate_language.cc ('k') | vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698