mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 893897. Don't deoptimize typeobjects in TypeScript::MonitorAssign if they only have a few properties. r=bhackett
This commit is contained in:
parent
c426151250
commit
3bee6e23e2
@ -966,7 +966,14 @@ TypeScript::MonitorAssign(JSContext *cx, HandleObject obj, jsid id)
|
||||
uint32_t i;
|
||||
if (js_IdIsIndex(id, &i))
|
||||
return;
|
||||
MarkTypeObjectUnknownProperties(cx, obj->type());
|
||||
|
||||
// But if we don't have too many properties yet, don't do anything. The
|
||||
// idea here is that normal object initialization should not trigger
|
||||
// deoptimization in most cases, while actual usage as a hashmap should.
|
||||
TypeObject* type = obj->type();
|
||||
if (type->getPropertyCount() < 8)
|
||||
return;
|
||||
MarkTypeObjectUnknownProperties(cx, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user