Bug 785094: Fix negative colspans showing up in the wrong places. r=jorendorff

This commit is contained in:
Alex Crichton 2012-08-23 10:13:52 -07:00
Родитель 8a2e15d8be
Коммит bbefca0372
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -4804,6 +4804,7 @@ EmitNormalFor(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn, ptrdiff_t top)
if (NewSrcNote2(cx, bce, SRC_SETLINE, lineno) < 0)
return false;
bce->current->currentLine = (unsigned) lineno;
bce->current->lastColumn = 0;
}
}
@ -5262,6 +5263,7 @@ EmitStatement(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
} else if (!pn->isDirectivePrologueMember()) {
/* Don't complain about directive prologue members; just don't emit their code. */
bce->current->currentLine = pn2->pn_pos.begin.lineno;
bce->current->lastColumn = 0;
if (!bce->reportStrictWarning(pn2, JSMSG_USELESS_EXPR))
return false;
}

Просмотреть файл

@ -0,0 +1,2 @@
// |jit-test| dump-bytecode
Function("for(let b; true; x) \nfalse");