| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/ic_data.h" | 10 #include "vm/ic_data.h" |
| (...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 __ j(NOT_EQUAL, &no_match, Assembler::kNearJump); | 1507 __ j(NOT_EQUAL, &no_match, Assembler::kNearJump); |
| 1508 // Check second. | 1508 // Check second. |
| 1509 __ movl(EDI, Address(EBX, kWordSize)); // Get class from IC data to check. | 1509 __ movl(EDI, Address(EBX, kWordSize)); // Get class from IC data to check. |
| 1510 // Get next argument. | 1510 // Get next argument. |
| 1511 __ movl(EAX, FieldAddress(EDX, Array::data_offset())); | 1511 __ movl(EAX, FieldAddress(EDX, Array::data_offset())); |
| 1512 __ movl(EAX, Address(ESP, EAX, TIMES_2, -kWordSize)); | 1512 __ movl(EAX, Address(ESP, EAX, TIMES_2, -kWordSize)); |
| 1513 __ call(&get_class); | 1513 __ call(&get_class); |
| 1514 __ cmpl(EAX, EDI); // Match? | 1514 __ cmpl(EAX, EDI); // Match? |
| 1515 __ j(EQUAL, &found, Assembler::kNearJump); | 1515 __ j(EQUAL, &found, Assembler::kNearJump); |
| 1516 __ Bind(&no_match); | 1516 __ Bind(&no_match); |
| 1517 __ addl(EBX, Immediate(kWordSize * 1 + (num_args))); // Next element. | 1517 __ addl(EBX, Immediate(kWordSize * (1 + num_args))); // Next element. |
| 1518 __ cmpl(EDI, raw_null); // Done? | 1518 __ cmpl(EDI, raw_null); // Done? |
| 1519 __ j(NOT_EQUAL, &loop, Assembler::kNearJump); | 1519 __ j(NOT_EQUAL, &loop, Assembler::kNearJump); |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 __ Bind(&ic_miss); | 1522 __ Bind(&ic_miss); |
| 1523 // Get receiver, again. | 1523 // Get receiver, again. |
| 1524 __ movl(EAX, FieldAddress(EDX, Array::data_offset())); | 1524 __ movl(EAX, FieldAddress(EDX, Array::data_offset())); |
| 1525 __ leal(EAX, Address(ESP, EAX, TIMES_2, 0)); | 1525 __ leal(EAX, Address(ESP, EAX, TIMES_2, 0)); |
| 1526 __ EnterFrame(0); | 1526 __ EnterFrame(0); |
| 1527 // Setup space for return value on stack by pushing smi 0. | 1527 // Setup space for return value on stack by pushing smi 0. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 __ popl(EDX); | 1634 __ popl(EDX); |
| 1635 __ popl(ECX); | 1635 __ popl(ECX); |
| 1636 __ LeaveFrame(); | 1636 __ LeaveFrame(); |
| 1637 // Now call the dynamic function. | 1637 // Now call the dynamic function. |
| 1638 __ jmp(&StubCode::OneArgCheckInlineCacheLabel()); | 1638 __ jmp(&StubCode::OneArgCheckInlineCacheLabel()); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 } // namespace dart | 1641 } // namespace dart |
| 1642 | 1642 |
| 1643 #endif // defined TARGET_ARCH_IA32 | 1643 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |