Backed out changeset 8401a2705903 (bug 1355046) for bug-1355046.js failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 24 May 2017 11:01:07 -0400
changeset 360378 1d58c6daabeda497d1505f7af1fc61baa0e3e6d5
parent 360377 5a676e5924b68ad90da251c70fa9ea776b5cfe2f
child 360379 c5288b9aa1fb6f377053f7b3d20dc7a58f3ab451
push id90654
push userryanvm@gmail.com
push dateWed, 24 May 2017 15:01:14 +0000
treeherdermozilla-inbound@1d58c6daabed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1355046
milestone55.0a1
backs out8401a27059039469d23d3f692e4f3e5be036fd6d
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 8401a2705903 (bug 1355046) for bug-1355046.js failures.
js/src/frontend/BytecodeEmitter.cpp
js/src/frontend/BytecodeEmitter.h
js/src/jit-test/tests/parser/bug-1355046.js
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -9129,16 +9129,18 @@ BytecodeEmitter::emitStatement(ParseNode
                 }
             }
 
             if (directive) {
                 if (!reportExtraWarning(pn2, JSMSG_CONTRARY_NONDIRECTIVE, directive))
                     return false;
             }
         } else {
+            current->currentLine = parser.tokenStream().srcCoords.lineNum(pn2->pn_pos.begin);
+            current->lastColumn = 0;
             if (!reportExtraWarning(pn2, JSMSG_USELESS_EXPR))
                 return false;
         }
     }
 
     return true;
 }
 
--- a/js/src/frontend/BytecodeEmitter.h
+++ b/js/src/frontend/BytecodeEmitter.h
@@ -186,30 +186,19 @@ struct MOZ_STACK_CLASS BytecodeEmitter
 
     Rooted<LazyScript*> lazyScript; /* the lazy script if mode is LazyFunction,
                                         nullptr otherwise. */
 
     struct EmitSection {
         BytecodeVector code;        /* bytecode */
         SrcNotesVector notes;       /* source notes, see below */
         ptrdiff_t   lastNoteOffset; /* code offset for last source note */
-
-        // Line number for srcnotes.
-        //
-        // WARNING: If this becomes out of sync with already-emitted srcnotes,
-        // we can get undefined behavior.
-        uint32_t    currentLine;
-
-        // Zero-based column index on currentLine of last SRC_COLSPAN-annotated
-        // opcode.
-        //
-        // WARNING: If this becomes out of sync with already-emitted srcnotes,
-        // we can get undefined behavior.
-        uint32_t    lastColumn;
-
+        uint32_t    currentLine;    /* line number for tree-based srcnote gen */
+        uint32_t    lastColumn;     /* zero-based column index on currentLine of
+                                       last SRC_COLSPAN-annotated opcode */
         JumpTarget lastTarget;      // Last jump target emitted.
 
         EmitSection(JSContext* cx, uint32_t lineNum)
           : code(cx), notes(cx), lastNoteOffset(0), currentLine(lineNum), lastColumn(0),
             lastTarget{ -1 - ptrdiff_t(JSOP_JUMPTARGET_LENGTH) }
         {}
     };
     EmitSection prologue, main, *current;
deleted file mode 100644
--- a/js/src/jit-test/tests/parser/bug-1355046.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var localstr = "";
-for (var i = 0; i < 0xFFFC; ++i)
-  localstr += ('\f') + i + "; ";
-var arg = "x";
-var body = localstr + "for (var i = 0; i < 4; ++i) arr[i](x-1);";
-(new Function(arg, body))(1000);