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

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

Issue 138523004: Inline recognized List factory in the flow graph optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 compiler->GenerateInstanceOf(token_pos(), 1815 compiler->GenerateInstanceOf(token_pos(),
1816 deopt_id(), 1816 deopt_id(),
1817 type(), 1817 type(),
1818 negate_result(), 1818 negate_result(),
1819 locs()); 1819 locs());
1820 ASSERT(locs()->out().reg() == R0); 1820 ASSERT(locs()->out().reg() == R0);
1821 } 1821 }
1822 1822
1823 1823
1824 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { 1824 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const {
1825 const intptr_t kNumInputs = 1; 1825 const intptr_t kNumInputs = 2;
1826 const intptr_t kNumTemps = 0; 1826 const intptr_t kNumTemps = 0;
1827 LocationSummary* locs = 1827 LocationSummary* locs =
1828 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 1828 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
1829 locs->set_in(0, Location::RegisterLocation(R1)); 1829 locs->set_in(kElementTypePos, Location::RegisterLocation(R1));
1830 locs->set_in(kLengthPos, Location::RegisterLocation(R2));
1830 locs->set_out(Location::RegisterLocation(R0)); 1831 locs->set_out(Location::RegisterLocation(R0));
1831 return locs; 1832 return locs;
1832 } 1833 }
1833 1834
1834 1835
1835 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1836 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1836 // Allocate the array. R2 = length, R1 = element type. 1837 // Allocate the array. R2 = length, R1 = element type.
1837 ASSERT(locs()->in(0).reg() == R1); 1838 ASSERT(locs()->in(kElementTypePos).reg() == R1);
1838 __ LoadImmediate(R2, Smi::RawValue(num_elements())); 1839 ASSERT(locs()->in(kLengthPos).reg() == R2);
1839 compiler->GenerateCall(token_pos(), 1840 compiler->GenerateCall(token_pos(),
1840 &StubCode::AllocateArrayLabel(), 1841 &StubCode::AllocateArrayLabel(),
1841 PcDescriptors::kOther, 1842 PcDescriptors::kOther,
1842 locs()); 1843 locs());
1843 ASSERT(locs()->out().reg() == R0); 1844 ASSERT(locs()->out().reg() == R0);
1844 } 1845 }
1845 1846
1846 1847
1847 LocationSummary* 1848 LocationSummary*
1848 AllocateObjectWithBoundsCheckInstr::MakeLocationSummary(bool opt) const { 1849 AllocateObjectWithBoundsCheckInstr::MakeLocationSummary(bool opt) const {
(...skipping 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after
4837 compiler->GenerateCall(token_pos(), 4838 compiler->GenerateCall(token_pos(),
4838 &label, 4839 &label,
4839 PcDescriptors::kOther, 4840 PcDescriptors::kOther,
4840 locs()); 4841 locs());
4841 __ Drop(2); // Discard type arguments and receiver. 4842 __ Drop(2); // Discard type arguments and receiver.
4842 } 4843 }
4843 4844
4844 } // namespace dart 4845 } // namespace dart
4845 4846
4846 #endif // defined TARGET_ARCH_ARM 4847 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698