зеркало из https://github.com/mozilla/gecko-dev.git
Bug 696220 - js1_8_5/extensions/reflect-parse.js is failing. r=luke.
--HG-- extra : rebase_source : b6452bd11b342921ac7667dfb2765bb213db9e23
This commit is contained in:
Родитель
81dce512ce
Коммит
d57dd02018
|
@ -727,8 +727,8 @@ struct BinaryNode : public ParseNode {
|
|||
struct TernaryNode : public ParseNode {
|
||||
TernaryNode(TokenKind type, JSOp op, ParseNode *kid1, ParseNode *kid2, ParseNode *kid3)
|
||||
: ParseNode(type, op, PN_TERNARY,
|
||||
TokenPos((kid1 ? kid1 : kid2 ? kid2 : kid3)->pn_pos.begin,
|
||||
(kid3 ? kid3 : kid2 ? kid2 : kid1)->pn_pos.end))
|
||||
TokenPos::make((kid1 ? kid1 : kid2 ? kid2 : kid3)->pn_pos.begin,
|
||||
(kid3 ? kid3 : kid2 ? kid2 : kid1)->pn_pos.end))
|
||||
{
|
||||
pn_kid1 = kid1;
|
||||
pn_kid2 = kid2;
|
||||
|
|
|
@ -210,11 +210,11 @@ struct TokenPos {
|
|||
TokenPtr begin; /* first character and line of token */
|
||||
TokenPtr end; /* index 1 past last char, last line */
|
||||
|
||||
TokenPos() {}
|
||||
|
||||
TokenPos(const TokenPtr &begin, const TokenPtr &end) : begin(begin), end(end) {
|
||||
// Assertion temporarily disabled by jorendorff. See bug 695922.
|
||||
static TokenPos make(const TokenPtr &begin, const TokenPtr &end) {
|
||||
// Assertions temporarily disabled by jorendorff. See bug 695922.
|
||||
//JS_ASSERT(begin <= end);
|
||||
TokenPos pos = {begin, end};
|
||||
return pos;
|
||||
}
|
||||
|
||||
/* Return a TokenPos that covers left, right, and anything in between. */
|
||||
|
@ -223,7 +223,8 @@ struct TokenPos {
|
|||
//JS_ASSERT(left.begin <= left.end);
|
||||
//JS_ASSERT(left.end <= right.begin);
|
||||
//JS_ASSERT(right.begin <= right.end);
|
||||
return TokenPos(left.begin, right.end);
|
||||
TokenPos pos = {left.begin, right.end};
|
||||
return pos;
|
||||
}
|
||||
|
||||
bool operator==(const TokenPos& bpos) const {
|
||||
|
|
|
@ -2297,7 +2297,7 @@ ASTSerializer::leftAssociate(ParseNode *pn, Value *dst)
|
|||
if (!expression(next, &right))
|
||||
return false;
|
||||
|
||||
TokenPos subpos(pn->pn_pos.begin, next->pn_pos.end);
|
||||
TokenPos subpos = {pn->pn_pos.begin, next->pn_pos.end};
|
||||
|
||||
if (logop) {
|
||||
if (!builder.logicalExpression(lor, left, right, &subpos, &left))
|
||||
|
|
Загрузка…
Ссылка в новой задаче