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

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

Issue 3586002: Backport r5553 "Do not invoke indexed interceptor getters for negative indice... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.2/
Patch Set: Created 10 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/arm/ic-arm.cc ('k') | src/stub-cache.cc » ('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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 // -- eax : key 884 // -- eax : key
885 // -- edx : receiver 885 // -- edx : receiver
886 // -- esp[0] : return address 886 // -- esp[0] : return address
887 // ----------------------------------- 887 // -----------------------------------
888 Label slow; 888 Label slow;
889 889
890 // Check that the receiver isn't a smi. 890 // Check that the receiver isn't a smi.
891 __ test(edx, Immediate(kSmiTagMask)); 891 __ test(edx, Immediate(kSmiTagMask));
892 __ j(zero, &slow, not_taken); 892 __ j(zero, &slow, not_taken);
893 893
894 // Check that the key is a smi. 894 // Check that the key is an array index, that is Uint32.
895 __ test(eax, Immediate(kSmiTagMask)); 895 __ test(eax, Immediate(kSmiTagMask | kSmiSignMask));
896 __ j(not_zero, &slow, not_taken); 896 __ j(not_zero, &slow, not_taken);
897 897
898 // Get the map of the receiver. 898 // Get the map of the receiver.
899 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); 899 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset));
900 900
901 // Check that it has indexed interceptor and access checks 901 // Check that it has indexed interceptor and access checks
902 // are not enabled for this object. 902 // are not enabled for this object.
903 __ movzx_b(ecx, FieldOperand(ecx, Map::kBitFieldOffset)); 903 __ movzx_b(ecx, FieldOperand(ecx, Map::kBitFieldOffset));
904 __ and_(Operand(ecx), Immediate(kSlowCaseBitFieldMask)); 904 __ and_(Operand(ecx), Immediate(kSlowCaseBitFieldMask));
905 __ cmp(Operand(ecx), Immediate(1 << Map::kHasIndexedInterceptor)); 905 __ cmp(Operand(ecx), Immediate(1 << Map::kHasIndexedInterceptor));
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); 1931 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss));
1932 __ TailCallExternalReference(ref, 3, 1); 1932 __ TailCallExternalReference(ref, 3, 1);
1933 } 1933 }
1934 1934
1935 #undef __ 1935 #undef __
1936 1936
1937 1937
1938 } } // namespace v8::internal 1938 } } // namespace v8::internal
1939 1939
1940 #endif // V8_TARGET_ARCH_IA32 1940 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698