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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 197283004: Generate smaller unoptimized code for certain expressions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 33576)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -2062,17 +2062,20 @@
LocationSummary* DropTempsInstr::MakeLocationSummary(bool optimizing) const {
- return LocationSummary::Make(1,
- Location::SameAsFirstInput(),
- LocationSummary::kNoCall);
+ return (value() != NULL)
srdjan 2014/03/12 18:18:30 InputCount() == 0 seems more readable.
Florian Schneider 2014/03/13 08:56:15 Done.
+ ? LocationSummary::Make(1,
+ Location::SameAsFirstInput(),
+ LocationSummary::kNoCall)
+ : LocationSummary::Make(0,
+ Location::NoLocation(),
+ LocationSummary::kNoCall);
}
void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(!compiler->is_optimizing());
- Register value = locs()->in(0).reg();
- Register result = locs()->out().reg();
- ASSERT(result == value); // Assert that register assignment is correct.
+ // Assert that register assignment is correct.
+ ASSERT((value() == NULL) || locs()->out().reg() == locs()->in(0).reg());
srdjan 2014/03/12 18:18:30 ditto
Florian Schneider 2014/03/13 08:56:15 Done.
__ Drop(num_temps());
}
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698