[stubs] KeyedLoadIC_Megamorphic: use stub cache lookup as fallback

When the inline lookup on a fast-property receiver doesn't find anything,
try a stub cache lookup before going into the runtime. This is much
faster for properties loaded from the receiver's prototype chain.

BUG=chromium:650236

Review-Url: https://codereview.chromium.org/2373683002
Cr-Commit-Position: refs/heads/master@{#39813}
This commit is contained in:
jkummerow 2016-09-28 02:04:56 -07:00 committed by Commit bot
parent 55bd4f0572
commit b15dd963a3
2 changed files with 2 additions and 1 deletions

View File

@ -4470,7 +4470,7 @@ void CodeStubAssembler::KeyedLoadICGeneric(const LoadICParameters* p) {
Variable var_name_index(this, MachineType::PointerRepresentation());
Label if_descriptor_found(this);
DescriptorLookupLinear(key, descriptors, nof, &if_descriptor_found,
&var_name_index, &slow);
&var_name_index, &stub_cache);
Bind(&if_descriptor_found);
{

View File

@ -1436,6 +1436,7 @@ MaybeHandle<Object> KeyedLoadIC::Load(Handle<Object> object,
if (!is_vector_set()) {
ConfigureVectorState(MEGAMORPHIC, key);
TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
TRACE_IC("LoadIC", key);
}
if (!load_handle.is_null()) return load_handle;