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,6 +1465,7 @@ 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
|
* Add a constraint on the element type of the object to pick up
|
||||||
* changes in the object's array-ness or any unknown properties.
|
* changes in the object's array-ness or any unknown properties.
|
||||||
@ -1475,6 +1476,7 @@ public:
|
|||||||
elementTypes->add(cx,
|
elementTypes->add(cx,
|
||||||
ArenaNew<TypeConstraintFreezeObjectKind>(cx->compartment->types.pool,
|
ArenaNew<TypeConstraintFreezeObjectKind>(cx->compartment->types.pool,
|
||||||
object, &kind, script), false);
|
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