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

Side by Side Diff: src/stub-cache.cc

Issue 3520006: Do not invoke indexed interceptor getters for negative indices. (Closed)
Patch Set: Addressing Vitaly concern 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
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/x64/ic-x64.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 Object* value = args[2]; 981 Object* value = args[2];
982 ASSERT(recv->HasNamedInterceptor()); 982 ASSERT(recv->HasNamedInterceptor());
983 PropertyAttributes attr = NONE; 983 PropertyAttributes attr = NONE;
984 Object* result = recv->SetPropertyWithInterceptor(name, value, attr); 984 Object* result = recv->SetPropertyWithInterceptor(name, value, attr);
985 return result; 985 return result;
986 } 986 }
987 987
988 988
989 Object* KeyedLoadPropertyWithInterceptor(Arguments args) { 989 Object* KeyedLoadPropertyWithInterceptor(Arguments args) {
990 JSObject* receiver = JSObject::cast(args[0]); 990 JSObject* receiver = JSObject::cast(args[0]);
991 ASSERT(Smi::cast(args[1])->value() >= 0);
991 uint32_t index = Smi::cast(args[1])->value(); 992 uint32_t index = Smi::cast(args[1])->value();
992 return receiver->GetElementWithInterceptor(receiver, index); 993 return receiver->GetElementWithInterceptor(receiver, index);
993 } 994 }
994 995
995 996
996 Object* StubCompiler::CompileCallInitialize(Code::Flags flags) { 997 Object* StubCompiler::CompileCallInitialize(Code::Flags flags) {
997 HandleScope scope; 998 HandleScope scope;
998 int argc = Code::ExtractArgumentsCountFromFlags(flags); 999 int argc = Code::ExtractArgumentsCountFromFlags(flags);
999 Code::Kind kind = Code::ExtractKindFromFlags(flags); 1000 Code::Kind kind = Code::ExtractKindFromFlags(flags);
1000 if (kind == Code::CALL_IC) { 1001 if (kind == Code::CALL_IC) {
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 expected_receiver_type_ = 1354 expected_receiver_type_ =
1354 FunctionTemplateInfo::cast(signature->receiver()); 1355 FunctionTemplateInfo::cast(signature->receiver());
1355 } 1356 }
1356 } 1357 }
1357 1358
1358 is_simple_api_call_ = true; 1359 is_simple_api_call_ = true;
1359 } 1360 }
1360 1361
1361 1362
1362 } } // namespace v8::internal 1363 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698