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_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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 // R4: Arguments descriptor. | 219 // R4: Arguments descriptor. |
220 // R0: Function. | 220 // R0: Function. |
221 ASSERT(locs()->in(0).reg() == R0); | 221 ASSERT(locs()->in(0).reg() == R0); |
222 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); | 222 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); |
223 | 223 |
224 // R2: instructions. | 224 // R2: instructions. |
225 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 225 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
226 __ LoadImmediate(R5, 0); | 226 __ LoadImmediate(R5, 0); |
227 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); | 227 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); |
228 __ blx(R2); | 228 __ blx(R2); |
229 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, | |
230 deopt_id(), | |
231 token_pos()); | |
232 compiler->RecordSafepoint(locs()); | 229 compiler->RecordSafepoint(locs()); |
233 // Marks either the continuation point in unoptimized code or the | 230 // Marks either the continuation point in unoptimized code or the |
234 // deoptimization point in optimized code, after call. | 231 // deoptimization point in optimized code, after call. |
235 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 232 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
236 if (compiler->is_optimizing()) { | 233 if (compiler->is_optimizing()) { |
237 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | 234 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); |
238 } else { | |
239 // Add deoptimization continuation point after the call and before the | |
240 // arguments are removed. | |
241 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | |
242 deopt_id_after, | |
243 token_pos()); | |
244 } | 235 } |
236 // Add deoptimization continuation point after the call and before the | |
237 // arguments are removed. | |
238 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | |
Vyacheslav Egorov (Google)
2015/05/28 12:19:35
Add a comment about !is_optimizing() case because
Florian Schneider
2015/05/28 12:25:21
Done.
| |
239 deopt_id_after, | |
240 token_pos()); | |
245 __ Drop(argument_count); | 241 __ Drop(argument_count); |
246 } | 242 } |
247 | 243 |
248 | 244 |
249 LocationSummary* LoadLocalInstr::MakeLocationSummary(Zone* zone, | 245 LocationSummary* LoadLocalInstr::MakeLocationSummary(Zone* zone, |
250 bool opt) const { | 246 bool opt) const { |
251 return LocationSummary::Make(zone, | 247 return LocationSummary::Make(zone, |
252 0, | 248 0, |
253 Location::RequiresRegister(), | 249 Location::RequiresRegister(), |
254 LocationSummary::kNoCall); | 250 LocationSummary::kNoCall); |
(...skipping 6628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6883 1, | 6879 1, |
6884 locs()); | 6880 locs()); |
6885 __ Drop(1); | 6881 __ Drop(1); |
6886 __ Pop(result); | 6882 __ Pop(result); |
6887 } | 6883 } |
6888 | 6884 |
6889 | 6885 |
6890 } // namespace dart | 6886 } // namespace dart |
6891 | 6887 |
6892 #endif // defined TARGET_ARCH_ARM | 6888 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |