mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819635 - Dont add setprop-add stub when adding setprop-set stub in ion ICs. r=mjrosenb
This commit is contained in:
parent
faef85a350
commit
cd2716cd49
@ -1359,12 +1359,14 @@ js::ion::SetPropertyCache(JSContext *cx, size_t cacheIndex, HandleObject obj, Ha
|
||||
RootedObject holder(cx);
|
||||
|
||||
bool inlinable = IsPropertyInlineable(obj, cache);
|
||||
bool addedSetterStub = false;
|
||||
if (inlinable) {
|
||||
RootedShape shape(cx);
|
||||
if (IsPropertySetInlineable(cx, obj, id, &shape)) {
|
||||
cache.incrementStubCount();
|
||||
if (!cache.attachNativeExisting(cx, ion, obj, shape))
|
||||
return false;
|
||||
addedSetterStub = true;
|
||||
} else {
|
||||
RootedObject holder(cx);
|
||||
if (!JSObject::lookupProperty(cx, obj, name, &holder, &shape))
|
||||
@ -1374,6 +1376,7 @@ js::ion::SetPropertyCache(JSContext *cx, size_t cacheIndex, HandleObject obj, Ha
|
||||
cache.incrementStubCount();
|
||||
if (!cache.attachSetterCall(cx, ion, obj, holder, shape, returnAddr))
|
||||
return false;
|
||||
addedSetterStub = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1387,7 +1390,7 @@ js::ion::SetPropertyCache(JSContext *cx, size_t cacheIndex, HandleObject obj, Ha
|
||||
|
||||
// The property did not exists before, now we can try again to inline the
|
||||
// procedure which is adding the property.
|
||||
if (inlinable && IsPropertyAddInlineable(cx, obj, id, oldSlots, &shape)) {
|
||||
if (inlinable && !addedSetterStub && IsPropertyAddInlineable(cx, obj, id, oldSlots, &shape)) {
|
||||
RootedShape newShape(cx, obj->lastProperty());
|
||||
cache.incrementStubCount();
|
||||
if (!cache.attachNativeAdding(cx, ion, obj, oldShape, newShape, shape))
|
||||
|
Loading…
Reference in New Issue
Block a user