WIP: Getting undefined symbols to show up draft
authorDavid Teller <dteller@mozilla.com>
Thu, 03 Aug 2017 11:19:42 +0200
changeset 641368 af6ae742981d758095b3859dbb05e38c43751708
parent 641367 9c72b3b79f95aa278ed7bff1f581bb42d7e337ae
child 641369 8cf4eef69713d8e669b79130e5b5495eaf0b494f
push id72504
push userdteller@mozilla.com
push dateSun, 06 Aug 2017 22:28:40 +0000
milestone57.0a1
WIP: Getting undefined symbols to show up MozReview-Commit-ID: JEfHJWmhQr7
js/src/frontend/BinSource.cpp
--- a/js/src/frontend/BinSource.cpp
+++ b/js/src/frontend/BinSource.cpp
@@ -83,16 +83,24 @@ public:
     ASTReader(JSContext* cx_, LifoAlloc& alloc_)
         : AutoGCRooter(cx_, BINPARSER)
         , traceListHead(nullptr)
         , allocator(cx_, alloc_)
         , cx(cx_)
         , alloc(alloc_)
     { }
 
+    static bool test() {
+        // FIXME: Just a small hack to force the build system to
+        // display undefined symbols.
+        ASTReader foo(nullptr, *static_cast<LifoAlloc*>(nullptr));
+        UniquePtr<ParseNode> out;
+        return foo.parse(nullptr, nullptr, nullptr, out);
+    }
+
     bool parse(char* start, char* stop, GlobalSharedContext* sc, UniquePtr<ParseNode>& out);
 private:
     bool raiseError();
 
     // --- Parse full nodes.
 
     bool parseBool(SimpleTokenReader*, Maybe<bool>*);
     bool parseProgram(SimpleTokenReader* reader, UniquePtr<ParseNode>& out);
@@ -1980,12 +1988,12 @@ ASTReader::raiseError() {
 }
 
 void
 TraceBinParser(JSTracer* trc, AutoGCRooter* parser)
 {
     static_cast<ASTReader*>(parser)->trace(trc);
 }
 
-static ASTReader foo(nullptr, *static_cast<LifoAlloc*>(nullptr));
+static bool NOTHING = ASTReader::test();
 
 } // namespace frontend
 } // namespace js