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

Unified Diff: vm/intermediate_language_x64.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
« vm/intermediate_language_ia32.cc ('K') | « vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language_x64.cc
===================================================================
--- vm/intermediate_language_x64.cc (revision 10287)
+++ vm/intermediate_language_x64.cc (working copy)
@@ -1037,14 +1037,19 @@
LocationSummary* CreateArrayComp::MakeLocationSummary() const {
- return MakeCallSummary();
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ locs->set_in(0, Location::RegisterLocation(RBX));
+ locs->set_out(Location::RegisterLocation(RAX));
+ return locs;
}
void CreateArrayComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- // TODO(fschneider): Support call-instructions that take inputs in registers.
// Allocate the array. R10 = length, RBX = element type.
- __ popq(RBX);
+ ASSERT(locs()->in(0).reg() == RBX);
__ movq(R10, Immediate(Smi::RawValue(ElementCount())));
compiler->GenerateCall(token_pos(),
try_index(),
« vm/intermediate_language_ia32.cc ('K') | « vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698