Commit d2ba280d authored by jkummerow's avatar jkummerow Committed by Commit bot

[ic] Restore Function.prototype fast path for LoadIC_Uninitialized

It was replaced by more generic handling  in 13206667, which
is functionally fine, but for performance it makes sense to keep
the fast path.

Review-Url: https://codereview.chromium.org/2864463004
Cr-Commit-Position: refs/heads/master@{#45155}
parent 918c2364
...@@ -1877,6 +1877,20 @@ void AccessorAssembler::LoadIC_Uninitialized(const LoadICParameters* p) { ...@@ -1877,6 +1877,20 @@ void AccessorAssembler::LoadIC_Uninitialized(const LoadICParameters* p) {
LoadRoot(Heap::kpremonomorphic_symbolRootIndex), LoadRoot(Heap::kpremonomorphic_symbolRootIndex),
SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS); SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS);
{
// Special case for Function.prototype load, because it's very common
// for ICs that are only executed once (MyFunc.prototype.foo = ...).
Label not_function_prototype(this);
GotoIf(Word32NotEqual(instance_type, Int32Constant(JS_FUNCTION_TYPE)),
&not_function_prototype);
GotoIfNot(IsPrototypeString(p->name), &not_function_prototype);
Node* bit_field = LoadMapBitField(receiver_map);
GotoIf(IsSetWord32(bit_field, 1 << Map::kHasNonInstancePrototype),
&not_function_prototype);
Return(LoadJSFunctionPrototype(receiver, &miss));
BIND(&not_function_prototype);
}
GenericPropertyLoad(receiver, receiver_map, instance_type, p->name, p, &miss, GenericPropertyLoad(receiver, receiver_map, instance_type, p->name, p, &miss,
kDontUseStubCache); kDontUseStubCache);
......
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