From: marja@chromium.org Date: Wed, 12 Feb 2014 11:56:07 +0000 (+0000) Subject: Move parenthesized_function_ to ParserBase. X-Git-Tag: upstream/4.7.83~10760 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cec4fb021b585daded7ca284c21e18eb2a202432;p=platform%2Fupstream%2Fv8.git Move parenthesized_function_ to ParserBase. This change is trivial (was probably overlooked when ParserBase was created). R=yangguo@chromium.org BUG=v8:3126 LOG=N Review URL: https://codereview.chromium.org/150943008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/parser.cc b/src/parser.cc index 24eaef0..0e7e2a9 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -643,7 +643,6 @@ Parser::Parser(CompilationInfo* info) extension_(info->extension()), pre_parse_data_(NULL), fni_(NULL), - parenthesized_function_(false), zone_(info->zone()), info_(info) { ASSERT(!script_.is_null()); diff --git a/src/parser.h b/src/parser.h index c2dd77f..1b1b55f 100644 --- a/src/parser.h +++ b/src/parser.h @@ -785,11 +785,6 @@ class Parser : public ParserBase { FuncNameInferrer* fni_; Mode mode_; - // If true, the next (and immediately following) function literal is - // preceded by a parenthesis. - // Heuristically that means that the function will be called immediately, - // so never lazily compile it. - bool parenthesized_function_; Zone* zone_; CompilationInfo* info_; diff --git a/src/preparser.h b/src/preparser.h index b3f67c9..7c69040 100644 --- a/src/preparser.h +++ b/src/preparser.h @@ -42,6 +42,7 @@ class ParserBase : public Traits { ParserBase(Scanner* scanner, uintptr_t stack_limit, typename Traits::ParserType this_object) : Traits(this_object), + parenthesized_function_(false), scanner_(scanner), stack_limit_(stack_limit), stack_overflow_(false), @@ -281,6 +282,12 @@ class ParserBase : public Traits { LanguageMode language_mode_; }; + // If true, the next (and immediately following) function literal is + // preceded by a parenthesis. + // Heuristically that means that the function will be called immediately, + // so never lazily compile it. + bool parenthesized_function_; + private: Scanner* scanner_; uintptr_t stack_limit_; @@ -505,8 +512,7 @@ class PreParser : public ParserBase { uintptr_t stack_limit) : ParserBase(scanner, stack_limit, this), log_(log), - scope_(NULL), - parenthesized_function_(false) { } + scope_(NULL) { } ~PreParser() {} @@ -748,7 +754,6 @@ class PreParser : public ParserBase { ParserRecorder* log_; Scope* scope_; - bool parenthesized_function_; };