| Index: src/parsing/parser.h
|
| diff --git a/src/parsing/parser.h b/src/parsing/parser.h
|
| index 0ad95dddac9827929fe2467d03176b13964f0a42..d5e5e08e6da5a674dad2e774d7cf0566843c4464 100644
|
| --- a/src/parsing/parser.h
|
| +++ b/src/parsing/parser.h
|
| @@ -29,8 +29,12 @@ class ParserTargetScope;
|
| class FunctionEntry BASE_EMBEDDED {
|
| public:
|
| enum {
|
| + kKeyPositionIndex,
|
| kStartPositionIndex,
|
| kEndPositionIndex,
|
| + kNumParametersIndex,
|
| + kFunctionLengthIndex,
|
| + kHasDuplicateParametersIndex,
|
| kLiteralCountIndex,
|
| kPropertyCountIndex,
|
| kLanguageModeIndex,
|
| @@ -44,18 +48,23 @@ class FunctionEntry BASE_EMBEDDED {
|
|
|
| FunctionEntry() : backing_() { }
|
|
|
| - int start_pos() { return backing_[kStartPositionIndex]; }
|
| - int end_pos() { return backing_[kEndPositionIndex]; }
|
| - int literal_count() { return backing_[kLiteralCountIndex]; }
|
| - int property_count() { return backing_[kPropertyCountIndex]; }
|
| - LanguageMode language_mode() {
|
| + int start_pos() const { return backing_[kStartPositionIndex]; }
|
| + int end_pos() const { return backing_[kEndPositionIndex]; }
|
| + int num_parameters() const { return backing_[kNumParametersIndex]; }
|
| + int function_length() const { return backing_[kFunctionLengthIndex]; }
|
| + bool has_duplicate_parameters() const {
|
| + return backing_[kHasDuplicateParametersIndex];
|
| + }
|
| + int literal_count() const { return backing_[kLiteralCountIndex]; }
|
| + int property_count() const { return backing_[kPropertyCountIndex]; }
|
| + LanguageMode language_mode() const {
|
| DCHECK(is_valid_language_mode(backing_[kLanguageModeIndex]));
|
| return static_cast<LanguageMode>(backing_[kLanguageModeIndex]);
|
| }
|
| - bool uses_super_property() { return backing_[kUsesSuperPropertyIndex]; }
|
| - bool calls_eval() { return backing_[kCallsEvalIndex]; }
|
| + bool uses_super_property() const { return backing_[kUsesSuperPropertyIndex]; }
|
| + bool calls_eval() const { return backing_[kCallsEvalIndex]; }
|
|
|
| - bool is_valid() { return !backing_.is_empty(); }
|
| + bool is_valid() const { return !backing_.is_empty(); }
|
|
|
| private:
|
| Vector<unsigned> backing_;
|
| @@ -490,13 +499,17 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
| // by parsing the function with PreParser. Consumes the ending }.
|
| // If may_abort == true, the (pre-)parser may decide to abort skipping
|
| // in order to force the function to be eagerly parsed, after all.
|
| - LazyParsingResult SkipLazyFunctionBody(int* materialized_literal_count,
|
| - int* expected_property_count,
|
| - bool is_inner_function, bool may_abort,
|
| - bool* ok);
|
| -
|
| - PreParser::PreParseResult ParseFunctionBodyWithPreParser(
|
| - SingletonLogger* logger, bool is_inner_function, bool may_abort);
|
| + LazyParsingResult SkipLazyFunction(
|
| + FunctionKind kind, DeclarationScope* function_scope, int* num_parameters,
|
| + int* function_length, bool* has_duplicate_parameters,
|
| + int* materialized_literal_count, int* expected_property_count,
|
| + bool is_inner_function, bool may_abort, bool* ok);
|
| +
|
| + PreParser::PreParseResult ParseFunctionWithPreParser(FunctionKind kind,
|
| + DeclarationScope* scope,
|
| + SingletonLogger* logger,
|
| + bool is_inner_function,
|
| + bool may_abort);
|
|
|
| Block* BuildParameterInitializationBlock(
|
| const ParserFormalParameters& parameters, bool* ok);
|
| @@ -508,6 +521,13 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
| const ParserFormalParameters& parameters, FunctionKind kind,
|
| FunctionLiteral::FunctionType function_type, bool* ok);
|
|
|
| + ZoneList<Statement*>* ParseFunctionParametersAndBodyEagerly(
|
| + const AstRawString* function_name, int pos, FunctionKind kind,
|
| + FunctionLiteral::FunctionType function_type,
|
| + DeclarationScope* function_scope, int* num_parameters,
|
| + int* function_length, bool* has_duplicate_parameters,
|
| + int* materialized_literal_count, int* expected_property_count, bool* ok);
|
| +
|
| void ThrowPendingError(Isolate* isolate, Handle<Script> script);
|
|
|
| class TemplateLiteral : public ZoneObject {
|
|
|