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

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

Issue 3569002: Backport r5553 "Do not invoke indexed interceptor getters for negative indice... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 // -- eax : key 903 // -- eax : key
904 // -- edx : receiver 904 // -- edx : receiver
905 // -- esp[0] : return address 905 // -- esp[0] : return address
906 // ----------------------------------- 906 // -----------------------------------
907 Label slow; 907 Label slow;
908 908
909 // Check that the receiver isn't a smi. 909 // Check that the receiver isn't a smi.
910 __ test(edx, Immediate(kSmiTagMask)); 910 __ test(edx, Immediate(kSmiTagMask));
911 __ j(zero, &slow, not_taken); 911 __ j(zero, &slow, not_taken);
912 912
913 // Check that the key is a smi. 913 // Check that the key is an array index, that is Uint32.
914 __ test(eax, Immediate(kSmiTagMask)); 914 __ test(eax, Immediate(kSmiTagMask | kSmiSignMask));
915 __ j(not_zero, &slow, not_taken); 915 __ j(not_zero, &slow, not_taken);
916 916
917 // Get the map of the receiver. 917 // Get the map of the receiver.
918 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); 918 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset));
919 919
920 // Check that it has indexed interceptor and access checks 920 // Check that it has indexed interceptor and access checks
921 // are not enabled for this object. 921 // are not enabled for this object.
922 __ movzx_b(ecx, FieldOperand(ecx, Map::kBitFieldOffset)); 922 __ movzx_b(ecx, FieldOperand(ecx, Map::kBitFieldOffset));
923 __ and_(Operand(ecx), Immediate(kSlowCaseBitFieldMask)); 923 __ and_(Operand(ecx), Immediate(kSlowCaseBitFieldMask));
924 __ cmp(Operand(ecx), Immediate(1 << Map::kHasIndexedInterceptor)); 924 __ cmp(Operand(ecx), Immediate(1 << Map::kHasIndexedInterceptor));
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); 1973 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss));
1974 __ TailCallExternalReference(ref, 3, 1); 1974 __ TailCallExternalReference(ref, 3, 1);
1975 } 1975 }
1976 1976
1977 #undef __ 1977 #undef __
1978 1978
1979 1979
1980 } } // namespace v8::internal 1980 } } // namespace v8::internal
1981 1981
1982 #endif // V8_TARGET_ARCH_IA32 1982 #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