mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155788. Make the Ion inner-window optimizations work again. r=efaust
This commit is contained in:
parent
f028340efb
commit
3bc038ea57
@ -16,6 +16,7 @@ namespace JS {
|
||||
_(GetProp_ArgumentsCallee) \
|
||||
_(GetProp_InferredConstant) \
|
||||
_(GetProp_Constant) \
|
||||
_(GetProp_StaticName) \
|
||||
_(GetProp_SimdGetter) \
|
||||
_(GetProp_TypedObject) \
|
||||
_(GetProp_DefiniteSlot) \
|
||||
|
@ -10014,6 +10014,14 @@ IonBuilder::jsop_getprop(PropertyName* name)
|
||||
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.
|
||||
trackOptimizationAttempt(TrackedStrategy::GetProp_Constant);
|
||||
if (!getPropTryConstant(&emitted, obj, name, types) || emitted)
|
||||
@ -10049,11 +10057,6 @@ IonBuilder::jsop_getprop(PropertyName* name)
|
||||
if (!getPropTryInlineAccess(&emitted, obj, name, barrier, types) || 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.
|
||||
trackOptimizationAttempt(TrackedStrategy::GetProp_InlineCache);
|
||||
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
|
||||
// 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)
|
||||
return *emitted;
|
||||
|
||||
trackOptimizationAttempt(TrackedStrategy::GetProp_StaticName);
|
||||
if (!getStaticName(&script()->global(), name, emitted) || *emitted)
|
||||
return *emitted;
|
||||
|
||||
trackOptimizationAttempt(TrackedStrategy::GetProp_CommonGetter);
|
||||
if (!getPropTryCommonGetter(emitted, inner, name, types) || *emitted)
|
||||
return *emitted;
|
||||
|
||||
@ -11064,6 +11075,7 @@ IonBuilder::getPropTryInnerize(bool* emitted, MDefinition* obj, PropertyName* na
|
||||
// needsOuterizedThisObject check in IsCacheableGetPropCallNative.
|
||||
BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(),
|
||||
inner, name, types);
|
||||
trackOptimizationAttempt(TrackedStrategy::GetProp_InlineCache);
|
||||
if (!getPropTryCache(emitted, inner, name, barrier, types) || *emitted)
|
||||
return *emitted;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user