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

Unified Diff: src/ic.cc

Issue 16409: Inline array loads in loops directly in the code instead of always... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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 side-by-side diff with in-line comments
Download patch
« src/d8.cc ('K') | « src/ic.h ('k') | src/ic-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 1003)
+++ src/ic.cc (working copy)
@@ -233,6 +233,10 @@
void KeyedLoadIC::Clear(Address address, Code* target) {
if (target->ic_state() == UNINITIALIZED) return;
+ // Make sure to also clear the map used in inline fast cases. If we
+ // do not clear these maps, cached code can keep objects alive
+ // through the embedded maps.
+ PatchInlinedMapCheck(address, Heap::null_value());
SetTargetAtAddress(address, initialize_stub());
}
@@ -718,7 +722,18 @@
// the global object).
bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded();
- if (use_ic) set_target(generic_stub());
+ if (use_ic) {
+ set_target(generic_stub());
+ // For JSObjects that are not value wrappers and that do not have
+ // indexed interceptors, we initialize the inlined fast case (if
+ // present) by patching the inlined map check.
+ if (object->IsJSObject() &&
+ !object->IsJSValue() &&
+ !JSObject::cast(*object)->HasIndexedInterceptor()) {
+ Map* map = JSObject::cast(*object)->map();
+ PatchInlinedMapCheck(address(), map);
+ }
+ }
// Get the property.
return Runtime::GetObjectProperty(object, key);
« src/d8.cc ('K') | « src/ic.h ('k') | src/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698