xpath_grammar.y: Switch to C++ parser
We used non-standard alloca() in Bison-generated C parser because the semantic union object contains raw pointers of Oilpan objects and they need to be on stack. We'd like to avoid non-standard alloca(), and would like to manage lifetime of union member objects correctly. So, we switch to Bison-generated C++ parser with 'variant' semantic object. It allocates the stack of semantic objects in the normal heap, and correctly construct and destruct each member objects. We can use WTF::String and blink::Persistent as members without any hacks. * rule_bison.py Replace xpath_grammar_generated.hh with xpath_grammar_generated.h on preprocessor directives such as #include and #line. * xml/BUILD.gn Move xpath_grammar_generated.* and xpath_parser.cc to a separated target, and it disables chromium-style clang plugin. chromium-style plugin produces errors on xpath_grammar_generated.h. * xml/xpath_grammar.y Switch to C++ parser. Switch to 'variant' from 'union'. Add missing |$$ = $1|. Remove unnecessary DeleteString() calls. * xml/xpath_parser.cc Adopt to the Bison-generated C++ parser. Remove unused |strings_| code. * audit_non_blink_usage.py Allow xpathyy:: namespace in core/xml/. Change-Id: I1b4f3a224dca058bee83518573d1482259f221bf Bug: 1032320 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1961464 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#725348}
Showing
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Please register or sign in to comment