v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::FunctionLiteral Class Referencefinal

#include <ast.h>

Inheritance diagram for v8::internal::FunctionLiteral:
Collaboration diagram for v8::internal::FunctionLiteral:

Public Types

enum  ParameterFlag : uint8_t { kNoDuplicateParameters , kHasDuplicateParameters }
 
enum  EagerCompileHint : uint8_t { kShouldEagerCompile , kShouldLazyCompile }
 
- Public Types inherited from v8::internal::Expression
enum  Context { kUninitialized , kEffect , kValue , kTest }
 
- Public Types inherited from v8::internal::AstNode
enum  NodeType : uint8_t
 

Public Member Functions

template<typename IsolateT >
MaybeHandle< StringGetName (IsolateT *isolate) const
 
bool has_shared_name () const
 
const AstConsStringraw_name () const
 
void set_raw_name (const AstConsString *name)
 
DeclarationScopescope () const
 
ZonePtrList< Statement > * body ()
 
void set_function_token_position (int pos)
 
int function_token_position () const
 
int start_position () const
 
int end_position () const
 
bool is_anonymous_expression () const
 
bool is_toplevel () const
 
V8_EXPORT_PRIVATE LanguageMode language_mode () const
 
void add_expected_properties (int number_properties)
 
int expected_property_count ()
 
int parameter_count ()
 
int function_length ()
 
bool AllowsLazyCompilation ()
 
bool CanSuspend ()
 
std::unique_ptr< char[]> GetDebugName () const
 
Handle< StringGetInferredName (Isolate *isolate)
 
Handle< StringGetInferredName (LocalIsolate *isolate) const
 
Handle< SharedFunctionInfoshared_function_info () const
 
void set_shared_function_info (Handle< SharedFunctionInfo > shared_function_info)
 
const AstConsStringraw_inferred_name ()
 
void set_raw_inferred_name (AstConsString *raw_inferred_name)
 
bool pretenure () const
 
void set_pretenure ()
 
bool has_duplicate_parameters () const
 
bool should_parallel_compile () const
 
void set_should_parallel_compile ()
 
V8_EXPORT_PRIVATE bool ShouldEagerCompile () const
 
V8_EXPORT_PRIVATE void SetShouldEagerCompile ()
 
FunctionSyntaxKind syntax_kind () const
 
FunctionKind kind () const
 
bool IsAnonymousFunctionDefinition () const
 
int suspend_count ()
 
void set_suspend_count (int suspend_count)
 
int return_position ()
 
int function_literal_id () const
 
void set_function_literal_id (int function_literal_id)
 
void set_requires_instance_members_initializer (bool value)
 
bool requires_instance_members_initializer () const
 
void set_has_static_private_methods_or_accessors (bool value)
 
bool has_static_private_methods_or_accessors () const
 
void set_class_scope_has_private_brand (bool value)
 
bool class_scope_has_private_brand () const
 
bool private_name_lookup_skips_outer_class () const
 
ProducedPreparseDataproduced_preparse_data () const
 
- Public Member Functions inherited from v8::internal::Expression
bool IsValidReferenceExpression () const
 
bool IsPrivateName () const
 
bool ToBooleanIsTrue () const
 
bool ToBooleanIsFalse () const
 
bool IsPropertyName () const
 
bool IsAnonymousFunctionDefinition () const
 
bool IsConciseMethodDefinition () const
 
bool IsAccessorFunctionDefinition () const
 
bool IsSmiLiteral () const
 
V8_EXPORT_PRIVATE bool IsNumberLiteral () const
 
bool IsStringLiteral () const
 
bool IsConsStringLiteral () const
 
bool IsNullLiteral () const
 
bool IsBooleanLiteral () const
 
bool IsTheHoleLiteral () const
 
bool IsUndefinedLiteral () const
 
bool IsNullOrUndefinedLiteral () const
 
bool IsLiteralButNotNullOrUndefined () const
 
bool IsCompileTimeValue ()
 
bool IsPattern ()
 
bool is_parenthesized () const
 
void mark_parenthesized ()
 
void clear_parenthesized ()
 
- Public Member Functions inherited from v8::internal::AstNode
NodeType node_type () const
 
int position () const
 
IterationStatementAsIterationStatement ()
 
MaterializedLiteralAsMaterializedLiteral ()
 
- Public Member Functions inherited from v8::internal::ZoneObject
void * operator new (size_t, Zone *)=delete
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)=delete
 

Private Types

using FunctionSyntaxKindBits
 
using Pretenure = FunctionSyntaxKindBits::Next<bool, 1>
 
using HasDuplicateParameters = Pretenure::Next<bool, 1>
 
using RequiresInstanceMembersInitializer
 
using HasStaticPrivateMethodsOrAccessorsField
 
using HasBracesField = HasStaticPrivateMethodsOrAccessorsField::Next<bool, 1>
 
using ShouldParallelCompileField = HasBracesField::Next<bool, 1>
 

Private Member Functions

 FunctionLiteral (Zone *zone, const AstConsString *name, AstValueFactory *ast_value_factory, DeclarationScope *scope, const ScopedPtrList< Statement > &body, int expected_property_count, int parameter_count, int function_length, FunctionSyntaxKind function_syntax_kind, ParameterFlag has_duplicate_parameters, EagerCompileHint eager_compile_hint, int position, bool has_braces, int function_literal_id, ProducedPreparseData *produced_preparse_data=nullptr)
 

Private Attributes

friend Zone
 
int expected_property_count_
 
int parameter_count_
 
int function_length_
 
int function_token_position_
 
int suspend_count_
 
int function_literal_id_
 
const AstConsStringraw_name_
 
DeclarationScopescope_
 
ZonePtrList< Statementbody_
 
AstConsStringraw_inferred_name_
 
IndirectHandle< SharedFunctionInfoshared_function_info_
 
ProducedPreparseDataproduced_preparse_data_
 

Friends

class AstNodeFactory
 

Additional Inherited Members

- Protected Types inherited from v8::internal::Expression
template<class T , int size>
using NextBitField = IsParenthesizedField::Next<T, size>
 
- Protected Types inherited from v8::internal::AstNode
template<class T , int size>
using NextBitField = NodeTypeField::Next<T, size>
 
- Protected Member Functions inherited from v8::internal::Expression
 Expression (int pos, NodeType type)
 
- Protected Member Functions inherited from v8::internal::AstNode
 AstNode (int position, NodeType type)
 
- Protected Attributes inherited from v8::internal::AstNode
uint32_t bit_field_
 

Detailed Description

Definition at line 2298 of file ast.h.

Member Typedef Documentation

◆ FunctionSyntaxKindBits

Initial value:
IsParenthesizedField::Next< T, size > NextBitField
Definition ast.h:293

Definition at line 2472 of file ast.h.

◆ HasBracesField

◆ HasDuplicateParameters

Definition at line 2475 of file ast.h.

◆ HasStaticPrivateMethodsOrAccessorsField

Initial value:

Definition at line 2478 of file ast.h.

◆ Pretenure

Definition at line 2474 of file ast.h.

◆ RequiresInstanceMembersInitializer

◆ ShouldParallelCompileField

Member Enumeration Documentation

◆ EagerCompileHint

Enumerator
kShouldEagerCompile 
kShouldLazyCompile 

Definition at line 2304 of file ast.h.

◆ ParameterFlag

Enumerator
kNoDuplicateParameters 
kHasDuplicateParameters 

Definition at line 2300 of file ast.h.

Constructor & Destructor Documentation

◆ FunctionLiteral()

v8::internal::FunctionLiteral::FunctionLiteral ( Zone * zone,
const AstConsString * name,
AstValueFactory * ast_value_factory,
DeclarationScope * scope,
const ScopedPtrList< Statement > & body,
int expected_property_count,
int parameter_count,
int function_length,
FunctionSyntaxKind function_syntax_kind,
ParameterFlag has_duplicate_parameters,
EagerCompileHint eager_compile_hint,
int position,
bool has_braces,
int function_literal_id,
ProducedPreparseData * produced_preparse_data = nullptr )
inlineprivate

Definition at line 2441 of file ast.h.

Here is the call graph for this function:

Member Function Documentation

◆ add_expected_properties()

void v8::internal::FunctionLiteral::add_expected_properties ( int number_properties)
inline

Definition at line 2330 of file ast.h.

◆ AllowsLazyCompilation()

bool v8::internal::FunctionLiteral::AllowsLazyCompilation ( )

Definition at line 217 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ body()

ZonePtrList< Statement > * v8::internal::FunctionLiteral::body ( )
inline

Definition at line 2316 of file ast.h.

Here is the caller graph for this function:

◆ CanSuspend()

bool v8::internal::FunctionLiteral::CanSuspend ( )
inline

Definition at line 2339 of file ast.h.

Here is the call graph for this function:

◆ class_scope_has_private_brand()

bool v8::internal::FunctionLiteral::class_scope_has_private_brand ( ) const

Definition at line 268 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end_position()

int v8::internal::FunctionLiteral::end_position ( ) const

Definition at line 225 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expected_property_count()

int v8::internal::FunctionLiteral::expected_property_count ( )
inline

Definition at line 2333 of file ast.h.

◆ function_length()

int v8::internal::FunctionLiteral::function_length ( )
inline

Definition at line 2335 of file ast.h.

Here is the caller graph for this function:

◆ function_literal_id()

int v8::internal::FunctionLiteral::function_literal_id ( ) const
inline

Definition at line 2408 of file ast.h.

Here is the caller graph for this function:

◆ function_token_position()

int v8::internal::FunctionLiteral::function_token_position ( ) const
inline

Definition at line 2318 of file ast.h.

Here is the caller graph for this function:

◆ GetDebugName()

std::unique_ptr< char[]> v8::internal::FunctionLiteral::GetDebugName ( ) const

Definition at line 233 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInferredName() [1/2]

Handle< String > v8::internal::FunctionLiteral::GetInferredName ( Isolate * isolate)

Definition at line 194 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInferredName() [2/2]

Handle< String > v8::internal::FunctionLiteral::GetInferredName ( LocalIsolate * isolate) const
inline

Definition at line 2351 of file ast.h.

Here is the call graph for this function:

◆ GetName()

template<typename IsolateT >
MaybeHandle< String > v8::internal::FunctionLiteral::GetName ( IsolateT * isolate) const
inline

Definition at line 2309 of file ast.h.

Here is the caller graph for this function:

◆ has_duplicate_parameters()

bool v8::internal::FunctionLiteral::has_duplicate_parameters ( ) const
inline

Definition at line 2369 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_shared_name()

bool v8::internal::FunctionLiteral::has_shared_name ( ) const
inline

Definition at line 2312 of file ast.h.

◆ has_static_private_methods_or_accessors()

bool v8::internal::FunctionLiteral::has_static_private_methods_or_accessors ( ) const
inline

Definition at line 2424 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_anonymous_expression()

bool v8::internal::FunctionLiteral::is_anonymous_expression ( ) const
inline

Definition at line 2321 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_toplevel()

bool v8::internal::FunctionLiteral::is_toplevel ( ) const
inline

Definition at line 2325 of file ast.h.

Here is the call graph for this function:

◆ IsAnonymousFunctionDefinition()

bool v8::internal::FunctionLiteral::IsAnonymousFunctionDefinition ( ) const
inline

Definition at line 2395 of file ast.h.

Here is the call graph for this function:

◆ kind()

FunctionKind v8::internal::FunctionLiteral::kind ( ) const

Definition at line 231 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ language_mode()

LanguageMode v8::internal::FunctionLiteral::language_mode ( ) const

Definition at line 227 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parameter_count()

int v8::internal::FunctionLiteral::parameter_count ( )
inline

Definition at line 2334 of file ast.h.

Here is the caller graph for this function:

◆ pretenure()

bool v8::internal::FunctionLiteral::pretenure ( ) const
inline

Definition at line 2366 of file ast.h.

Here is the call graph for this function:

◆ private_name_lookup_skips_outer_class()

bool v8::internal::FunctionLiteral::private_name_lookup_skips_outer_class ( ) const

Definition at line 264 of file ast.cc.

Here is the call graph for this function:

◆ produced_preparse_data()

ProducedPreparseData * v8::internal::FunctionLiteral::produced_preparse_data ( ) const
inline

Definition at line 2433 of file ast.h.

Here is the caller graph for this function:

◆ raw_inferred_name()

const AstConsString * v8::internal::FunctionLiteral::raw_inferred_name ( )
inline

Definition at line 2362 of file ast.h.

Here is the caller graph for this function:

◆ raw_name()

const AstConsString * v8::internal::FunctionLiteral::raw_name ( ) const
inline

Definition at line 2313 of file ast.h.

◆ requires_instance_members_initializer()

bool v8::internal::FunctionLiteral::requires_instance_members_initializer ( ) const
inline

Definition at line 2416 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ return_position()

int v8::internal::FunctionLiteral::return_position ( )
inline

Definition at line 2402 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scope()

DeclarationScope * v8::internal::FunctionLiteral::scope ( ) const
inline

Definition at line 2315 of file ast.h.

Here is the caller graph for this function:

◆ set_class_scope_has_private_brand()

void v8::internal::FunctionLiteral::set_class_scope_has_private_brand ( bool value)

Definition at line 272 of file ast.cc.

Here is the call graph for this function:

◆ set_function_literal_id()

void v8::internal::FunctionLiteral::set_function_literal_id ( int function_literal_id)
inline

Definition at line 2409 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_function_token_position()

void v8::internal::FunctionLiteral::set_function_token_position ( int pos)
inline

Definition at line 2317 of file ast.h.

Here is the caller graph for this function:

◆ set_has_static_private_methods_or_accessors()

void v8::internal::FunctionLiteral::set_has_static_private_methods_or_accessors ( bool value)
inline

Definition at line 2420 of file ast.h.

Here is the call graph for this function:

◆ set_pretenure()

void v8::internal::FunctionLiteral::set_pretenure ( )
inline

Definition at line 2367 of file ast.h.

Here is the call graph for this function:

◆ set_raw_inferred_name()

void v8::internal::FunctionLiteral::set_raw_inferred_name ( AstConsString * raw_inferred_name)

Definition at line 187 of file ast.cc.

Here is the call graph for this function:

◆ set_raw_name()

void v8::internal::FunctionLiteral::set_raw_name ( const AstConsString * name)
inline

Definition at line 2314 of file ast.h.

◆ set_requires_instance_members_initializer()

void v8::internal::FunctionLiteral::set_requires_instance_members_initializer ( bool value)
inline

Definition at line 2413 of file ast.h.

Here is the call graph for this function:

◆ set_shared_function_info()

void v8::internal::FunctionLiteral::set_shared_function_info ( Handle< SharedFunctionInfo > shared_function_info)

Definition at line 202 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_should_parallel_compile()

void v8::internal::FunctionLiteral::set_should_parallel_compile ( )
inline

Definition at line 2378 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_suspend_count()

void v8::internal::FunctionLiteral::set_suspend_count ( int suspend_count)
inline

Definition at line 2400 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetShouldEagerCompile()

void v8::internal::FunctionLiteral::SetShouldEagerCompile ( )

Definition at line 213 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shared_function_info()

Handle< SharedFunctionInfo > v8::internal::FunctionLiteral::shared_function_info ( ) const
inline

Definition at line 2356 of file ast.h.

Here is the caller graph for this function:

◆ should_parallel_compile()

bool v8::internal::FunctionLiteral::should_parallel_compile ( ) const
inline

Definition at line 2375 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldEagerCompile()

bool v8::internal::FunctionLiteral::ShouldEagerCompile ( ) const

Definition at line 209 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_position()

int v8::internal::FunctionLiteral::start_position ( ) const

Definition at line 221 of file ast.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ suspend_count()

int v8::internal::FunctionLiteral::suspend_count ( )
inline

Definition at line 2399 of file ast.h.

Here is the caller graph for this function:

◆ syntax_kind()

FunctionSyntaxKind v8::internal::FunctionLiteral::syntax_kind ( ) const
inline

Definition at line 2390 of file ast.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ AstNodeFactory

friend class AstNodeFactory
friend

Definition at line 2438 of file ast.h.

Member Data Documentation

◆ body_

ZonePtrList<Statement> v8::internal::FunctionLiteral::body_
private

Definition at line 2494 of file ast.h.

◆ expected_property_count_

int v8::internal::FunctionLiteral::expected_property_count_
private

Definition at line 2485 of file ast.h.

◆ function_length_

int v8::internal::FunctionLiteral::function_length_
private

Definition at line 2487 of file ast.h.

◆ function_literal_id_

int v8::internal::FunctionLiteral::function_literal_id_
private

Definition at line 2490 of file ast.h.

◆ function_token_position_

int v8::internal::FunctionLiteral::function_token_position_
private

Definition at line 2488 of file ast.h.

◆ parameter_count_

int v8::internal::FunctionLiteral::parameter_count_
private

Definition at line 2486 of file ast.h.

◆ produced_preparse_data_

ProducedPreparseData* v8::internal::FunctionLiteral::produced_preparse_data_
private

Definition at line 2497 of file ast.h.

◆ raw_inferred_name_

AstConsString* v8::internal::FunctionLiteral::raw_inferred_name_
private

Definition at line 2495 of file ast.h.

◆ raw_name_

const AstConsString* v8::internal::FunctionLiteral::raw_name_
private

Definition at line 2492 of file ast.h.

◆ scope_

DeclarationScope* v8::internal::FunctionLiteral::scope_
private

Definition at line 2493 of file ast.h.

◆ shared_function_info_

IndirectHandle<SharedFunctionInfo> v8::internal::FunctionLiteral::shared_function_info_
private

Definition at line 2496 of file ast.h.

◆ suspend_count_

int v8::internal::FunctionLiteral::suspend_count_
private

Definition at line 2489 of file ast.h.

◆ Zone

friend v8::internal::FunctionLiteral::Zone
private

Definition at line 2439 of file ast.h.


The documentation for this class was generated from the following files: