| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 // Perform tail call to the entry. | 538 // Perform tail call to the entry. |
| 539 ExternalReference ref = ExternalReference( | 539 ExternalReference ref = ExternalReference( |
| 540 IC_Utility(kLoadElementWithInterceptor), masm->isolate()); | 540 IC_Utility(kLoadElementWithInterceptor), masm->isolate()); |
| 541 __ TailCallExternalReference(ref, 2, 1); | 541 __ TailCallExternalReference(ref, 2, 1); |
| 542 | 542 |
| 543 __ bind(&slow); | 543 __ bind(&slow); |
| 544 GenerateMiss(masm); | 544 GenerateMiss(masm); |
| 545 } | 545 } |
| 546 | 546 |
| 547 | 547 |
| 548 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { | |
| 549 // The return address is on the stack. | |
| 550 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 551 Register key = LoadDescriptor::NameRegister(); | |
| 552 DCHECK(receiver.is(edx)); | |
| 553 DCHECK(key.is(ecx)); | |
| 554 | |
| 555 Label slow, notin; | |
| 556 Factory* factory = masm->isolate()->factory(); | |
| 557 Operand mapped_location = GenerateMappedArgumentsLookup( | |
| 558 masm, receiver, key, ebx, eax, ¬in, &slow); | |
| 559 __ mov(eax, mapped_location); | |
| 560 __ Ret(); | |
| 561 __ bind(¬in); | |
| 562 // The unmapped lookup expects that the parameter map is in ebx. | |
| 563 Operand unmapped_location = | |
| 564 GenerateUnmappedArgumentsLookup(masm, key, ebx, eax, &slow); | |
| 565 __ cmp(unmapped_location, factory->the_hole_value()); | |
| 566 __ j(equal, &slow); | |
| 567 __ mov(eax, unmapped_location); | |
| 568 __ Ret(); | |
| 569 __ bind(&slow); | |
| 570 GenerateMiss(masm); | |
| 571 } | |
| 572 | |
| 573 | |
| 574 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { | 548 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
| 575 // Return address is on the stack. | 549 // Return address is on the stack. |
| 576 Label slow, notin; | 550 Label slow, notin; |
| 577 Register receiver = StoreDescriptor::ReceiverRegister(); | 551 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 578 Register name = StoreDescriptor::NameRegister(); | 552 Register name = StoreDescriptor::NameRegister(); |
| 579 Register value = StoreDescriptor::ValueRegister(); | 553 Register value = StoreDescriptor::ValueRegister(); |
| 580 DCHECK(receiver.is(edx)); | 554 DCHECK(receiver.is(edx)); |
| 581 DCHECK(name.is(ecx)); | 555 DCHECK(name.is(ecx)); |
| 582 DCHECK(value.is(eax)); | 556 DCHECK(value.is(eax)); |
| 583 | 557 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 Condition cc = | 1017 Condition cc = |
| 1044 (check == ENABLE_INLINED_SMI_CHECK) | 1018 (check == ENABLE_INLINED_SMI_CHECK) |
| 1045 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1019 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1046 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1020 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1047 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1021 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1048 } | 1022 } |
| 1049 } | 1023 } |
| 1050 } // namespace v8::internal | 1024 } // namespace v8::internal |
| 1051 | 1025 |
| 1052 #endif // V8_TARGET_ARCH_IA32 | 1026 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |