Bug 1551489 - Part 2: Instantiate BinASTParser<BinASTTokenReaderContext>. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Mon, 20 May 2019 10:40:42 +0000
changeset 474506 43dd49397f1458733de41dc79af75fcdb9171720
parent 474505 d68c95ef507de06aec2f53fc776ca8bb54c2e064
child 474507 678d5b0568490b694fbd6ffa93d001b42938f530
push id36041
push userccoroiu@mozilla.com
push dateMon, 20 May 2019 21:55:28 +0000
treeherdermozilla-central@29bdbbe89264 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1551489
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 1551489 - Part 2: Instantiate BinASTParser<BinASTTokenReaderContext>. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D31058
js/src/frontend/BinAST.yaml
js/src/frontend/BinASTParser.cpp
js/src/frontend/BinASTParser.h
js/src/frontend/BinASTParserPerTokenizer.cpp
js/src/frontend/BinASTParserPerTokenizer.h
--- a/js/src/frontend/BinAST.yaml
+++ b/js/src/frontend/BinAST.yaml
@@ -34,16 +34,17 @@ cpp:
     #include "mozilla/ArrayUtils.h"
     #include "mozilla/Casting.h"
     #include "mozilla/Maybe.h"
     #include "mozilla/Move.h"
     #include "mozilla/PodOperations.h"
     #include "mozilla/Vector.h"
 
     #include "frontend/BinAST-macros.h"
+    #include "frontend/BinASTTokenReaderContext.h"
     #include "frontend/BinASTTokenReaderMultipart.h"
     #include "frontend/FullParseHandler.h"
     #include "frontend/ParseNode.h"
     #include "frontend/Parser.h"
     #include "frontend/SharedContext.h"
     #include "js/RegExpFlags.h"  //  JS::RegExpFlag, JS::RegExpFlags
     #include "vm/RegExpObject.h"
 
@@ -62,16 +63,17 @@ cpp:
       return Tok::equals(left, right);
     }
 
   footer: |
 
     // Force class instantiation.
     // This ensures that the symbols are built, without having to export all our
     // code (and its baggage of #include and macros) in the header.
+    template class BinASTParser<BinASTTokenReaderContext>;
     template class BinASTParser<BinASTTokenReaderMultipart>;
 
     } // namespace frontend
     } // namespace js
 
 hpp:
   # Rules for generating BinASTParser.h
   class:
@@ -88,16 +90,17 @@ hpp:
       #ifndef frontend_BinASTParser_h
       #define frontend_BinASTParser_h
 
       #include "mozilla/Maybe.h"
 
       #include "frontend/BCEParserHandle.h"
       #include "frontend/BinASTParserPerTokenizer.h"
       #include "frontend/BinASTToken.h"
+      #include "frontend/BinASTTokenReaderContext.h"
       #include "frontend/BinASTTokenReaderMultipart.h"
       #include "frontend/FullParseHandler.h"
       #include "frontend/ParseContext.h"
       #include "frontend/ParseNode.h"
       #include "frontend/SharedContext.h"
 
       #include "js/CompileOptions.h"
       #include "js/GCHashTable.h"
@@ -192,16 +195,17 @@ hpp:
         using Base::prependDirectivesToBody;
 
         using Base::forceStrictIfNecessary;
 
        public:
     footer: |
       };
 
+      extern template class BinASTParser<BinASTTokenReaderContext>;
       extern template class BinASTParser<BinASTTokenReaderMultipart>;
 
       } // namespace frontend
       } // namespace js
 
       #endif // frontend_BinASTParser_h
 
   enums:
--- a/js/src/frontend/BinASTParser.cpp
+++ b/js/src/frontend/BinASTParser.cpp
@@ -14,16 +14,17 @@
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Casting.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Move.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/Vector.h"
 
 #include "frontend/BinAST-macros.h"
+#include "frontend/BinASTTokenReaderContext.h"
 #include "frontend/BinASTTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseNode.h"
 #include "frontend/Parser.h"
 #include "frontend/SharedContext.h"
 #include "js/RegExpFlags.h"  //  JS::RegExpFlag, JS::RegExpFlags
 #include "vm/RegExpObject.h"
 
@@ -5317,12 +5318,13 @@ BinASTParser<Tok>::parseOptionalVariable
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 // Force class instantiation.
 // This ensures that the symbols are built, without having to export all our
 // code (and its baggage of #include and macros) in the header.
+template class BinASTParser<BinASTTokenReaderContext>;
 template class BinASTParser<BinASTTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
--- a/js/src/frontend/BinASTParser.h
+++ b/js/src/frontend/BinASTParser.h
@@ -12,16 +12,17 @@
 #ifndef frontend_BinASTParser_h
 #define frontend_BinASTParser_h
 
 #include "mozilla/Maybe.h"
 
 #include "frontend/BCEParserHandle.h"
 #include "frontend/BinASTParserPerTokenizer.h"
 #include "frontend/BinASTToken.h"
+#include "frontend/BinASTTokenReaderContext.h"
 #include "frontend/BinASTTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseContext.h"
 #include "frontend/ParseNode.h"
 #include "frontend/SharedContext.h"
 
 #include "js/CompileOptions.h"
 #include "js/GCHashTable.h"
@@ -599,14 +600,15 @@ class BinASTParser : public BinASTParser
   JS::Result<ParseNode*> parseOptionalExpression(const Context& context);
   JS::Result<ParseNode*> parseOptionalSpreadElementOrExpression(
       const Context& context);
   JS::Result<ParseNode*> parseOptionalStatement(const Context& context);
   JS::Result<ParseNode*> parseOptionalVariableDeclarationOrExpression(
       const Context& context);
 };
 
+extern template class BinASTParser<BinASTTokenReaderContext>;
 extern template class BinASTParser<BinASTTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
 
 #endif  // frontend_BinASTParser_h
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -11,16 +11,17 @@
 #include "mozilla/Maybe.h"
 #include "mozilla/Move.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/Vector.h"
 
 #include "frontend/BinAST-macros.h"
 #include "frontend/BinASTParser.h"
+#include "frontend/BinASTTokenReaderContext.h"
 #include "frontend/BinASTTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseNode.h"
 #include "frontend/Parser.h"
 #include "frontend/SharedContext.h"
 
 #include "js/Result.h"
 #include "vm/RegExpObject.h"
@@ -808,12 +809,13 @@ BinASTParserPerTokenizer<Tok>::asFinalPa
       "inheritance relationship required by the static_cast<> below");
 
   return static_cast<const FinalParser*>(this);
 }
 
 // Force class instantiation.
 // This ensures that the symbols are built, without having to export all our
 // code (and its baggage of #include and macros) in the header.
+template class BinASTParserPerTokenizer<BinASTTokenReaderContext>;
 template class BinASTParserPerTokenizer<BinASTTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
--- a/js/src/frontend/BinASTParserPerTokenizer.h
+++ b/js/src/frontend/BinASTParserPerTokenizer.h
@@ -15,16 +15,17 @@
  */
 
 #include "mozilla/Maybe.h"
 
 #include "frontend/BCEParserHandle.h"
 #include "frontend/BinASTEnum.h"
 #include "frontend/BinASTParserBase.h"
 #include "frontend/BinASTToken.h"
+#include "frontend/BinASTTokenReaderContext.h"
 #include "frontend/BinASTTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseContext.h"
 #include "frontend/ParseNode.h"
 #include "frontend/SharedContext.h"
 
 #include "js/CompileOptions.h"
 #include "js/GCHashTable.h"
@@ -322,14 +323,15 @@ class BinASTParseContext : public ParseC
   BinASTParseContext(JSContext* cx, BinASTParserPerTokenizer<Tok>* parser,
                      SharedContext* sc, Directives* newDirectives)
       : ParseContext(cx, parser->pc_, sc, *parser, parser->usedNames_,
                      newDirectives, /* isFull = */ true) {}
 };
 
 void TraceBinASTParser(JSTracer* trc, JS::AutoGCRooter* parser);
 
+extern template class BinASTParserPerTokenizer<BinASTTokenReaderContext>;
 extern template class BinASTParserPerTokenizer<BinASTTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
 
 #endif  // frontend_BinASTParserPerTokenizer_h