зеркало из https://github.com/mozilla/gecko-dev.git
Bug 913749 - Mark fallible unbox instructions as guards. r=h4writer
--HG-- extra : rebase_source : f064535983782dcd52791f977f16a21d83603381
This commit is contained in:
Родитель
cc8d27d8d0
Коммит
d00023d255
|
@ -0,0 +1,20 @@
|
|||
y = Float32Array(11);
|
||||
x = [];
|
||||
|
||||
Object.defineProperty(x, 18, {
|
||||
get: (function() {
|
||||
y.length;
|
||||
}),
|
||||
});
|
||||
this.toSource();
|
||||
|
||||
y = undefined;
|
||||
|
||||
for (var i = 0; i < 3; i++) {
|
||||
try {
|
||||
x.toString();
|
||||
assertEq(0, 1);
|
||||
} catch (e) {
|
||||
assertEq(e.message, "y is undefined");
|
||||
}
|
||||
}
|
|
@ -2197,7 +2197,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
|
|||
setResultTypeSet(ins->resultTypeSet());
|
||||
setMovable();
|
||||
|
||||
if (mode_ == TypeBarrier)
|
||||
if (mode_ == TypeBarrier || mode_ == Fallible)
|
||||
setGuard();
|
||||
|
||||
bailoutKind_ = kind;
|
||||
|
|
Загрузка…
Ссылка в новой задаче