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

Side by Side Diff: runtime/vm/intermediate_language_x64.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
« no previous file with comments | « runtime/vm/intermediate_language_mips.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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 compiler->GenerateInstanceOf(token_pos(), 1721 compiler->GenerateInstanceOf(token_pos(),
1722 deopt_id(), 1722 deopt_id(),
1723 type(), 1723 type(),
1724 negate_result(), 1724 negate_result(),
1725 locs()); 1725 locs());
1726 ASSERT(locs()->out().reg() == RAX); 1726 ASSERT(locs()->out().reg() == RAX);
1727 } 1727 }
1728 1728
1729 1729
1730 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { 1730 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const {
1731 const intptr_t kNumInputs = 1; 1731 const intptr_t kNumInputs = 2;
1732 const intptr_t kNumTemps = 0; 1732 const intptr_t kNumTemps = 0;
1733 LocationSummary* locs = 1733 LocationSummary* locs =
1734 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 1734 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
1735 locs->set_in(0, Location::RegisterLocation(RBX)); 1735 locs->set_in(0, Location::RegisterLocation(RBX));
1736 locs->set_in(1, Location::RegisterLocation(R10));
1736 locs->set_out(Location::RegisterLocation(RAX)); 1737 locs->set_out(Location::RegisterLocation(RAX));
1737 return locs; 1738 return locs;
1738 } 1739 }
1739 1740
1740 1741
1741 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1742 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1742 // Allocate the array. R10 = length, RBX = element type. 1743 // Allocate the array. R10 = length, RBX = element type.
1743 ASSERT(locs()->in(0).reg() == RBX); 1744 ASSERT(locs()->in(0).reg() == RBX);
1744 __ LoadImmediate(R10, Immediate(Smi::RawValue(num_elements())), PP); 1745 ASSERT(locs()->in(1).reg() == R10);
1745 compiler->GenerateCall(token_pos(), 1746 compiler->GenerateCall(token_pos(),
1746 &StubCode::AllocateArrayLabel(), 1747 &StubCode::AllocateArrayLabel(),
1747 PcDescriptors::kOther, 1748 PcDescriptors::kOther,
1748 locs()); 1749 locs());
1749 ASSERT(locs()->out().reg() == RAX); 1750 ASSERT(locs()->out().reg() == RAX);
1750 } 1751 }
1751 1752
1752 1753
1753 LocationSummary* 1754 LocationSummary*
1754 AllocateObjectWithBoundsCheckInstr::MakeLocationSummary(bool opt) const { 1755 AllocateObjectWithBoundsCheckInstr::MakeLocationSummary(bool opt) const {
(...skipping 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
4953 PcDescriptors::kOther, 4954 PcDescriptors::kOther,
4954 locs()); 4955 locs());
4955 __ Drop(2); // Discard type arguments and receiver. 4956 __ Drop(2); // Discard type arguments and receiver.
4956 } 4957 }
4957 4958
4958 } // namespace dart 4959 } // namespace dart
4959 4960
4960 #undef __ 4961 #undef __
4961 4962
4962 #endif // defined TARGET_ARCH_X64 4963 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698