Commit 8313d2f0 authored by jkummerow's avatar jkummerow Committed by Commit bot

[IC] Only cache handlers on a map that were compiled for that map

Globally cached handler stubs shouldn't be put into the on-map caches.
This should speed up IC misses and save a bit of memory.

Drive-by fix: transitioning StoreIC handlers were erroneously never cached.

Review-Url: https://codereview.chromium.org/1974793002
Cr-Commit-Position: refs/heads/master@{#36247}
parent ced0f497
This diff is collapsed.
......@@ -140,6 +140,10 @@ class IC {
// Compute the handler either by compiling or by retrieving a cached version.
Handle<Code> ComputeHandler(LookupIterator* lookup,
Handle<Object> value = Handle<Code>::null());
virtual Handle<Code> GetMapIndependentHandler(LookupIterator* lookup) {
UNREACHABLE();
return Handle<Code>::null();
}
virtual Handle<Code> CompileHandler(LookupIterator* lookup,
Handle<Object> value,
CacheHolderFlag cache_holder) {
......@@ -304,6 +308,8 @@ class LoadIC : public IC {
// lookup result.
void UpdateCaches(LookupIterator* lookup);
Handle<Code> GetMapIndependentHandler(LookupIterator* lookup) override;
Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> unused,
CacheHolderFlag cache_holder) override;
......@@ -386,6 +392,7 @@ class StoreIC : public IC {
// lookup result.
void UpdateCaches(LookupIterator* lookup, Handle<Object> value,
JSReceiver::StoreFromKeyed store_mode);
Handle<Code> GetMapIndependentHandler(LookupIterator* lookup) override;
Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> value,
CacheHolderFlag cache_holder) override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment