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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 kWordSize)); | 841 kWordSize)); |
842 } else { | 842 } else { |
843 __ leal(EAX, Address(EBP, kFirstLocalSlotFromFp * kWordSize)); | 843 __ leal(EAX, Address(EBP, kFirstLocalSlotFromFp * kWordSize)); |
844 } | 844 } |
845 __ movl(EDX, Immediate(argc_tag)); | 845 __ movl(EDX, Immediate(argc_tag)); |
846 | 846 |
847 const StubEntry* stub_entry; | 847 const StubEntry* stub_entry; |
848 | 848 |
849 // There is no lazy-linking support on ia32. | 849 // There is no lazy-linking support on ia32. |
850 ASSERT(!link_lazily()); | 850 ASSERT(!link_lazily()); |
851 stub_entry = (is_bootstrap_native()) | 851 if (is_bootstrap_native()) { |
852 ? StubCode::CallBootstrapCFunction_entry() | 852 stub_entry = StubCode::CallBootstrapNative_entry(); |
853 : StubCode::CallNativeCFunction_entry(); | 853 } else if (is_auto_scope()) { |
| 854 stub_entry = StubCode::CallAutoScopeNative_entry(); |
| 855 } else { |
| 856 stub_entry = StubCode::CallNoScopeNative_entry(); |
| 857 } |
854 const ExternalLabel label(reinterpret_cast<uword>(native_c_function())); | 858 const ExternalLabel label(reinterpret_cast<uword>(native_c_function())); |
855 __ movl(ECX, Immediate(label.address())); | 859 __ movl(ECX, Immediate(label.address())); |
856 compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther, | 860 compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther, |
857 locs()); | 861 locs()); |
858 | 862 |
859 __ popl(result); | 863 __ popl(result); |
860 } | 864 } |
861 | 865 |
862 | 866 |
863 static bool CanBeImmediateIndex(Value* value, intptr_t cid) { | 867 static bool CanBeImmediateIndex(Value* value, intptr_t cid) { |
(...skipping 6026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6890 __ Drop(1); | 6894 __ Drop(1); |
6891 __ popl(result); | 6895 __ popl(result); |
6892 } | 6896 } |
6893 | 6897 |
6894 | 6898 |
6895 } // namespace dart | 6899 } // namespace dart |
6896 | 6900 |
6897 #undef __ | 6901 #undef __ |
6898 | 6902 |
6899 #endif // defined TARGET_ARCH_IA32 | 6903 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |