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

Side by Side Diff: src/ic.cc

Issue 21107004: Remove special handling of fields in combination with elements transitions in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-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 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 index = map->IndexInCodeCache(name, handler); 226 index = map->IndexInCodeCache(name, handler);
227 if (index >= 0) { 227 if (index >= 0) {
228 map->RemoveFromCodeCache(String::cast(name), handler, index); 228 map->RemoveFromCodeCache(String::cast(name), handler, index);
229 } 229 }
230 } 230 }
231 return true; 231 return true;
232 } 232 }
233 233
234 // The stub is not in the cache. We've ruled out all other kinds of failure 234 // The stub is not in the cache. We've ruled out all other kinds of failure
235 // except for proptotype chain changes, a deprecated map, a map that's 235 // except for proptotype chain changes, a deprecated map, a map that's
236 // different from the one that the stub expects, or a constant global property 236 // different from the one that the stub expects, elements kind changes, or a
237 // that will become mutable. Threat all those situations as prototype failures 237 // constant global property that will become mutable. Threat all those
238 // (stay monomorphic if possible). 238 // situations as prototype failures (stay monomorphic if possible).
239 239
240 // If the IC is shared between multiple receivers (slow dictionary mode), then 240 // If the IC is shared between multiple receivers (slow dictionary mode), then
241 // the map cannot be deprecated and the stub invalidated. 241 // the map cannot be deprecated and the stub invalidated.
242 if (cache_holder == OWN_MAP) { 242 if (cache_holder == OWN_MAP) {
243 Map* old_map = target->FindFirstMap(); 243 Map* old_map = target->FindFirstMap();
244 if (old_map == map) return true; 244 if (old_map == map) return true;
245 if (old_map != NULL && old_map->is_deprecated()) return true; 245 if (old_map != NULL) {
246 if (old_map->is_deprecated()) return true;
247 if (IsMoreGeneralElementsKindTransition(old_map->elements_kind(),
248 map->elements_kind())) {
249 return true;
250 }
251 }
246 } 252 }
247 253
248 if (receiver->IsGlobalObject()) { 254 if (receiver->IsGlobalObject()) {
249 if (!name->IsName()) return false; 255 if (!name->IsName()) return false;
250 Isolate* isolate = target->GetIsolate(); 256 Isolate* isolate = target->GetIsolate();
251 LookupResult lookup(isolate); 257 LookupResult lookup(isolate);
252 GlobalObject* global = GlobalObject::cast(receiver); 258 GlobalObject* global = GlobalObject::cast(receiver);
253 global->LocalLookupRealNamedProperty(Name::cast(name), &lookup); 259 global->LocalLookupRealNamedProperty(Name::cast(name), &lookup);
254 if (!lookup.IsFound()) return false; 260 if (!lookup.IsFound()) return false;
255 PropertyCell* cell = global->GetPropertyCell(&lookup); 261 PropertyCell* cell = global->GetPropertyCell(&lookup);
(...skipping 2866 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 #undef ADDR 3128 #undef ADDR
3123 }; 3129 };
3124 3130
3125 3131
3126 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3132 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3127 return IC_utilities[id]; 3133 return IC_utilities[id];
3128 } 3134 }
3129 3135
3130 3136
3131 } } // namespace v8::internal 3137 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698