| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 __ movl(ECX, Address(EDI, EAX, TIMES_4, 0)); | 872 __ movl(ECX, Address(EDI, EAX, TIMES_4, 0)); |
| 873 __ pushl(ECX); | 873 __ pushl(ECX); |
| 874 __ incl(EAX); | 874 __ incl(EAX); |
| 875 __ cmpl(EAX, EBX); | 875 __ cmpl(EAX, EBX); |
| 876 __ j(LESS, &push_arguments, Assembler::kNearJump); | 876 __ j(LESS, &push_arguments, Assembler::kNearJump); |
| 877 __ Bind(&done_push_arguments); | 877 __ Bind(&done_push_arguments); |
| 878 | 878 |
| 879 // Call the dart code entrypoint. | 879 // Call the dart code entrypoint. |
| 880 __ call(Address(EBP, kEntryPointOffset)); | 880 __ call(Address(EBP, kEntryPointOffset)); |
| 881 | 881 |
| 882 // Reread the Context pointer. | |
| 883 __ movl(CTX, Address(EBP, kNewContextOffset)); | |
| 884 __ movl(CTX, Address(CTX, VMHandles::kOffsetOfRawPtrInHandle)); | |
| 885 | |
| 886 // Reread the arguments descriptor array to obtain the number of passed | 882 // Reread the arguments descriptor array to obtain the number of passed |
| 887 // arguments. | 883 // arguments. |
| 888 __ movl(EDX, Address(EBP, kArgumentsDescOffset)); | 884 __ movl(EDX, Address(EBP, kArgumentsDescOffset)); |
| 889 __ movl(EDX, Address(EDX, VMHandles::kOffsetOfRawPtrInHandle)); | 885 __ movl(EDX, Address(EDX, VMHandles::kOffsetOfRawPtrInHandle)); |
| 890 __ movl(EDX, FieldAddress(EDX, ArgumentsDescriptor::count_offset())); | 886 __ movl(EDX, FieldAddress(EDX, ArgumentsDescriptor::count_offset())); |
| 891 // Get rid of arguments pushed on the stack. | 887 // Get rid of arguments pushed on the stack. |
| 892 __ leal(ESP, Address(ESP, EDX, TIMES_2, 0)); // EDX is a Smi. | 888 __ leal(ESP, Address(ESP, EDX, TIMES_2, 0)); // EDX is a Smi. |
| 893 | 889 |
| 894 // Load Isolate pointer into CTX. Drop Context. | 890 // Load Isolate pointer into CTX. |
| 895 __ LoadIsolate(CTX); | 891 __ LoadIsolate(CTX); |
| 896 | 892 |
| 897 // Restore the saved Context pointer into the Isolate structure. | 893 // Restore the saved Context pointer into the Isolate structure. |
| 898 __ popl(Address(CTX, Isolate::top_context_offset())); | 894 __ popl(Address(CTX, Isolate::top_context_offset())); |
| 899 | 895 |
| 900 // Restore the saved top exit frame info back into the Isolate structure. | 896 // Restore the saved top exit frame info back into the Isolate structure. |
| 901 __ popl(Address(CTX, Isolate::top_exit_frame_info_offset())); | 897 __ popl(Address(CTX, Isolate::top_exit_frame_info_offset())); |
| 902 | 898 |
| 903 // Restore the current VMTag from the stack. | 899 // Restore the current VMTag from the stack. |
| 904 __ popl(Address(CTX, Isolate::vm_tag_offset())); | 900 __ popl(Address(CTX, Isolate::vm_tag_offset())); |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 const Register temp = ECX; | 2076 const Register temp = ECX; |
| 2081 __ movl(left, Address(ESP, 2 * kWordSize)); | 2077 __ movl(left, Address(ESP, 2 * kWordSize)); |
| 2082 __ movl(right, Address(ESP, 1 * kWordSize)); | 2078 __ movl(right, Address(ESP, 1 * kWordSize)); |
| 2083 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2079 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2084 __ ret(); | 2080 __ ret(); |
| 2085 } | 2081 } |
| 2086 | 2082 |
| 2087 } // namespace dart | 2083 } // namespace dart |
| 2088 | 2084 |
| 2089 #endif // defined TARGET_ARCH_IA32 | 2085 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |