Devirtualize Parser

* src/parser.h: No one inherits from Parser, so the destructor can be
  non-virtual, removing the need for Parser to have a vtable. Also add
  BASE_EMBEDDED to it and to RegExpParser.

BUG=

Review URL: https://codereview.chromium.org/13640007
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 17100fb2
......@@ -293,7 +293,7 @@ class RegExpBuilder: public ZoneObject {
};
class RegExpParser {
class RegExpParser BASE_EMBEDDED {
public:
RegExpParser(FlatStringReader* in,
Handle<String>* error,
......@@ -423,10 +423,10 @@ class RegExpParser {
// Forward declaration.
class SingletonLogger;
class Parser {
class Parser BASE_EMBEDDED {
public:
explicit Parser(CompilationInfo* info);
virtual ~Parser() {
~Parser() {
delete reusable_preparser_;
reusable_preparser_ = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment