Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: src/ic/x64/ic-x64.cc

Issue 546683003: Make KeyedLoads from a sloppy arguments array use a handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Webkit test found bug, updating. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic/mips/ic-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X64 7 #if V8_TARGET_ARCH_X64
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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 __ CheckMap(backing_store, fixed_array_map, slow_case, DONT_DO_SMI_CHECK); 715 __ CheckMap(backing_store, fixed_array_map, slow_case, DONT_DO_SMI_CHECK);
716 __ movp(scratch, FieldOperand(backing_store, FixedArray::kLengthOffset)); 716 __ movp(scratch, FieldOperand(backing_store, FixedArray::kLengthOffset));
717 __ cmpp(key, scratch); 717 __ cmpp(key, scratch);
718 __ j(greater_equal, slow_case); 718 __ j(greater_equal, slow_case);
719 __ SmiToInteger64(scratch, key); 719 __ SmiToInteger64(scratch, key);
720 return FieldOperand(backing_store, scratch, times_pointer_size, 720 return FieldOperand(backing_store, scratch, times_pointer_size,
721 FixedArray::kHeaderSize); 721 FixedArray::kHeaderSize);
722 } 722 }
723 723
724 724
725 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
726 // The return address is on the stack.
727 Register receiver = LoadDescriptor::ReceiverRegister();
728 Register key = LoadDescriptor::NameRegister();
729 DCHECK(receiver.is(rdx));
730 DCHECK(key.is(rcx));
731
732 Label slow, notin;
733 Operand mapped_location = GenerateMappedArgumentsLookup(
734 masm, receiver, key, rbx, rax, rdi, &notin, &slow);
735 __ movp(rax, mapped_location);
736 __ Ret();
737 __ bind(&notin);
738 // The unmapped lookup expects that the parameter map is in rbx.
739 Operand unmapped_location =
740 GenerateUnmappedArgumentsLookup(masm, key, rbx, rax, &slow);
741 __ CompareRoot(unmapped_location, Heap::kTheHoleValueRootIndex);
742 __ j(equal, &slow);
743 __ movp(rax, unmapped_location);
744 __ Ret();
745 __ bind(&slow);
746 GenerateMiss(masm);
747 }
748
749
750 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 725 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
751 // The return address is on the stack. 726 // The return address is on the stack.
752 Label slow, notin; 727 Label slow, notin;
753 Register receiver = StoreDescriptor::ReceiverRegister(); 728 Register receiver = StoreDescriptor::ReceiverRegister();
754 Register name = StoreDescriptor::NameRegister(); 729 Register name = StoreDescriptor::NameRegister();
755 Register value = StoreDescriptor::ValueRegister(); 730 Register value = StoreDescriptor::ValueRegister();
756 DCHECK(receiver.is(rdx)); 731 DCHECK(receiver.is(rdx));
757 DCHECK(name.is(rcx)); 732 DCHECK(name.is(rcx));
758 DCHECK(value.is(rax)); 733 DCHECK(value.is(rax));
759 734
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 Condition cc = 981 Condition cc =
1007 (check == ENABLE_INLINED_SMI_CHECK) 982 (check == ENABLE_INLINED_SMI_CHECK)
1008 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 983 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1009 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 984 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1010 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 985 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1011 } 986 }
1012 } 987 }
1013 } // namespace v8::internal 988 } // namespace v8::internal
1014 989
1015 #endif // V8_TARGET_ARCH_X64 990 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/mips/ic-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698