PR #2189 - Follow-up: Fix build bustage with GCC 9 related to checkExportedNamesForDeclaration

This commit is contained in:
Job Bautista 2023-04-05 13:11:44 +08:00 committed by roytam1
commit 7c9215f958

View file

@ -5235,6 +5235,33 @@ Parser<SyntaxParseHandler>::checkExportedName(JSAtom* exportName)
return false;
}
// Because all these template methods call each other, let's declare them first before
// defining them to prevent a GCC compiler error in specialization of member function
// template after instantiation.
template<>
bool
Parser<FullParseHandler>::checkExportedNamesForDeclaration(ParseNode* node);
template<>
bool
Parser<SyntaxParseHandler>::checkExportedNamesForDeclaration(Node node);
template<>
bool
Parser<FullParseHandler>::checkExportedNamesForArrayBinding(ListNode* array);
template<>
inline bool
Parser<SyntaxParseHandler>::checkExportedNamesForArrayBinding(ListNodeType array);
template<>
bool
Parser<FullParseHandler>::checkExportedNamesForObjectBinding(ListNode* obj);
template<>
inline bool
Parser<SyntaxParseHandler>::checkExportedNamesForObjectBinding(ListNodeType obj);
template<>
bool
Parser<FullParseHandler>::checkExportedNamesForArrayBinding(ListNode* array)