From: mstarzinger@chromium.org Date: Mon, 8 Apr 2013 11:53:50 +0000 (+0000) Subject: Devirtualize Parser X-Git-Tag: upstream/4.7.83~14677 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1345caa2087b4abba75f7755bea41629f42eba30;p=platform%2Fupstream%2Fv8.git 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 . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/parser.h b/src/parser.h index 1a90d1b..8a3be4e 100644 --- a/src/parser.h +++ b/src/parser.h @@ -293,7 +293,7 @@ class RegExpBuilder: public ZoneObject { }; -class RegExpParser { +class RegExpParser BASE_EMBEDDED { public: RegExpParser(FlatStringReader* in, Handle* 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; }