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

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

Issue 330243003: Record field initializer stores with simple literals at compile-time. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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_arm64.cc ('k') | runtime/vm/intermediate_language_mips.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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 1732
1733 1733
1734 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Isolate* isolate, 1734 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Isolate* isolate,
1735 bool opt) const { 1735 bool opt) const {
1736 const intptr_t kNumInputs = 2; 1736 const intptr_t kNumInputs = 2;
1737 const intptr_t kNumTemps = 1737 const intptr_t kNumTemps =
1738 (IsUnboxedStore() && opt) ? 2 : 1738 (IsUnboxedStore() && opt) ? 2 :
1739 ((IsPotentialUnboxedStore()) ? 3 : 0); 1739 ((IsPotentialUnboxedStore()) ? 3 : 0);
1740 LocationSummary* summary = new(isolate) LocationSummary( 1740 LocationSummary* summary = new(isolate) LocationSummary(
1741 isolate, kNumInputs, kNumTemps, 1741 isolate, kNumInputs, kNumTemps,
1742 !field().IsNull() && 1742 ((IsUnboxedStore() && opt && is_initialization_) ||
1743 ((field().guarded_cid() == kIllegalCid) || is_initialization_) 1743 IsPotentialUnboxedStore())
1744 ? LocationSummary::kCallOnSlowPath 1744 ? LocationSummary::kCallOnSlowPath
1745 : LocationSummary::kNoCall); 1745 : LocationSummary::kNoCall);
1746 1746
1747 summary->set_in(0, Location::RequiresRegister()); 1747 summary->set_in(0, Location::RequiresRegister());
1748 if (IsUnboxedStore() && opt) { 1748 if (IsUnboxedStore() && opt) {
1749 summary->set_in(1, Location::RequiresFpuRegister()); 1749 summary->set_in(1, Location::RequiresFpuRegister());
1750 summary->set_temp(0, Location::RequiresRegister()); 1750 summary->set_temp(0, Location::RequiresRegister());
1751 summary->set_temp(1, Location::RequiresRegister()); 1751 summary->set_temp(1, Location::RequiresRegister());
1752 } else if (IsPotentialUnboxedStore()) { 1752 } else if (IsPotentialUnboxedStore()) {
1753 summary->set_in(1, ShouldEmitStoreBarrier() 1753 summary->set_in(1, ShouldEmitStoreBarrier()
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 __ Comment("UnboxedFloat64x2StoreInstanceFieldInstr"); 1823 __ Comment("UnboxedFloat64x2StoreInstanceFieldInstr");
1824 __ movups(FieldAddress(temp, Float64x2::value_offset()), value); 1824 __ movups(FieldAddress(temp, Float64x2::value_offset()), value);
1825 break; 1825 break;
1826 default: 1826 default:
1827 UNREACHABLE(); 1827 UNREACHABLE();
1828 } 1828 }
1829 return; 1829 return;
1830 } 1830 }
1831 1831
1832 if (IsPotentialUnboxedStore()) { 1832 if (IsPotentialUnboxedStore()) {
1833 __ Comment("PotentialUnboxedStore");
1833 Register value_reg = locs()->in(1).reg(); 1834 Register value_reg = locs()->in(1).reg();
1834 Register temp = locs()->temp(0).reg(); 1835 Register temp = locs()->temp(0).reg();
1835 Register temp2 = locs()->temp(1).reg(); 1836 Register temp2 = locs()->temp(1).reg();
1836 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); 1837 FpuRegister fpu_temp = locs()->temp(2).fpu_reg();
1837 1838
1838 Label store_pointer; 1839 Label store_pointer;
1839 Label store_double; 1840 Label store_double;
1840 Label store_float32x4; 1841 Label store_float32x4;
1841 Label store_float64x2; 1842 Label store_float64x2;
1842 1843
(...skipping 4451 matching lines...) Expand 10 before | Expand all | Expand 10 after
6294 PcDescriptors::kOther, 6295 PcDescriptors::kOther,
6295 locs()); 6296 locs());
6296 __ Drop(ArgumentCount()); // Discard arguments. 6297 __ Drop(ArgumentCount()); // Discard arguments.
6297 } 6298 }
6298 6299
6299 } // namespace dart 6300 } // namespace dart
6300 6301
6301 #undef __ 6302 #undef __
6302 6303
6303 #endif // defined TARGET_ARCH_IA32 6304 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698