Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 41fb11124b6866a00f65fd0318e38139daeea09c..d00b7db9d48a87ef4d2cb49089f267221afd5fec 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -1124,6 +1124,12 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
++use_counts_[feature]; |
} |
+ // Returns true iff we're parsing the first function literal during |
+ // CreateDynamicFunction(). |
+ V8_INLINE bool IgnoreFunctionName() const { |
Dan Ehrenberg
2016/12/06 00:32:13
Naming nit: How about something that's more about
jwolfe
2017/01/13 00:28:48
How about ParsingDynamicFunctionDeclaration? The s
|
+ return parameters_end_pos_ != kNoSourcePosition; |
+ } |
+ |
// Parser's private field members. |
friend class DiscardableZoneScope; // Uses reusable_preparser_. |
// FIXME(marja): Make reusable_preparser_ always use its own temp Zone (call |
@@ -1150,6 +1156,12 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
bool allow_lazy_; |
bool temp_zoned_; |
ParserLogger* log_; |
+ |
+ // If not kNoSourcePosition, indicates that the first function literal |
+ // encountered is a dynamic function, see CreateDynamicFunction(). This field |
+ // indicates the correct position of the ')' that closes the parameter list. |
+ // After that ')' is encountered, this field is reset to kNoSourcePosition. |
+ int parameters_end_pos_; |
}; |
// ---------------------------------------------------------------------------- |