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

Side by Side Diff: src/ic.cc

Issue 10911003: Fixed comment and simplified the related code a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | 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 // 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 1316
1317 1317
1318 static bool LookupForWrite(Handle<JSObject> receiver, 1318 static bool LookupForWrite(Handle<JSObject> receiver,
1319 Handle<String> name, 1319 Handle<String> name,
1320 LookupResult* lookup) { 1320 LookupResult* lookup) {
1321 receiver->LocalLookup(*name, lookup); 1321 receiver->LocalLookup(*name, lookup);
1322 if (!lookup->IsFound()) { 1322 if (!lookup->IsFound()) {
1323 receiver->map()->LookupTransition(*receiver, *name, lookup); 1323 receiver->map()->LookupTransition(*receiver, *name, lookup);
1324 } 1324 }
1325 if (!StoreICableLookup(lookup)) { 1325 if (!StoreICableLookup(lookup)) {
1326 // 2nd chance: There can be accessors somewhere in the prototype chain. Note 1326 // 2nd chance: There can be accessors somewhere in the prototype chain.
1327 // that we explicitly exclude native accessors for now, because the stubs
1328 // are not yet prepared for this scenario.
1329 receiver->Lookup(*name, lookup); 1327 receiver->Lookup(*name, lookup);
1330 if (!lookup->IsPropertyCallbacks()) { 1328 return lookup->IsPropertyCallbacks() && StoreICableLookup(lookup);
1331 return false;
1332 }
1333 Handle<Object> callback(lookup->GetCallbackObject());
1334 return StoreICableLookup(lookup);
1335 } 1329 }
1336 1330
1337 if (lookup->IsInterceptor() && 1331 if (lookup->IsInterceptor() &&
1338 receiver->GetNamedInterceptor()->setter()->IsUndefined()) { 1332 receiver->GetNamedInterceptor()->setter()->IsUndefined()) {
1339 receiver->LocalLookupRealNamedProperty(*name, lookup); 1333 receiver->LocalLookupRealNamedProperty(*name, lookup);
1340 return StoreICableLookup(lookup); 1334 return StoreICableLookup(lookup);
1341 } 1335 }
1342 1336
1343 return true; 1337 return true;
1344 } 1338 }
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 #undef ADDR 2694 #undef ADDR
2701 }; 2695 };
2702 2696
2703 2697
2704 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2698 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2705 return IC_utilities[id]; 2699 return IC_utilities[id];
2706 } 2700 }
2707 2701
2708 2702
2709 } } // namespace v8::internal 2703 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698