v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
parsing.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_PARSING_PARSING_H_
6#define V8_PARSING_PARSING_H_
7
9
10namespace v8 {
11namespace internal {
12
13class ParseInfo;
14class SharedFunctionInfo;
15
16namespace parsing {
17
19
20// Parses the top-level source code represented by the parse info and sets its
21// function literal. Returns false (and deallocates any allocated AST nodes) if
22// parsing failed.
25 Isolate* isolate,
27
28// Parses the top-level source code represented by the parse info and sets its
29// function literal. Allows passing an |outer_scope| for programs that exist in
30// another scope (e.g. eval). Returns false (and deallocates any allocated AST
31// nodes) if parsing failed.
35 Isolate* isolate,
37
38// Like ParseProgram but for an individual function which already has a
39// allocated shared function info.
42 Isolate* isolate, ReportStatisticsMode mode);
43
44// If you don't know whether info->is_toplevel() is true or not, use this method
45// to dispatch to either of the above functions. Prefer to use the above methods
46// whenever possible.
49 Isolate* isolate, ReportStatisticsMode mode);
50
51} // namespace parsing
52} // namespace internal
53} // namespace v8
54
55#endif // V8_PARSING_PARSING_H_
bool ParseAny(ParseInfo *info, DirectHandle< SharedFunctionInfo > shared_info, Isolate *isolate, ReportStatisticsMode mode)
Definition parsing.cc:98
bool ParseFunction(ParseInfo *info, DirectHandle< SharedFunctionInfo > shared_info, Isolate *isolate, ReportStatisticsMode mode)
Definition parsing.cc:67
bool ParseProgram(ParseInfo *info, DirectHandle< Script > script, MaybeDirectHandle< ScopeInfo > maybe_outer_scope_info, Isolate *isolate, ReportStatisticsMode mode)
Definition parsing.cc:39
#define V8_EXPORT_PRIVATE
Definition macros.h:460