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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 10448059: Use temporary variable for StoreIndexed that returns a value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/intermediate_language.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 8108)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -376,7 +376,7 @@
LocationSummary* StoreIndexedComp::MakeLocationSummary() const {
const intptr_t kNumInputs = 3;
- return MakeSimpleLocationSummary(kNumInputs, Location::RequiresRegister());
+ return MakeSimpleLocationSummary(kNumInputs, Location::NoLocation());
}
@@ -384,27 +384,22 @@
Register receiver = locs()->in(0).reg();
Register index = locs()->in(1).reg();
Register value = locs()->in(2).reg();
- Register result = locs()->out().reg();
- // Call operator []= but preserve the third argument value under the
- // arguments as the result of the computation.
const String& function_name =
String::ZoneHandle(String::NewSymbol(Token::Str(Token::kASSIGN_INDEX)));
- // Insert a copy of the value (third argument) under the arguments.
- // TODO(fschneider): Avoid preserving the value if the result is not used.
- __ pushq(value);
__ pushq(receiver);
__ pushq(index);
__ pushq(value);
+ const intptr_t kNumArguments = 3;
+ const intptr_t kNumArgsChecked = 1; // Type-feedback.
compiler->EmitInstanceCall(cid(),
token_index(),
try_index(),
function_name,
- 3,
- Array::ZoneHandle(),
- 1);
- __ popq(result);
+ kNumArguments,
+ Array::ZoneHandle(), // No optional arguments.
+ kNumArgsChecked);
}
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698