| Index: src/parsing/parser.h
|
| diff --git a/src/parsing/parser.h b/src/parsing/parser.h
|
| index 5080fb3c26c0cd2cedd1ebb18c7ab2f65327931f..bdf4f62133e093c3c4da701019bb0064b44e551c 100644
|
| --- a/src/parsing/parser.h
|
| +++ b/src/parsing/parser.h
|
| @@ -58,6 +58,9 @@ class ParseInfo {
|
| FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
|
| FLAG_ACCESSOR(kAstValueFactoryOwned, ast_value_factory_owned,
|
| set_ast_value_factory_owned)
|
| + FLAG_ACCESSOR(kIsNamedExpression, is_named_expression,
|
| + set_is_named_expression)
|
| + FLAG_ACCESSOR(kCallsEval, calls_eval, set_calls_eval)
|
|
|
| #undef FLAG_ACCESSOR
|
|
|
| @@ -126,6 +129,26 @@ class ParseInfo {
|
| uint32_t hash_seed() { return hash_seed_; }
|
| void set_hash_seed(uint32_t hash_seed) { hash_seed_ = hash_seed; }
|
|
|
| + int compiler_hints() const { return compiler_hints_; }
|
| + void set_compiler_hints(int compiler_hints) {
|
| + compiler_hints_ = compiler_hints;
|
| + }
|
| +
|
| + int start_position() const { return start_position_; }
|
| + void set_start_position(int start_position) {
|
| + start_position_ = start_position;
|
| + }
|
| +
|
| + int end_position() const { return end_position_; }
|
| + void set_end_position(int end_position) { end_position_ = end_position; }
|
| +
|
| + // Getters for individual compiler hints.
|
| + bool is_declaration() const;
|
| + bool is_arrow() const;
|
| + bool is_async() const;
|
| + bool is_default_constructor() const;
|
| + FunctionKind function_kind() const;
|
| +
|
| //--------------------------------------------------------------------------
|
| // TODO(titzer): these should not be part of ParseInfo.
|
| //--------------------------------------------------------------------------
|
| @@ -171,8 +194,10 @@ class ParseInfo {
|
| kParseRestriction = 1 << 6,
|
| kModule = 1 << 7,
|
| kAllowLazyParsing = 1 << 8,
|
| + kIsNamedExpression = 1 << 9,
|
| + kCallsEval = 1 << 10,
|
| // ---------- Output flags --------------------------
|
| - kAstValueFactoryOwned = 1 << 9
|
| + kAstValueFactoryOwned = 1 << 11
|
| };
|
|
|
| //------------- Inputs to parsing and scope analysis -----------------------
|
| @@ -187,6 +212,9 @@ class ParseInfo {
|
| UnicodeCache* unicode_cache_;
|
| uintptr_t stack_limit_;
|
| uint32_t hash_seed_;
|
| + int compiler_hints_;
|
| + int start_position_;
|
| + int end_position_;
|
|
|
| // TODO(titzer): Move handles and isolate out of ParseInfo.
|
| Isolate* isolate_;
|
| @@ -750,6 +778,7 @@ class Parser : public ParserBase<ParserTraits> {
|
|
|
| FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info);
|
| FunctionLiteral* DoParseLazy(Isolate* isolate, ParseInfo* info,
|
| + const AstRawString* raw_name,
|
| Utf16CharacterStream* source);
|
|
|
| // Called by ParseProgram after setting up the scanner.
|
|
|