| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // Load arguments descriptor in R4. | 204 // Load arguments descriptor in R4. |
| 205 int argument_count = ArgumentCount(); | 205 int argument_count = ArgumentCount(); |
| 206 const Array& arguments_descriptor = | 206 const Array& arguments_descriptor = |
| 207 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 207 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 208 argument_names())); | 208 argument_names())); |
| 209 __ LoadObject(R4, arguments_descriptor); | 209 __ LoadObject(R4, arguments_descriptor); |
| 210 | 210 |
| 211 // R4: Arguments descriptor. | 211 // R4: Arguments descriptor. |
| 212 // R0: Function. | 212 // R0: Function. |
| 213 ASSERT(locs()->in(0).reg() == R0); | 213 ASSERT(locs()->in(0).reg() == R0); |
| 214 __ ldr(R2, FieldAddress(R0, Function::code_offset())); | 214 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); |
| 215 | 215 |
| 216 // R2: code. | 216 // R2: instructions. |
| 217 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 217 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 218 __ LoadImmediate(R5, 0); | 218 __ LoadImmediate(R5, 0); |
| 219 __ ldr(R2, FieldAddress(R2, Code::instructions_offset())); | |
| 220 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); | 219 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); |
| 221 __ blx(R2); | 220 __ blx(R2); |
| 222 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, | 221 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, |
| 223 deopt_id(), | 222 deopt_id(), |
| 224 token_pos()); | 223 token_pos()); |
| 225 compiler->RecordSafepoint(locs()); | 224 compiler->RecordSafepoint(locs()); |
| 226 // Marks either the continuation point in unoptimized code or the | 225 // Marks either the continuation point in unoptimized code or the |
| 227 // deoptimization point in optimized code, after call. | 226 // deoptimization point in optimized code, after call. |
| 228 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 227 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
| 229 if (compiler->is_optimizing()) { | 228 if (compiler->is_optimizing()) { |
| (...skipping 6094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6324 compiler->GenerateCall(token_pos(), | 6323 compiler->GenerateCall(token_pos(), |
| 6325 &label, | 6324 &label, |
| 6326 PcDescriptors::kOther, | 6325 PcDescriptors::kOther, |
| 6327 locs()); | 6326 locs()); |
| 6328 __ Drop(ArgumentCount()); // Discard arguments. | 6327 __ Drop(ArgumentCount()); // Discard arguments. |
| 6329 } | 6328 } |
| 6330 | 6329 |
| 6331 } // namespace dart | 6330 } // namespace dart |
| 6332 | 6331 |
| 6333 #endif // defined TARGET_ARCH_ARM | 6332 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |