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

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 12438032: Use shorter write-barrier filtering sequence when value is known to be non-smi. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Ivan's comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 : Location::RegisterOrConstant(value())); 1505 : Location::RegisterOrConstant(value()));
1506 return summary; 1506 return summary;
1507 } 1507 }
1508 1508
1509 1509
1510 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1510 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1511 Register instance_reg = locs()->in(0).reg(); 1511 Register instance_reg = locs()->in(0).reg();
1512 if (ShouldEmitStoreBarrier()) { 1512 if (ShouldEmitStoreBarrier()) {
1513 Register value_reg = locs()->in(1).reg(); 1513 Register value_reg = locs()->in(1).reg();
1514 __ StoreIntoObject(instance_reg, 1514 __ StoreIntoObject(instance_reg,
1515 FieldAddress(instance_reg, field().Offset()), value_reg); 1515 FieldAddress(instance_reg, field().Offset()),
1516 value_reg,
1517 CanValueBeSmi());
1516 } else { 1518 } else {
1517 if (locs()->in(1).IsConstant()) { 1519 if (locs()->in(1).IsConstant()) {
1518 __ StoreObject(FieldAddress(instance_reg, field().Offset()), 1520 __ StoreObject(FieldAddress(instance_reg, field().Offset()),
1519 locs()->in(1).constant()); 1521 locs()->in(1).constant());
1520 } else { 1522 } else {
1521 Register value_reg = locs()->in(1).reg(); 1523 Register value_reg = locs()->in(1).reg();
1522 __ StoreIntoObjectNoBarrier(instance_reg, 1524 __ StoreIntoObjectNoBarrier(instance_reg,
1523 FieldAddress(instance_reg, field().Offset()), value_reg); 1525 FieldAddress(instance_reg, field().Offset()), value_reg);
1524 } 1526 }
1525 } 1527 }
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
3327 PcDescriptors::kOther, 3329 PcDescriptors::kOther,
3328 locs()); 3330 locs());
3329 __ Drop(2); // Discard type arguments and receiver. 3331 __ Drop(2); // Discard type arguments and receiver.
3330 } 3332 }
3331 3333
3332 } // namespace dart 3334 } // namespace dart
3333 3335
3334 #undef __ 3336 #undef __
3335 3337
3336 #endif // defined TARGET_ARCH_X64 3338 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698