[INFER] Don't track type sets of values pushed by opcode fusions, bug 646411.

This commit is contained in:
Brian Hackett 2011-03-30 11:30:23 -07:00
parent 70ee8fa7f3
commit 2d35b04f7f
2 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,9 @@
__proto__ = Function();
eval("\
var MS = 16;\
addNewTestCase(new Date(1899,11,31,16,0,0), \"new Date(1899,11,31,16,0,0)\",\
typeof UTC_DAY == 'undefined');\
function addNewTestCase( DateCase, DateString, ResultArray ) {\
ResultArray[MS];\
}\
");

View File

@ -2606,8 +2606,12 @@ mjit::Compiler::generateMethod()
* END COMPILER OPS *
**********************/
if (cx->typeInferenceEnabled()) {
/* Inform the frame of the type sets for values just pushed. */
if (cx->typeInferenceEnabled() && PC == oldPC + analyze::GetBytecodeLength(oldPC)) {
/*
* Inform the frame of the type sets for values just pushed. Skip
* this if we did any opcode fusions, we don't keep track of the
* associated type sets in such cases.
*/
unsigned nuses = analyze::GetUseCount(script, oldPC - script->code);
unsigned ndefs = analyze::GetDefCount(script, oldPC - script->code);
for (unsigned i = 0; i < ndefs; i++) {