зеркало из https://github.com/mozilla/gecko-dev.git
Bug 952321 - Don't add proxy stubs in unbarriered GetPropertyICs. (r=jandem)
This commit is contained in:
Родитель
a3e3ddb291
Коммит
54f47748b6
|
@ -1363,8 +1363,10 @@ GetPropertyIC::tryAttachDOMProxyShadowed(JSContext *cx, IonScript *ion,
|
||||||
JS_ASSERT(canAttachStub());
|
JS_ASSERT(canAttachStub());
|
||||||
JS_ASSERT(!*emitted);
|
JS_ASSERT(!*emitted);
|
||||||
JS_ASSERT(IsCacheableDOMProxy(obj));
|
JS_ASSERT(IsCacheableDOMProxy(obj));
|
||||||
|
JS_ASSERT(monitoredResult());
|
||||||
|
JS_ASSERT(output().hasValue());
|
||||||
|
|
||||||
if (idempotent() || !output().hasValue())
|
if (idempotent())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
*emitted = true;
|
*emitted = true;
|
||||||
|
@ -1407,6 +1409,8 @@ GetPropertyIC::tryAttachDOMProxyUnshadowed(JSContext *cx, IonScript *ion, Handle
|
||||||
JS_ASSERT(canAttachStub());
|
JS_ASSERT(canAttachStub());
|
||||||
JS_ASSERT(!*emitted);
|
JS_ASSERT(!*emitted);
|
||||||
JS_ASSERT(IsCacheableDOMProxy(obj));
|
JS_ASSERT(IsCacheableDOMProxy(obj));
|
||||||
|
JS_ASSERT(monitoredResult());
|
||||||
|
JS_ASSERT(output().hasValue());
|
||||||
|
|
||||||
RootedObject checkObj(cx, obj->getTaggedProto().toObjectOrNull());
|
RootedObject checkObj(cx, obj->getTaggedProto().toObjectOrNull());
|
||||||
RootedObject holder(cx);
|
RootedObject holder(cx);
|
||||||
|
@ -1421,7 +1425,7 @@ GetPropertyIC::tryAttachDOMProxyUnshadowed(JSContext *cx, IonScript *ion, Handle
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Make sure we observe our invariants if we're gonna deoptimize.
|
// Make sure we observe our invariants if we're gonna deoptimize.
|
||||||
if (!holder && (idempotent() || !output().hasValue()))
|
if (!holder && idempotent())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
*emitted = true;
|
*emitted = true;
|
||||||
|
@ -1508,6 +1512,11 @@ GetPropertyIC::tryAttachProxy(JSContext *cx, IonScript *ion, HandleObject obj,
|
||||||
if (!obj->is<ProxyObject>())
|
if (!obj->is<ProxyObject>())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// TI can't be sure about our properties, so make sure anything
|
||||||
|
// we return can be monitored directly.
|
||||||
|
if (!monitoredResult())
|
||||||
|
return true;
|
||||||
|
|
||||||
// Skim off DOM proxies.
|
// Skim off DOM proxies.
|
||||||
if (IsCacheableDOMProxy(obj)) {
|
if (IsCacheableDOMProxy(obj)) {
|
||||||
RootedId id(cx, NameToId(name));
|
RootedId id(cx, NameToId(name));
|
||||||
|
@ -1542,11 +1551,13 @@ GetPropertyIC::tryAttachGenericProxy(JSContext *cx, IonScript *ion, HandleObject
|
||||||
JS_ASSERT(canAttachStub());
|
JS_ASSERT(canAttachStub());
|
||||||
JS_ASSERT(!*emitted);
|
JS_ASSERT(!*emitted);
|
||||||
JS_ASSERT(obj->is<ProxyObject>());
|
JS_ASSERT(obj->is<ProxyObject>());
|
||||||
|
JS_ASSERT(monitoredResult());
|
||||||
|
JS_ASSERT(output().hasValue());
|
||||||
|
|
||||||
if (hasGenericProxyStub())
|
if (hasGenericProxyStub())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (idempotent() || !output().hasValue())
|
if (idempotent())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
*emitted = true;
|
*emitted = true;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче