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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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.h ('k') | runtime/vm/intermediate_language_x64.cc » ('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) 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_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 : Location::RegisterOrConstant(value())); 1676 : Location::RegisterOrConstant(value()));
1677 return summary; 1677 return summary;
1678 } 1678 }
1679 1679
1680 1680
1681 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1681 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1682 Register instance_reg = locs()->in(0).reg(); 1682 Register instance_reg = locs()->in(0).reg();
1683 if (ShouldEmitStoreBarrier()) { 1683 if (ShouldEmitStoreBarrier()) {
1684 Register value_reg = locs()->in(1).reg(); 1684 Register value_reg = locs()->in(1).reg();
1685 __ StoreIntoObject(instance_reg, 1685 __ StoreIntoObject(instance_reg,
1686 FieldAddress(instance_reg, field().Offset()), value_reg); 1686 FieldAddress(instance_reg, field().Offset()),
1687 value_reg,
1688 CanValueBeSmi());
1687 } else { 1689 } else {
1688 if (locs()->in(1).IsConstant()) { 1690 if (locs()->in(1).IsConstant()) {
1689 __ StoreIntoObjectNoBarrier( 1691 __ StoreIntoObjectNoBarrier(
1690 instance_reg, 1692 instance_reg,
1691 FieldAddress(instance_reg, field().Offset()), 1693 FieldAddress(instance_reg, field().Offset()),
1692 locs()->in(1).constant()); 1694 locs()->in(1).constant());
1693 } else { 1695 } else {
1694 Register value_reg = locs()->in(1).reg(); 1696 Register value_reg = locs()->in(1).reg();
1695 __ StoreIntoObjectNoBarrier(instance_reg, 1697 __ StoreIntoObjectNoBarrier(instance_reg,
1696 FieldAddress(instance_reg, field().Offset()), value_reg); 1698 FieldAddress(instance_reg, field().Offset()), value_reg);
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
3718 PcDescriptors::kOther, 3720 PcDescriptors::kOther,
3719 locs()); 3721 locs());
3720 __ Drop(2); // Discard type arguments and receiver. 3722 __ Drop(2); // Discard type arguments and receiver.
3721 } 3723 }
3722 3724
3723 } // namespace dart 3725 } // namespace dart
3724 3726
3725 #undef __ 3727 #undef __
3726 3728
3727 #endif // defined TARGET_ARCH_IA32 3729 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698