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_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/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2151 __ popq(kResultReg); | 2151 __ popq(kResultReg); |
2152 __ Bind(&done); | 2152 __ Bind(&done); |
2153 return; | 2153 return; |
2154 } | 2154 } |
2155 } | 2155 } |
2156 | 2156 |
2157 __ Bind(&slow_path); | 2157 __ Bind(&slow_path); |
2158 const Code& stub = Code::ZoneHandle(compiler->zone(), | 2158 const Code& stub = Code::ZoneHandle(compiler->zone(), |
2159 StubCode::AllocateArray_entry()->code()); | 2159 StubCode::AllocateArray_entry()->code()); |
2160 compiler->AddStubCallTarget(stub); | 2160 compiler->AddStubCallTarget(stub); |
2161 compiler->GenerateCallWithDeopt(token_pos(), deopt_id(), | 2161 if (deopt_id() == Thread::kNoDeoptId) { |
2162 *StubCode::AllocateArray_entry(), | 2162 ASSERT(compiler->is_optimizing()); |
2163 RawPcDescriptors::kOther, locs()); | 2163 compiler->GenerateCall(token_pos(), *StubCode::AllocateArray_entry(), |
| 2164 RawPcDescriptors::kOther, locs()); |
| 2165 } else { |
| 2166 compiler->GenerateCallWithDeopt(token_pos(), deopt_id(), |
| 2167 *StubCode::AllocateArray_entry(), |
| 2168 RawPcDescriptors::kOther, locs()); |
| 2169 } |
2164 __ Bind(&done); | 2170 __ Bind(&done); |
2165 ASSERT(locs()->out(0).reg() == kResultReg); | 2171 ASSERT(locs()->out(0).reg() == kResultReg); |
2166 } | 2172 } |
2167 | 2173 |
2168 | 2174 |
2169 LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone, | 2175 LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone, |
2170 bool opt) const { | 2176 bool opt) const { |
2171 const intptr_t kNumInputs = 1; | 2177 const intptr_t kNumInputs = 1; |
2172 const intptr_t kNumTemps = | 2178 const intptr_t kNumTemps = |
2173 (IsUnboxedLoad() && opt) ? 1 : ((IsPotentialUnboxedLoad()) ? 2 : 0); | 2179 (IsUnboxedLoad() && opt) ? 1 : ((IsPotentialUnboxedLoad()) ? 2 : 0); |
(...skipping 4617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6791 __ Drop(1); | 6797 __ Drop(1); |
6792 __ popq(result); | 6798 __ popq(result); |
6793 } | 6799 } |
6794 | 6800 |
6795 | 6801 |
6796 } // namespace dart | 6802 } // namespace dart |
6797 | 6803 |
6798 #undef __ | 6804 #undef __ |
6799 | 6805 |
6800 #endif // defined TARGET_ARCH_X64 | 6806 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |