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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 // TODO(vegorov): allocate temporary register for such moves. 1344 // TODO(vegorov): allocate temporary register for such moves.
1345 __ pushl(EAX); 1345 __ pushl(EAX);
1346 __ movl(EAX, src); 1346 __ movl(EAX, src);
1347 __ movl(dst, EAX); 1347 __ movl(dst, EAX);
1348 __ popl(EAX); 1348 __ popl(EAX);
1349 } 1349 }
1350 1350
1351 1351
1352 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) { 1352 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) {
1353 // TODO(vegorov): allocate temporary register for such moves. 1353 // TODO(vegorov): allocate temporary register for such moves.
1354 __ pushl(EAX); 1354 if (obj.IsSmi() || obj.IsNull()) {
1355 __ LoadObject(EAX, obj); 1355 __ movl(dst, Immediate(reinterpret_cast<int32_t>(obj.raw())));
1356 __ movl(dst, EAX); 1356 } else {
1357 __ popl(EAX); 1357 __ pushl(EAX);
1358 __ LoadObject(EAX, obj);
1359 __ movl(dst, EAX);
1360 __ popl(EAX);
1361 }
1358 } 1362 }
1359 1363
1360 1364
1361 void ParallelMoveResolver::Exchange(Register reg, const Address& mem) { 1365 void ParallelMoveResolver::Exchange(Register reg, const Address& mem) {
1362 // TODO(vegorov): allocate temporary register for such moves. 1366 // TODO(vegorov): allocate temporary register for such moves.
1363 Register scratch = (reg == EAX) ? ECX : EAX; 1367 Register scratch = (reg == EAX) ? ECX : EAX;
1364 __ pushl(scratch); 1368 __ pushl(scratch);
1365 __ movl(scratch, mem); 1369 __ movl(scratch, mem);
1366 __ xchgl(scratch, reg); 1370 __ xchgl(scratch, reg);
1367 __ movl(mem, scratch); 1371 __ movl(mem, scratch);
(...skipping 12 matching lines...) Expand all
1380 __ popl(ECX); 1384 __ popl(ECX);
1381 __ popl(EAX); 1385 __ popl(EAX);
1382 } 1386 }
1383 1387
1384 1388
1385 #undef __ 1389 #undef __
1386 1390
1387 } // namespace dart 1391 } // namespace dart
1388 1392
1389 #endif // defined TARGET_ARCH_IA32 1393 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698