mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Avoid constructing unnecessary FreezeObjectKind constraints, bug 643249.
This commit is contained in:
parent
b6044f527e
commit
140d584eed
13
js/src/jit-test/tests/basic/bug643249.js
Normal file
13
js/src/jit-test/tests/basic/bug643249.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
function x() {}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 10; i++) {
|
||||||
|
_someglobal_ = /a/;
|
||||||
|
(function() {
|
||||||
|
return function() {
|
||||||
|
return _someglobal_
|
||||||
|
} ()
|
||||||
|
} () == /a/);
|
||||||
|
gc();
|
||||||
|
_someglobal_ = new Function.__lookupSetter__;
|
||||||
|
}
|
@ -1465,16 +1465,18 @@ public:
|
|||||||
TypeObject *object = (TypeObject *) type;
|
TypeObject *object = (TypeObject *) type;
|
||||||
ObjectKind nkind = CombineObjectKind(object, kind);
|
ObjectKind nkind = CombineObjectKind(object, kind);
|
||||||
|
|
||||||
/*
|
if (nkind != OBJECT_UNKNOWN) {
|
||||||
* Add a constraint on the element type of the object to pick up
|
/*
|
||||||
* changes in the object's array-ness or any unknown properties.
|
* Add a constraint on the element type of the object to pick up
|
||||||
*/
|
* changes in the object's array-ness or any unknown properties.
|
||||||
TypeSet *elementTypes = object->getProperty(cx, JSID_VOID, false);
|
*/
|
||||||
if (!elementTypes)
|
TypeSet *elementTypes = object->getProperty(cx, JSID_VOID, false);
|
||||||
return;
|
if (!elementTypes)
|
||||||
elementTypes->add(cx,
|
return;
|
||||||
ArenaNew<TypeConstraintFreezeObjectKind>(cx->compartment->types.pool,
|
elementTypes->add(cx,
|
||||||
object, &kind, script), false);
|
ArenaNew<TypeConstraintFreezeObjectKind>(cx->compartment->types.pool,
|
||||||
|
object, &kind, script), false);
|
||||||
|
}
|
||||||
|
|
||||||
if (nkind == kind) {
|
if (nkind == kind) {
|
||||||
/* New object with the same kind we are interested in. */
|
/* New object with the same kind we are interested in. */
|
||||||
|
Loading…
Reference in New Issue
Block a user