Backed out changeset 88980549a854 (bug 1633683) for causing build bustages on FoldConstants.cpp

CLOSED TREE
This commit is contained in:
Arthur Iakab 2020-04-30 20:56:55 +03:00
parent 976856d596
commit 0f8845c0af
2 changed files with 1 additions and 21 deletions

View File

@ -769,7 +769,7 @@ static bool FoldAndOrCoalesce(JSContext* cx, ParseNode** nodePtr) {
// its element.
if (node->count() == 1) {
ParseNode* first = node->head();
TryReplaceNode(nodePtr, first);
ReplaceNode(nodePtr, first);
}
return true;

View File

@ -190,26 +190,6 @@ shouldThrowReferenceError('`${G}`?.r');
// NOT an optional chain
shouldBe(false?.4:5, 5);
// Special case: binary operators that follow a binary expression
shouldThrowReferenceError('(0 || 1 << x)?.$');
shouldThrowReferenceError('(0 || 1 >> x)?.$');
shouldThrowReferenceError('(0 || 1 >>> x)?.$');
shouldThrowReferenceError('(0 || 1 + x)?.$');
shouldThrowReferenceError('(0 || 1 - x)?.$');
shouldThrowReferenceError('(0 || 1 % x)?.$');
shouldThrowReferenceError('(0 || 1 / x)?.$');
shouldThrowReferenceError('(0 || 1 == x)?.$');
shouldThrowReferenceError('(0 || 1 != x)?.$');
shouldThrowReferenceError('(0 || 1 !== x)?.$');
shouldThrowReferenceError('(0 || 1 === x)?.$');
shouldThrowReferenceError('(0 || 1 <= x)?.$');
shouldThrowReferenceError('(0 || 1 >= x)?.$');
shouldThrowReferenceError('(0 || 1 ** x)?.$');
shouldThrowReferenceError('(0 || 1 | x)?.$');
shouldThrowReferenceError('(0 || 1 & x)?.$');
shouldThrowReferenceError('(0 || 1 instanceof x)?.$');
shouldThrowReferenceError('(0 || "foo" in x)?.$');
function testSideEffectCountFunction() {
let count = 0;
let a = {