Revision: 24360
Author: [email protected]
Date: Wed Oct 1 11:09:06 2014 UTC
Log: Don't clear the string stub at gc time in KeyedLoadIC.
Clearing this stub doesn't actually make sense, as it neither leaks
memory, nor prevents finding a new optimum stable state. As
long as strings receivers are observed, this is the best stub.
The moment we see a non-string receiver we'll go polymorphic
or generic depending on the case.
[email protected]
Review URL: https://codereview.chromium.org/605013003
https://code.google.com/p/v8/source/detail?r=24360
Modified:
/branches/bleeding_edge/src/ic/ic.cc
=======================================
--- /branches/bleeding_edge/src/ic/ic.cc Tue Sep 30 10:29:32 2014 UTC
+++ /branches/bleeding_edge/src/ic/ic.cc Wed Oct 1 11:09:06 2014 UTC
@@ -511,10 +511,16 @@
void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target,
ConstantPoolArray* constant_pool) {
if (IsCleared(target)) 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.
- SetTargetAtAddress(address, *pre_monomorphic_stub(isolate),
constant_pool);
+
+ // If the target is the string_stub, then don't clear it. It is the
+ // perfect stub if we continue to see strings. Holding this
+ // state is not preventing learning new information.
+ if (target != *isolate->builtins()->KeyedLoadIC_String()) {
+ // 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.
+ SetTargetAtAddress(address, *pre_monomorphic_stub(isolate),
constant_pool);
+ }
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.