| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 __ ret(0); | 496 __ ret(0); |
| 497 | 497 |
| 498 StubRuntimeCallHelper call_helper; | 498 StubRuntimeCallHelper call_helper; |
| 499 char_at_generator.GenerateSlow(masm, call_helper); | 499 char_at_generator.GenerateSlow(masm, call_helper); |
| 500 | 500 |
| 501 __ bind(&miss); | 501 __ bind(&miss); |
| 502 GenerateMiss(masm); | 502 GenerateMiss(masm); |
| 503 } | 503 } |
| 504 | 504 |
| 505 | 505 |
| 506 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { | |
| 507 // The return address is on the stack. | |
| 508 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 509 Register key = LoadDescriptor::NameRegister(); | |
| 510 DCHECK(receiver.is(edx)); | |
| 511 DCHECK(key.is(ecx)); | |
| 512 | |
| 513 Label slow, notin; | |
| 514 Factory* factory = masm->isolate()->factory(); | |
| 515 Operand mapped_location = GenerateMappedArgumentsLookup( | |
| 516 masm, receiver, key, ebx, eax, ¬in, &slow); | |
| 517 __ mov(eax, mapped_location); | |
| 518 __ Ret(); | |
| 519 __ bind(¬in); | |
| 520 // The unmapped lookup expects that the parameter map is in ebx. | |
| 521 Operand unmapped_location = | |
| 522 GenerateUnmappedArgumentsLookup(masm, key, ebx, eax, &slow); | |
| 523 __ cmp(unmapped_location, factory->the_hole_value()); | |
| 524 __ j(equal, &slow); | |
| 525 __ mov(eax, unmapped_location); | |
| 526 __ Ret(); | |
| 527 __ bind(&slow); | |
| 528 GenerateMiss(masm); | |
| 529 } | |
| 530 | |
| 531 | |
| 532 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { | 506 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
| 533 // Return address is on the stack. | 507 // Return address is on the stack. |
| 534 Label slow, notin; | 508 Label slow, notin; |
| 535 Register receiver = StoreDescriptor::ReceiverRegister(); | 509 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 536 Register name = StoreDescriptor::NameRegister(); | 510 Register name = StoreDescriptor::NameRegister(); |
| 537 Register value = StoreDescriptor::ValueRegister(); | 511 Register value = StoreDescriptor::ValueRegister(); |
| 538 DCHECK(receiver.is(edx)); | 512 DCHECK(receiver.is(edx)); |
| 539 DCHECK(name.is(ecx)); | 513 DCHECK(name.is(ecx)); |
| 540 DCHECK(value.is(eax)); | 514 DCHECK(value.is(eax)); |
| 541 | 515 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 Condition cc = | 975 Condition cc = |
| 1002 (check == ENABLE_INLINED_SMI_CHECK) | 976 (check == ENABLE_INLINED_SMI_CHECK) |
| 1003 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 977 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1004 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 978 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1005 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 979 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1006 } | 980 } |
| 1007 } | 981 } |
| 1008 } // namespace v8::internal | 982 } // namespace v8::internal |
| 1009 | 983 |
| 1010 #endif // V8_TARGET_ARCH_IA32 | 984 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |