Move parenthesized_function_ to ParserBase.
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 12 Feb 2014 11:56:07 +0000 (11:56 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 12 Feb 2014 11:56:07 +0000 (11:56 +0000)
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

src/parser.cc
src/parser.h
src/preparser.h

index 24eaef0..0e7e2a9 100644 (file)
@@ -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());
index c2dd77f..1b1b55f 100644 (file)
@@ -785,11 +785,6 @@ class Parser : public ParserBase<ParserTraits> {
   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_;
index b3f67c9..7c69040 100644 (file)
@@ -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<PreParserTraits> {
             uintptr_t stack_limit)
       : ParserBase<PreParserTraits>(scanner, stack_limit, this),
         log_(log),
-        scope_(NULL),
-        parenthesized_function_(false) { }
+        scope_(NULL) { }
 
   ~PreParser() {}
 
@@ -748,7 +754,6 @@ class PreParser : public ParserBase<PreParserTraits> {
 
   ParserRecorder* log_;
   Scope* scope_;
-  bool parenthesized_function_;
 };