mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 1155788. Make the Ion inner-window optimizations work again. r=efaust
This commit is contained in:
parent
e5d918e74e
commit
4a61e9d41f
@ -16,6 +16,7 @@ namespace JS {
|
|||||||
_(GetProp_ArgumentsCallee) \
|
_(GetProp_ArgumentsCallee) \
|
||||||
_(GetProp_InferredConstant) \
|
_(GetProp_InferredConstant) \
|
||||||
_(GetProp_Constant) \
|
_(GetProp_Constant) \
|
||||||
|
_(GetProp_StaticName) \
|
||||||
_(GetProp_SimdGetter) \
|
_(GetProp_SimdGetter) \
|
||||||
_(GetProp_TypedObject) \
|
_(GetProp_TypedObject) \
|
||||||
_(GetProp_DefiniteSlot) \
|
_(GetProp_DefiniteSlot) \
|
||||||
|
@ -10014,6 +10014,14 @@ IonBuilder::jsop_getprop(PropertyName* name)
|
|||||||
return resumeAfter(call) && pushTypeBarrier(call, types, BarrierKind::TypeSet);
|
return resumeAfter(call) && pushTypeBarrier(call, types, BarrierKind::TypeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try to optimize accesses on outer window proxies, for example window.foo.
|
||||||
|
// This needs to come before the various strategies getPropTryInnerize tries
|
||||||
|
// internally, since some of those strategies will "succeed" in silly ways
|
||||||
|
// even for an outer object.
|
||||||
|
trackOptimizationAttempt(TrackedStrategy::GetProp_Innerize);
|
||||||
|
if (!getPropTryInnerize(&emitted, obj, name, types) || emitted)
|
||||||
|
return emitted;
|
||||||
|
|
||||||
// Try to hardcode known constants.
|
// Try to hardcode known constants.
|
||||||
trackOptimizationAttempt(TrackedStrategy::GetProp_Constant);
|
trackOptimizationAttempt(TrackedStrategy::GetProp_Constant);
|
||||||
if (!getPropTryConstant(&emitted, obj, name, types) || emitted)
|
if (!getPropTryConstant(&emitted, obj, name, types) || emitted)
|
||||||
@ -10049,11 +10057,6 @@ IonBuilder::jsop_getprop(PropertyName* name)
|
|||||||
if (!getPropTryInlineAccess(&emitted, obj, name, barrier, types) || emitted)
|
if (!getPropTryInlineAccess(&emitted, obj, name, barrier, types) || emitted)
|
||||||
return emitted;
|
return emitted;
|
||||||
|
|
||||||
// Try to optimize accesses on outer window proxies, for example window.foo.
|
|
||||||
trackOptimizationAttempt(TrackedStrategy::GetProp_Innerize);
|
|
||||||
if (!getPropTryInnerize(&emitted, obj, name, types) || emitted)
|
|
||||||
return emitted;
|
|
||||||
|
|
||||||
// Try to emit a polymorphic cache.
|
// Try to emit a polymorphic cache.
|
||||||
trackOptimizationAttempt(TrackedStrategy::GetProp_InlineCache);
|
trackOptimizationAttempt(TrackedStrategy::GetProp_InlineCache);
|
||||||
if (!getPropTryCache(&emitted, obj, name, barrier, types) || emitted)
|
if (!getPropTryCache(&emitted, obj, name, barrier, types) || emitted)
|
||||||
@ -11051,12 +11054,20 @@ IonBuilder::getPropTryInnerize(bool* emitted, MDefinition* obj, PropertyName* na
|
|||||||
// possible the global property's HeapTypeSet has not been initialized
|
// possible the global property's HeapTypeSet has not been initialized
|
||||||
// yet. In this case we'll fall back to getPropTryCache for now.
|
// yet. In this case we'll fall back to getPropTryCache for now.
|
||||||
|
|
||||||
|
// Note that it's important that we do this _before_ we'd try to
|
||||||
|
// do the optimizations below on obj normally, since some of those
|
||||||
|
// optimizations have fallback paths that are slower than the path
|
||||||
|
// we'd produce here.
|
||||||
|
|
||||||
|
trackOptimizationAttempt(TrackedStrategy::GetProp_Constant);
|
||||||
if (!getPropTryConstant(emitted, inner, name, types) || *emitted)
|
if (!getPropTryConstant(emitted, inner, name, types) || *emitted)
|
||||||
return *emitted;
|
return *emitted;
|
||||||
|
|
||||||
|
trackOptimizationAttempt(TrackedStrategy::GetProp_StaticName);
|
||||||
if (!getStaticName(&script()->global(), name, emitted) || *emitted)
|
if (!getStaticName(&script()->global(), name, emitted) || *emitted)
|
||||||
return *emitted;
|
return *emitted;
|
||||||
|
|
||||||
|
trackOptimizationAttempt(TrackedStrategy::GetProp_CommonGetter);
|
||||||
if (!getPropTryCommonGetter(emitted, inner, name, types) || *emitted)
|
if (!getPropTryCommonGetter(emitted, inner, name, types) || *emitted)
|
||||||
return *emitted;
|
return *emitted;
|
||||||
|
|
||||||
@ -11064,6 +11075,7 @@ IonBuilder::getPropTryInnerize(bool* emitted, MDefinition* obj, PropertyName* na
|
|||||||
// needsOuterizedThisObject check in IsCacheableGetPropCallNative.
|
// needsOuterizedThisObject check in IsCacheableGetPropCallNative.
|
||||||
BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(),
|
BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(),
|
||||||
inner, name, types);
|
inner, name, types);
|
||||||
|
trackOptimizationAttempt(TrackedStrategy::GetProp_InlineCache);
|
||||||
if (!getPropTryCache(emitted, inner, name, barrier, types) || *emitted)
|
if (!getPropTryCache(emitted, inner, name, barrier, types) || *emitted)
|
||||||
return *emitted;
|
return *emitted;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user