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

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

Issue 3441007: Merge r5471 into 2.2 branch. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.2/
Patch Set: Created 10 years, 3 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/version.cc ('k') | test/mjsunit/regress/regress-900966.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 } 752 }
753 753
754 754
755 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 755 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
756 // ----------- S t a t e ------------- 756 // ----------- S t a t e -------------
757 // -- rax : key 757 // -- rax : key
758 // -- rdx : receiver 758 // -- rdx : receiver
759 // -- rsp[0] : return address 759 // -- rsp[0] : return address
760 // ----------------------------------- 760 // -----------------------------------
761 Label miss; 761 Label miss;
762 Label index_out_of_range;
763 762
764 Register receiver = rdx; 763 Register receiver = rdx;
765 Register index = rax; 764 Register index = rax;
766 Register scratch1 = rbx; 765 Register scratch1 = rbx;
767 Register scratch2 = rcx; 766 Register scratch2 = rcx;
768 Register result = rax; 767 Register result = rax;
769 768
770 StringCharAtGenerator char_at_generator(receiver, 769 StringCharAtGenerator char_at_generator(receiver,
771 index, 770 index,
772 scratch1, 771 scratch1,
773 scratch2, 772 scratch2,
774 result, 773 result,
775 &miss, // When not a string. 774 &miss, // When not a string.
776 &miss, // When not a number. 775 &miss, // When not a number.
777 &index_out_of_range, 776 &miss, // When index out of range.
778 STRING_INDEX_IS_ARRAY_INDEX); 777 STRING_INDEX_IS_ARRAY_INDEX);
779 char_at_generator.GenerateFast(masm); 778 char_at_generator.GenerateFast(masm);
780 __ ret(0); 779 __ ret(0);
781 780
782 ICRuntimeCallHelper call_helper; 781 ICRuntimeCallHelper call_helper;
783 char_at_generator.GenerateSlow(masm, call_helper); 782 char_at_generator.GenerateSlow(masm, call_helper);
784 783
785 __ bind(&index_out_of_range);
786 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
787 __ ret(0);
788
789 __ bind(&miss); 784 __ bind(&miss);
790 GenerateMiss(masm); 785 GenerateMiss(masm);
791 } 786 }
792 787
793 788
794 void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm, 789 void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm,
795 ExternalArrayType array_type) { 790 ExternalArrayType array_type) {
796 // ----------- S t a t e ------------- 791 // ----------- S t a t e -------------
797 // -- rax : key 792 // -- rax : key
798 // -- rdx : receiver 793 // -- rdx : receiver
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 GenerateMiss(masm); 1872 GenerateMiss(masm);
1878 } 1873 }
1879 1874
1880 1875
1881 #undef __ 1876 #undef __
1882 1877
1883 1878
1884 } } // namespace v8::internal 1879 } } // namespace v8::internal
1885 1880
1886 #endif // V8_TARGET_ARCH_X64 1881 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-900966.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698