Bug 1551916 - Remove |TokenStreamAnyChars::undoInternalUpdateLineInfoForEOL| as unused. r=arai
authorJeff Walden <jwalden@mit.edu>
Fri, 17 May 2019 03:20:58 +0000
changeset 474286 c5180b76c35305e08385c338101b6f7e18ae1641
parent 474285 41abcc2640371974e4067240da2885ddcf0a805c
child 474287 04cce27de4ac16500981c23558b355cfe4ddc186
push id36027
push usershindli@mozilla.com
push dateFri, 17 May 2019 16:24:38 +0000
treeherdermozilla-central@c94c54aff466 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1551916
milestone68.0a1
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
Bug 1551916 - Remove |TokenStreamAnyChars::undoInternalUpdateLineInfoForEOL| as unused. r=arai Differential Revision: https://phabricator.services.mozilla.com/D31300
js/src/frontend/TokenStream.cpp
js/src/frontend/TokenStream.h
--- a/js/src/frontend/TokenStream.cpp
+++ b/js/src/frontend/TokenStream.cpp
@@ -634,24 +634,16 @@ void TokenStreamAnyChars::reportErrorNoO
 MOZ_MUST_USE MOZ_ALWAYS_INLINE bool
 TokenStreamAnyChars::internalUpdateLineInfoForEOL(uint32_t lineStartOffset) {
   prevLinebase = linebase;
   linebase = lineStartOffset;
   lineno++;
   return srcCoords.add(lineno, linebase);
 }
 
-void TokenStreamAnyChars::undoInternalUpdateLineInfoForEOL() {
-  MOZ_ASSERT(prevLinebase !=
-             size_t(-1));  // we should never get more than one EOL
-  linebase = prevLinebase;
-  prevLinebase = size_t(-1);
-  lineno--;
-}
-
 #ifdef DEBUG
 
 template <>
 inline void SourceUnits<char16_t>::assertNextCodePoint(
     const PeekedCodePoint<char16_t>& peeked) {
   char32_t c = peeked.codePoint();
   if (c < unicode::NonBMPMin) {
     MOZ_ASSERT(peeked.lengthInUnits() == 1);
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -631,18 +631,16 @@ class TokenStreamAnyChars : public Token
   bool fillExceptingContext(ErrorMetadata* err, uint32_t offset);
 
   MOZ_ALWAYS_INLINE void updateFlagsForEOL() { flags.isDirtyLine = false; }
 
  private:
   MOZ_MUST_USE MOZ_ALWAYS_INLINE bool internalUpdateLineInfoForEOL(
       uint32_t lineStartOffset);
 
-  void undoInternalUpdateLineInfoForEOL();
-
  public:
   const Token& nextToken() const {
     MOZ_ASSERT(hasLookahead());
     return tokens[nextCursor()];
   }
 
   bool hasLookahead() const { return lookahead > 0; }