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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 10933019: Improve moves of Smi and null objects. Add result cid to List constructor calls. Add tracing of inl… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 12183)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -1351,10 +1351,14 @@
void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) {
// TODO(vegorov): allocate temporary register for such moves.
- __ pushl(EAX);
- __ LoadObject(EAX, obj);
- __ movl(dst, EAX);
- __ popl(EAX);
+ if (obj.IsSmi() || obj.IsNull()) {
+ __ movl(dst, Immediate(reinterpret_cast<int32_t>(obj.raw())));
+ } else {
+ __ pushl(EAX);
+ __ LoadObject(EAX, obj);
+ __ movl(dst, EAX);
+ __ popl(EAX);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698