Reviewers: Yang,
Message:
Committed patchset #1 manually as r19317 (presubmit successful).
Description:
Move parenthesized_function_ to ParserBase.
This change is trivial (was probably overlooked when ParserBase was
created).
[email protected]
BUG=v8:3126
LOG=N
Committed: https://code.google.com/p/v8/source/detail?r=19317
Please review this at https://codereview.chromium.org/150943008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -9 lines):
M src/parser.h
M src/parser.cc
M src/preparser.h
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index
24eaef0c3d34c51e45a11b17fcd121d5a0e9e84e..0e7e2a95f69966e01a20a7ae55797fab6139eba0
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());
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index
c2dd77fe2a090120213bca045581876e78ac8448..1b1b55f45e2a72bf590c44ec4c5dd13a16907c0d
100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -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: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index
b3f67c9a698a17920f67fd0c0d216ef28ac0bc22..7c6904055929d173964d7d794412d111341f6a7d
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<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_;
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.