backout bug 810525 for failing jit-tests

This commit is contained in:
Benjamin Peterson 2012-12-28 21:52:52 -06:00
parent 26aa8302a3
commit d3d0762adc
4 changed files with 12 additions and 23 deletions

View File

@ -5974,7 +5974,7 @@ struct ExpressionDecompiler
JSAtom *loadAtom(jsbytecode *pc);
bool quote(JSString *s, uint32_t quote);
bool write(const char *s);
bool write(JSString *str);
bool write(JSString *s);
bool getOutput(char **out);
};
@ -6057,13 +6057,14 @@ ExpressionDecompiler::decompilePC(jsbytecode *pc)
JSAtom *prop = (op == JSOP_LENGTH) ? cx->names().length : loadAtom(pc);
if (!decompilePC(pcstack[-1]))
return false;
if (IsIdentifier(prop)) {
if (IsIdentifier(prop))
return write(".") &&
quote(prop, '\0');
}
return write("[") &&
quote(prop, '\'') &&
write("]");
else
return write("[") &&
quote(prop, '\'') &&
write("]");
return true;
}
case JSOP_GETELEM:
case JSOP_CALLELEM:
@ -6120,18 +6121,6 @@ ExpressionDecompiler::decompilePC(jsbytecode *pc)
case JSOP_FUNCALL:
return decompilePC(pcstack[-int32_t(GET_ARGC(pc) + 2)]) &&
write("(...)");
case JSOP_NEWARRAY:
return write("[]");
case JSOP_REGEXP:
case JSOP_OBJECT: {
JSObject *obj = (op == JSOP_REGEXP)
? script->getRegExp(GET_UINT32_INDEX(pc))
: script->getObject(GET_UINT32_INDEX(pc));
JSString *str = js_ValueToSource(cx, ObjectValue(*obj));
if (!str)
return false;
return write(str);
}
default:
break;
}
@ -6166,9 +6155,9 @@ ExpressionDecompiler::write(const char *s)
}
bool
ExpressionDecompiler::write(JSString *str)
ExpressionDecompiler::write(JSString *s)
{
return sprinter.putString(str) >= 0;
return sprinter.putString(s) >= 0;
}
bool

View File

@ -32,7 +32,7 @@ function test()
}
reportMatch(expect, actual, summary);
expect = /TypeError: \/a\/.exec\(.+\) (has no properties|is null)/;
expect = /TypeError: \(intermediate value\).exec\(.+\) (has no properties|is null)/;
try
{
/a/.exec("b")[0];

View File

@ -22,7 +22,7 @@ function test()
printBugNumber(BUGNUMBER);
printStatus (summary);
expect = 'TypeError: [].__proto__ is not a function';
expect = 'TypeError: (intermediate value).__proto__ is not a function';
jit(true);

View File

@ -9,6 +9,6 @@ try {
err = e;
}
assertEq(err instanceof TypeError, true);
assertEq(err.message, "[][j] is undefined");
assertEq(err.message, "(intermediate value)[j] is undefined");
reportCompare(0, 0, 'ok');