--- 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