| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 | 399 |
| 400 // Input parameters: | 400 // Input parameters: |
| 401 // EDX: smi-tagged argument count, may be zero. | 401 // EDX: smi-tagged argument count, may be zero. |
| 402 // EBP[kParamEndSlotFromFp + 1]: last argument. | 402 // EBP[kParamEndSlotFromFp + 1]: last argument. |
| 403 // Uses EAX, EBX, ECX, EDX. | 403 // Uses EAX, EBX, ECX, EDX. |
| 404 static void PushArgumentsArray(Assembler* assembler) { | 404 static void PushArgumentsArray(Assembler* assembler) { |
| 405 const Immediate& raw_null = | 405 const Immediate& raw_null = |
| 406 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 406 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 407 StubCode* stub_code = Isolate::Current()->stub_code(); |
| 407 | 408 |
| 408 // Allocate array to store arguments of caller. | 409 // Allocate array to store arguments of caller. |
| 409 __ movl(ECX, raw_null); // Null element type for raw Array. | 410 __ movl(ECX, raw_null); // Null element type for raw Array. |
| 410 __ call(&StubCode::AllocateArrayLabel()); | 411 __ call(&stub_code->AllocateArrayLabel()); |
| 411 __ SmiUntag(EDX); | 412 __ SmiUntag(EDX); |
| 412 // EAX: newly allocated array. | 413 // EAX: newly allocated array. |
| 413 // EDX: length of the array (was preserved by the stub). | 414 // EDX: length of the array (was preserved by the stub). |
| 414 __ pushl(EAX); // Array is in EAX and on top of stack. | 415 __ pushl(EAX); // Array is in EAX and on top of stack. |
| 415 __ leal(EBX, Address(EBP, EDX, TIMES_4, kParamEndSlotFromFp * kWordSize)); | 416 __ leal(EBX, Address(EBP, EDX, TIMES_4, kParamEndSlotFromFp * kWordSize)); |
| 416 __ leal(ECX, FieldAddress(EAX, Array::data_offset())); | 417 __ leal(ECX, FieldAddress(EAX, Array::data_offset())); |
| 417 // EBX: address of first argument on stack. | 418 // EBX: address of first argument on stack. |
| 418 // ECX: address of first argument in array. | 419 // ECX: address of first argument in array. |
| 419 Label loop, loop_condition; | 420 Label loop, loop_condition; |
| 420 __ jmp(&loop_condition, Assembler::kNearJump); | 421 __ jmp(&loop_condition, Assembler::kNearJump); |
| (...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 const Register temp = ECX; | 1894 const Register temp = ECX; |
| 1894 __ movl(left, Address(ESP, 2 * kWordSize)); | 1895 __ movl(left, Address(ESP, 2 * kWordSize)); |
| 1895 __ movl(right, Address(ESP, 1 * kWordSize)); | 1896 __ movl(right, Address(ESP, 1 * kWordSize)); |
| 1896 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 1897 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 1897 __ ret(); | 1898 __ ret(); |
| 1898 } | 1899 } |
| 1899 | 1900 |
| 1900 } // namespace dart | 1901 } // namespace dart |
| 1901 | 1902 |
| 1902 #endif // defined TARGET_ARCH_IA32 | 1903 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |