// Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_PARSING_PARSE_INFO_H_ #define V8_PARSING_PARSE_INFO_H_ #include #include #include #include "include/v8.h" #include "src/base/export-template.h" #include "src/common/globals.h" #include "src/handles/handles.h" #include "src/objects/function-kind.h" #include "src/objects/function-syntax-kind.h" #include "src/objects/script.h" #include "src/parsing/pending-compilation-error-handler.h" #include "src/parsing/preparse-data.h" namespace v8 { class Extension; namespace internal { class AccountingAllocator; class AstRawString; class AstStringConstants; class AstValueFactory; class CompilerDispatcher; class DeclarationScope; class FunctionLiteral; class RuntimeCallStats; class Logger; class SourceRangeMap; class Utf16CharacterStream; class Zone; // A container for the inputs, configuration options, and outputs of parsing. class V8_EXPORT_PRIVATE ParseInfo { public: explicit ParseInfo(Isolate*); ParseInfo(Isolate* isolate, Script script); ParseInfo(Isolate* isolate, SharedFunctionInfo shared); // Creates a new parse info based on parent top-level |outer_parse_info| for // function |literal|. static std::unique_ptr FromParent( const ParseInfo* outer_parse_info, AccountingAllocator* zone_allocator, const FunctionLiteral* literal, const AstRawString* function_name); ~ParseInfo(); template EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) Handle