[INFER] Don't add undefined type to arrays which holes were read from.
[INFER] Don't add undefined type to arrays which holes were read from.
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -4655,17 +4655,16 @@ BEGIN_CASE(JSOP_GETELEM)
if (!JSID_IS_INT(id) && !script->typeMonitorUnknown(cx, regs.pc))
goto error;
end_getelem:
regs.sp--;
regs.sp[-1] = *copyFrom;
assertSameCompartment(cx, regs.sp[-1]);
if (copyFrom->isUndefined()) {
- cx->addTypeProperty(obj->getType(), NULL, TYPE_UNDEFINED);
if (!script->typeMonitorUndefined(cx, regs.pc))
goto error;
}
}
END_CASE(JSOP_GETELEM)
BEGIN_CASE(JSOP_CALLELEM)
{
--- a/js/src/methodjit/PolyIC.cpp
+++ b/js/src/methodjit/PolyIC.cpp
@@ -2565,18 +2565,16 @@ ic::GetElement(VMFrame &f, ic::GetElemen
}
}
if (!obj->getProperty(cx, id, &f.regs.sp[-2]))
THROW();
if (!JSID_IS_INT(id) && !f.script()->typeMonitorUnknown(cx, f.pc()))
THROW();
if (f.regs.sp[-2].isUndefined()) {
- if (idval.isInt32())
- cx->addTypeProperty(obj->getType(), NULL, types::TYPE_UNDEFINED);
if (!f.script()->typeMonitorUndefined(cx, f.pc()))
THROW();
}
}
#define APPLY_STRICTNESS(f, s) \
(FunctionTemplateConditional(s, f<true>, f<false>))
--- a/js/src/methodjit/StubCalls.cpp
+++ b/js/src/methodjit/StubCalls.cpp
@@ -514,17 +514,16 @@ stubs::GetElem(VMFrame &f)
if (!JSID_IS_INT(id) && !f.script()->typeMonitorUnknown(cx, f.pc()))
THROW();
end_getelem:
f.regs.sp[-2] = *copyFrom;
if (copyFrom->isUndefined()) {
- cx->addTypeProperty(obj->getType(), NULL, TYPE_UNDEFINED);
if (!f.script()->typeMonitorUndefined(cx, f.pc()))
THROW();
}
}
static inline bool
FetchElementId(VMFrame &f, JSObject *obj, const Value &idval, jsid &id, Value *vp)
{