[INFER] Fix broken jstests, bug 620599.

This commit is contained in:
Brian Hackett 2011-03-16 12:03:47 -07:00
parent ba45077705
commit d321e040a2
4 changed files with 11 additions and 4 deletions

View File

@ -1967,7 +1967,7 @@ mjit::Compiler::jsop_initprop()
JSObject *baseobj = obj->initializerObject();
if (!baseobj) {
if (!baseobj || monitored(PC)) {
prepareStubCall(Uses(2));
masm.move(ImmPtr(atom), Registers::ArgReg1);
INLINE_STUBCALL(stubs::InitProp);

View File

@ -305,6 +305,10 @@ stubs::CompileFunction(VMFrame &f, uint32 nactual)
JSFunction *fun = callee.getFunctionPrivate();
JSScript *script = fun->script();
CallArgs args(fp->formalArgsEnd() - nactual, nactual);
if (!cx->typeMonitorCall(args, fp->isConstructing()))
return NULL;
/*
* FixupArity/RemovePartialFrame expect to be called after the early
* prologue.

View File

@ -1398,7 +1398,7 @@ stubs::NewInitObject(VMFrame &f, JSObject *baseobj)
JSObject *obj = NewBuiltinClassInstance(cx, &js_ObjectClass, kind);
if (!obj)
THROWV(NULL);
if (!type || !obj->setTypeAndEmptyShape(cx, type))
if (type && !obj->setTypeAndEmptyShape(cx, type))
THROWV(NULL);
return obj;
}

View File

@ -30,8 +30,11 @@ function add_p0to127(o) {
function add_p128(o) {
o.p200 = ++i;
}
var o = add_p0to127({});
var o2 = add_p0to127({});
var oarr = [];
for (var i = 0; i < 2; i++)
oarr[i] = {};
var o = add_p0to127(oarr[0]);
var o2 = add_p0to127(oarr[1]);
var o_shape127 = shapeOf(o);
assertEq(o_shape127, shapeOf(o2));
add_p128(o);