OLD | NEW |
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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
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 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1890 compiler->GenerateInstanceOf(token_pos(), | 1890 compiler->GenerateInstanceOf(token_pos(), |
1891 deopt_id(), | 1891 deopt_id(), |
1892 type(), | 1892 type(), |
1893 negate_result(), | 1893 negate_result(), |
1894 locs()); | 1894 locs()); |
1895 ASSERT(locs()->out().reg() == V0); | 1895 ASSERT(locs()->out().reg() == V0); |
1896 } | 1896 } |
1897 | 1897 |
1898 | 1898 |
1899 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { | 1899 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { |
1900 const intptr_t kNumInputs = 1; | 1900 const intptr_t kNumInputs = 2; |
1901 const intptr_t kNumTemps = 0; | 1901 const intptr_t kNumTemps = 0; |
1902 LocationSummary* locs = | 1902 LocationSummary* locs = |
1903 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 1903 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
1904 locs->set_in(0, Location::RegisterLocation(A0)); | 1904 locs->set_in(0, Location::RegisterLocation(A0)); |
| 1905 locs->set_in(1, Location::RegisterLocation(A1)); |
1905 locs->set_out(Location::RegisterLocation(V0)); | 1906 locs->set_out(Location::RegisterLocation(V0)); |
1906 return locs; | 1907 return locs; |
1907 } | 1908 } |
1908 | 1909 |
1909 | 1910 |
1910 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1911 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1911 __ TraceSimMsg("CreateArrayInstr"); | 1912 __ TraceSimMsg("CreateArrayInstr"); |
1912 // Allocate the array. A1 = length, A0 = element type. | 1913 // Allocate the array. A1 = length, A0 = element type. |
1913 ASSERT(locs()->in(0).reg() == A0); | 1914 ASSERT(locs()->in(0).reg() == A0); |
1914 __ LoadImmediate(A1, Smi::RawValue(num_elements())); | 1915 ASSERT(locs()->in(1).reg() == A1); |
1915 compiler->GenerateCall(token_pos(), | 1916 compiler->GenerateCall(token_pos(), |
1916 &StubCode::AllocateArrayLabel(), | 1917 &StubCode::AllocateArrayLabel(), |
1917 PcDescriptors::kOther, | 1918 PcDescriptors::kOther, |
1918 locs()); | 1919 locs()); |
1919 ASSERT(locs()->out().reg() == V0); | 1920 ASSERT(locs()->out().reg() == V0); |
1920 } | 1921 } |
1921 | 1922 |
1922 | 1923 |
1923 LocationSummary* | 1924 LocationSummary* |
1924 AllocateObjectWithBoundsCheckInstr::MakeLocationSummary(bool opt) const { | 1925 AllocateObjectWithBoundsCheckInstr::MakeLocationSummary(bool opt) const { |
(...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4201 compiler->GenerateCall(token_pos(), | 4202 compiler->GenerateCall(token_pos(), |
4202 &label, | 4203 &label, |
4203 PcDescriptors::kOther, | 4204 PcDescriptors::kOther, |
4204 locs()); | 4205 locs()); |
4205 __ Drop(2); // Discard type arguments and receiver. | 4206 __ Drop(2); // Discard type arguments and receiver. |
4206 } | 4207 } |
4207 | 4208 |
4208 } // namespace dart | 4209 } // namespace dart |
4209 | 4210 |
4210 #endif // defined TARGET_ARCH_MIPS | 4211 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |