| 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/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 stub_entry = &StubCode::CallBootstrapCFunctionLabel(); | 702 stub_entry = &StubCode::CallBootstrapCFunctionLabel(); |
| 703 #if defined(USING_SIMULATOR) | 703 #if defined(USING_SIMULATOR) |
| 704 entry = Simulator::RedirectExternalReference( | 704 entry = Simulator::RedirectExternalReference( |
| 705 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); | 705 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); |
| 706 #endif | 706 #endif |
| 707 } else { | 707 } else { |
| 708 // In the case of non bootstrap native methods the CallNativeCFunction | 708 // In the case of non bootstrap native methods the CallNativeCFunction |
| 709 // stub generates the redirection address when running under the simulator | 709 // stub generates the redirection address when running under the simulator |
| 710 // and hence we do not change 'entry' here. | 710 // and hence we do not change 'entry' here. |
| 711 stub_entry = &StubCode::CallNativeCFunctionLabel(); | 711 stub_entry = &StubCode::CallNativeCFunctionLabel(); |
| 712 #if defined(USING_SIMULATOR) |
| 713 if (!function().IsNativeAutoSetupScope()) { |
| 714 entry = Simulator::RedirectExternalReference( |
| 715 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); |
| 716 } |
| 717 #endif |
| 712 } | 718 } |
| 713 __ LoadImmediate(R5, entry); | 719 __ LoadImmediate(R5, entry); |
| 714 __ LoadImmediate(R1, NativeArguments::ComputeArgcTag(function())); | 720 __ LoadImmediate(R1, NativeArguments::ComputeArgcTag(function())); |
| 715 compiler->GenerateCall(token_pos(), | 721 compiler->GenerateCall(token_pos(), |
| 716 stub_entry, | 722 stub_entry, |
| 717 PcDescriptors::kOther, | 723 PcDescriptors::kOther, |
| 718 locs()); | 724 locs()); |
| 719 __ Pop(result); | 725 __ Pop(result); |
| 720 } | 726 } |
| 721 | 727 |
| (...skipping 4098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4820 compiler->GenerateCall(token_pos(), | 4826 compiler->GenerateCall(token_pos(), |
| 4821 &label, | 4827 &label, |
| 4822 PcDescriptors::kOther, | 4828 PcDescriptors::kOther, |
| 4823 locs()); | 4829 locs()); |
| 4824 __ Drop(2); // Discard type arguments and receiver. | 4830 __ Drop(2); // Discard type arguments and receiver. |
| 4825 } | 4831 } |
| 4826 | 4832 |
| 4827 } // namespace dart | 4833 } // namespace dart |
| 4828 | 4834 |
| 4829 #endif // defined TARGET_ARCH_ARM | 4835 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |