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

#include <scopes.h>

Inheritance diagram for v8::internal::Scope:
Collaboration diagram for v8::internal::Scope:

Classes

class  Snapshot
 

Public Types

enum class  DeserializationMode { kIncludingVariables , kScopesOnly }
 
enum  Iteration { kContinue , kDescend }
 

Public Member Functions

 Scope (Zone *zone, Scope *outer_scope, ScopeType scope_type)
 
int UniqueIdInScript () const
 
DeclarationScope * AsDeclarationScope ()
 
const DeclarationScope * AsDeclarationScope () const
 
ModuleScope * AsModuleScope ()
 
const ModuleScope * AsModuleScope () const
 
ClassScope * AsClassScope ()
 
const ClassScope * AsClassScope () const
 
bool is_reparsed () const
 
void RewriteReplGlobalVariables ()
 
Scope * FinalizeBlockScope ()
 
Zone * zone () const
 
void SetMustUsePreparseData ()
 
bool must_use_preparsed_scope_data () const
 
Variable * LookupLocal (const AstRawString *name)
 
Variable * LookupInScopeInfo (const AstRawString *name, Scope *cache)
 
Variable * DeclareLocal (const AstRawString *name, VariableMode mode, VariableKind kind, bool *was_added, InitializationFlag init_flag=kCreatedInitialized)
 
Variable * DeclareVariable (Declaration *declaration, const AstRawString *name, int pos, VariableMode mode, VariableKind kind, InitializationFlag init, bool *was_added, bool *sloppy_mode_block_scope_function_redefinition, bool *ok)
 
Variable * DeclareVariableName (const AstRawString *name, VariableMode mode, bool *was_added, VariableKind kind=NORMAL_VARIABLE)
 
Variable * DeclareCatchVariableName (const AstRawString *name)
 
Variable * DeclareHomeObjectVariable (AstValueFactory *ast_value_factory)
 
Variable * DeclareStaticHomeObjectVariable (AstValueFactory *ast_value_factory)
 
base::ThreadedList< Declaration > * declarations ()
 
base::ThreadedList< Variable > * locals ()
 
VariableProxy * NewUnresolved (AstNodeFactory *factory, const AstRawString *name, int start_pos, VariableKind kind=NORMAL_VARIABLE)
 
void AddUnresolved (VariableProxy *proxy)
 
void DeleteUnresolved (VariableProxy *var)
 
Variable * NewTemporary (const AstRawString *name)
 
const AstRawString * FindVariableDeclaredIn (Scope *scope, VariableMode mode_limit)
 
void RecordEvalCall ()
 
void RecordInnerScopeEvalCall ()
 
void SetLanguageMode (LanguageMode language_mode)
 
void SetNonlinear ()
 
int start_position () const
 
void set_start_position (int statement_pos)
 
int end_position () const
 
void set_end_position (int statement_pos)
 
bool is_hidden () const
 
void set_is_hidden ()
 
void ForceContextAllocationForParameters ()
 
bool has_forced_context_allocation_for_parameters () const
 
bool is_eval_scope () const
 
bool is_function_scope () const
 
bool is_module_scope () const
 
bool is_script_scope () const
 
bool is_catch_scope () const
 
bool is_block_scope () const
 
bool is_with_scope () const
 
bool is_declaration_scope () const
 
bool is_class_scope () const
 
bool is_home_object_scope () const
 
bool is_block_scope_for_object_literal () const
 
void set_is_block_scope_for_object_literal ()
 
bool inner_scope_calls_eval () const
 
bool private_name_lookup_skips_outer_class () const
 
bool has_using_declaration () const
 
bool has_await_using_declaration () const
 
bool is_wrapped_function () const
 
void set_is_wrapped_function ()
 
bool is_nonlinear () const
 
bool ForceContextForLanguageMode () const
 
bool NeedsContext () const
 
template<typename FunctionType >
V8_INLINE void ForEach (FunctionType callback)
 
bool IsConstructorScope () const
 
bool IsOuterScopeOf (Scope *other) const
 
ScopeType scope_type () const
 
LanguageMode language_mode () const
 
Scope * inner_scope () const
 
Scope * sibling () const
 
Scope * outer_scope () const
 
Variable * catch_variable () const
 
bool ShouldBanArguments ()
 
int num_stack_slots () const
 
int num_heap_slots () const
 
bool HasContextExtensionSlot () const
 
int ContextHeaderLength () const
 
int ContextLocalCount () const
 
bool AllowsLazyParsingWithoutUnresolvedVariables (const Scope *outer) const
 
int ContextChainLength (Scope *scope) const
 
int ContextChainLengthUntilOutermostSloppyEval () const
 
DeclarationScope * GetDeclarationScope ()
 
DeclarationScope * GetNonEvalDeclarationScope ()
 
DeclarationScope * GetClosureScope ()
 
const DeclarationScope * GetClosureScope () const
 
DeclarationScope * GetReceiverScope ()
 
DeclarationScope * GetConstructorScope ()
 
Scope * GetHomeObjectScope ()
 
DeclarationScope * GetScriptScope ()
 
Scope * GetOuterScopeWithContext ()
 
bool HasReceiverToDeserialize () const
 
bool HasThisReference () const
 
Handle< ScopeInfo > scope_info () const
 
int num_var () const
 
bool HasSimpleParameters ()
 
void set_is_debug_evaluate_scope ()
 
bool is_debug_evaluate_scope () const
 
bool IsSkippableFunctionScope ()
 
bool is_repl_mode_scope () const
 
bool needs_home_object () const
 
void set_needs_home_object ()
 
bool RemoveInnerScope (Scope *inner_scope)
 
Variable * LookupInScopeOrScopeInfo (const AstRawString *name, Scope *cache)
 
Variable * LookupForTesting (const AstRawString *name)
 
void ForceDynamicLookup (VariableProxy *proxy)
 
template<typename FunctionType >
void ForEach (FunctionType callback)
 
template<typename IsolateT >
void AllocateScopeInfosRecursively (IsolateT *isolate, MaybeHandle< ScopeInfo > outer_scope, std::unordered_map< int, Handle< ScopeInfo > > &scope_infos_to_reuse)
 

Static Public Member Functions

template<typename IsolateT >
static Scope * DeserializeScopeChain (IsolateT *isolate, Zone *zone, Tagged< ScopeInfo > scope_info, DeclarationScope *script_scope, AstValueFactory *ast_value_factory, DeserializationMode deserialization_mode, ParseInfo *info=nullptr)
 
template<typename IsolateT >
static void SetScriptScopeInfo (IsolateT *isolate, DeclarationScope *script_scope)
 

Protected Member Functions

 Scope (Zone *zone, ScopeType scope_type)
 
void set_language_mode (LanguageMode language_mode)
 

Private Types

enum  ScopeLookupMode { kParsedScope , kDeserializedScope }
 

Private Member Functions

Variable * Declare (Zone *zone, const AstRawString *name, VariableMode mode, VariableKind kind, InitializationFlag initialization_flag, MaybeAssignedFlag maybe_assigned_flag, bool *was_added)
 
bool NeedsScopeInfo () const
 
Variable * NewTemporary (const AstRawString *name, MaybeAssignedFlag maybe_assigned)
 
void SavePreparseData (Parser *parser)
 
Variable * NonLocal (const AstRawString *name, VariableMode mode)
 
void ResolveTo (VariableProxy *proxy, Variable *var)
 
void ResolveVariable (VariableProxy *proxy)
 
V8_WARN_UNUSED_RESULT bool ResolveVariablesRecursively (Scope *end)
 
void AnalyzePartially (DeclarationScope *max_outer_scope, AstNodeFactory *ast_node_factory, UnresolvedList *new_unresolved_list, bool maybe_in_arrowhead)
 
bool MustAllocate (Variable *var)
 
bool MustAllocateInContext (Variable *var)
 
void AllocateStackSlot (Variable *var)
 
V8_INLINE void AllocateHeapSlot (Variable *var)
 
void AllocateNonParameterLocal (Variable *var)
 
void AllocateDeclaredGlobal (Variable *var)
 
V8_INLINE void AllocateNonParameterLocalsAndDeclaredGlobals ()
 
void AllocateVariablesRecursively ()
 
template<typename IsolateT >
void AllocateScopeInfosRecursively (IsolateT *isolate, MaybeHandle< ScopeInfo > outer_scope, std::unordered_map< int, IndirectHandle< ScopeInfo > > &scope_infos_to_reuse)
 
 Scope (Zone *zone, ScopeType type, AstValueFactory *ast_value_factory, Handle< ScopeInfo > scope_info)
 
 Scope (Zone *zone, const AstRawString *catch_variable_name, MaybeAssignedFlag maybe_assigned, Handle< ScopeInfo > scope_info)
 
void AddInnerScope (Scope *inner_scope)
 
void SetDefaults ()
 

Static Private Member Functions

template<ScopeLookupMode mode>
static Variable * Lookup (VariableProxy *proxy, Scope *scope, Scope *outer_scope_end, Scope *cache_scope=nullptr, bool force_context_allocation=false)
 
static Variable * LookupWith (VariableProxy *proxy, Scope *scope, Scope *outer_scope_end, Scope *cache_scope, bool force_context_allocation)
 
static Variable * LookupSloppyEval (VariableProxy *proxy, Scope *scope, Scope *outer_scope_end, Scope *cache_scope, bool force_context_allocation)
 
static void ResolvePreparsedVariable (VariableProxy *proxy, Scope *scope, Scope *end)
 

Private Attributes

friend Zone
 
Scope * outer_scope_
 
Scope * inner_scope_
 
Scope * sibling_
 
VariableMap variables_
 
base::ThreadedList< Variable > locals_
 
UnresolvedList unresolved_list_
 
base::ThreadedList< Declaration > decls_
 
IndirectHandle< ScopeInfo > scope_info_
 
int start_position_
 
int end_position_
 
int num_stack_slots_
 
int num_heap_slots_
 
const ScopeType scope_type_
 
bool is_strict_: 1
 
bool calls_eval_: 1
 
bool sloppy_eval_can_extend_vars_: 1
 
bool scope_nonlinear_: 1
 
bool is_hidden_: 1
 
bool is_debug_evaluate_scope_: 1
 
bool inner_scope_calls_eval_: 1
 
bool force_context_allocation_for_parameters_: 1
 
bool is_declaration_scope_: 1
 
bool private_name_lookup_skips_outer_class_: 1
 
bool must_use_preparsed_scope_data_: 1
 
bool needs_home_object_: 1
 
bool is_block_scope_for_object_literal_: 1
 
bool has_using_declaration_: 1
 
bool has_await_using_declaration_: 1
 
bool is_wrapped_function_: 1
 

Friends

class DeclarationScope
 
class ClassScope
 
class ScopeTestHelper
 

Detailed Description

Definition at line 90 of file scopes.h.

Member Enumeration Documentation

◆ DeserializationMode

Enumerator
kIncludingVariables 
kScopesOnly 

Definition at line 158 of file scopes.h.

◆ Iteration

Enumerator
kContinue 
kDescend 

Definition at line 457 of file scopes.h.

◆ ScopeLookupMode

Enumerator
kParsedScope 
kDeserializedScope 

Definition at line 692 of file scopes.h.

Constructor & Destructor Documentation

◆ Scope() [1/4]

v8::internal::Scope::Scope ( Zone * zone,
Scope * outer_scope,
ScopeType scope_type )

Definition at line 103 of file scopes.cc.

Here is the call graph for this function:

◆ Scope() [2/4]

v8::internal::Scope::Scope ( Zone * zone,
ScopeType scope_type )
protected

Definition at line 97 of file scopes.cc.

Here is the call graph for this function:

◆ Scope() [3/4]

v8::internal::Scope::Scope ( Zone * zone,
ScopeType type,
AstValueFactory * ast_value_factory,
Handle< ScopeInfo > scope_info )
private

Definition at line 235 of file scopes.cc.

Here is the call graph for this function:

◆ Scope() [4/4]

v8::internal::Scope::Scope ( Zone * zone,
const AstRawString * catch_variable_name,
MaybeAssignedFlag maybe_assigned,
Handle< ScopeInfo > scope_info )
private

Definition at line 286 of file scopes.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AddInnerScope()

void v8::internal::Scope::AddInnerScope ( Scope * inner_scope)
inlineprivate

Definition at line 750 of file scopes.h.

Here is the caller graph for this function:

◆ AddUnresolved()

void v8::internal::Scope::AddUnresolved ( VariableProxy * proxy)

Definition at line 1225 of file scopes.cc.

Here is the call graph for this function:

◆ AllocateDeclaredGlobal()

void v8::internal::Scope::AllocateDeclaredGlobal ( Variable * var)
private

◆ AllocateHeapSlot()

void v8::internal::Scope::AllocateHeapSlot ( Variable * var)
private

Definition at line 2438 of file scopes.cc.

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

◆ AllocateNonParameterLocal()

void v8::internal::Scope::AllocateNonParameterLocal ( Variable * var)
private

Definition at line 2501 of file scopes.cc.

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

◆ AllocateNonParameterLocalsAndDeclaredGlobals()

void v8::internal::Scope::AllocateNonParameterLocalsAndDeclaredGlobals ( )
private

Definition at line 2514 of file scopes.cc.

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

◆ AllocateScopeInfosRecursively() [1/2]

template<typename IsolateT >
void v8::internal::Scope::AllocateScopeInfosRecursively ( IsolateT * isolate,
MaybeHandle< ScopeInfo > outer_scope,
std::unordered_map< int, Handle< ScopeInfo > > & scope_infos_to_reuse )

Definition at line 2650 of file scopes.cc.

Here is the call graph for this function:

◆ AllocateScopeInfosRecursively() [2/2]

template<typename IsolateT >
void v8::internal::Scope::AllocateScopeInfosRecursively ( IsolateT * isolate,
MaybeHandle< ScopeInfo > outer_scope,
std::unordered_map< int, IndirectHandle< ScopeInfo > > & scope_infos_to_reuse )
private
Here is the caller graph for this function:

◆ AllocateStackSlot()

void v8::internal::Scope::AllocateStackSlot ( Variable * var)
private

Definition at line 2429 of file scopes.cc.

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

◆ AllocateVariablesRecursively()

void v8::internal::Scope::AllocateVariablesRecursively ( )
private

Definition at line 2599 of file scopes.cc.

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

◆ AllowsLazyParsingWithoutUnresolvedVariables()

bool v8::internal::Scope::AllowsLazyParsingWithoutUnresolvedVariables ( const Scope * outer) const

Definition at line 1400 of file scopes.cc.

Here is the call graph for this function:

◆ AnalyzePartially()

void v8::internal::Scope::AnalyzePartially ( DeclarationScope * max_outer_scope,
AstNodeFactory * ast_node_factory,
UnresolvedList * new_unresolved_list,
bool maybe_in_arrowhead )
private

Definition at line 1600 of file scopes.cc.

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

◆ AsClassScope() [1/2]

ClassScope * v8::internal::Scope::AsClassScope ( )

Definition at line 566 of file scopes.cc.

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

◆ AsClassScope() [2/2]

const ClassScope * v8::internal::Scope::AsClassScope ( ) const

Definition at line 571 of file scopes.cc.

Here is the call graph for this function:

◆ AsDeclarationScope() [1/2]

DeclarationScope * v8::internal::Scope::AsDeclarationScope ( )
Here is the caller graph for this function:

◆ AsDeclarationScope() [2/2]

const DeclarationScope * v8::internal::Scope::AsDeclarationScope ( ) const

Definition at line 551 of file scopes.cc.

Here is the call graph for this function:

◆ AsModuleScope() [1/2]

ModuleScope * v8::internal::Scope::AsModuleScope ( )

Definition at line 556 of file scopes.cc.

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

◆ AsModuleScope() [2/2]

const ModuleScope * v8::internal::Scope::AsModuleScope ( ) const

Definition at line 561 of file scopes.cc.

Here is the call graph for this function:

◆ catch_variable()

Variable * v8::internal::Scope::catch_variable ( ) const
inline

Definition at line 490 of file scopes.h.

Here is the caller graph for this function:

◆ ContextChainLength()

int v8::internal::Scope::ContextChainLength ( Scope * scope) const

Definition at line 1431 of file scopes.cc.

Here is the caller graph for this function:

◆ ContextChainLengthUntilOutermostSloppyEval()

int v8::internal::Scope::ContextChainLengthUntilOutermostSloppyEval ( ) const

Definition at line 1440 of file scopes.cc.

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

◆ ContextHeaderLength()

int v8::internal::Scope::ContextHeaderLength ( ) const
inline

Definition at line 522 of file scopes.h.

Here is the caller graph for this function:

◆ ContextLocalCount()

int v8::internal::Scope::ContextLocalCount ( ) const

Definition at line 2935 of file scopes.cc.

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

◆ declarations()

base::ThreadedList< Declaration > * v8::internal::Scope::declarations ( )
inline

Definition at line 229 of file scopes.h.

Here is the caller graph for this function:

◆ Declare()

Variable * v8::internal::Scope::Declare ( Zone * zone,
const AstRawString * name,
VariableMode mode,
VariableKind kind,
InitializationFlag initialization_flag,
MaybeAssignedFlag maybe_assigned_flag,
bool * was_added )
inlineprivate

Definition at line 662 of file scopes.h.

Here is the caller graph for this function:

◆ DeclareCatchVariableName()

Variable * v8::internal::Scope::DeclareCatchVariableName ( const AstRawString * name)

Definition at line 1213 of file scopes.cc.

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

◆ DeclareHomeObjectVariable()

Variable * v8::internal::Scope::DeclareHomeObjectVariable ( AstValueFactory * ast_value_factory)

Definition at line 114 of file scopes.cc.

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

◆ DeclareLocal()

Variable * v8::internal::Scope::DeclareLocal ( const AstRawString * name,
VariableMode mode,
VariableKind kind,
bool * was_added,
InitializationFlag init_flag = kCreatedInitialized )

Definition at line 1055 of file scopes.cc.

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

◆ DeclareStaticHomeObjectVariable()

Variable * v8::internal::Scope::DeclareStaticHomeObjectVariable ( AstValueFactory * ast_value_factory)

Definition at line 126 of file scopes.cc.

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

◆ DeclareVariable()

Variable * v8::internal::Scope::DeclareVariable ( Declaration * declaration,
const AstRawString * name,
int pos,
VariableMode mode,
VariableKind kind,
InitializationFlag init,
bool * was_added,
bool * sloppy_mode_block_scope_function_redefinition,
bool * ok )

Definition at line 1091 of file scopes.cc.

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

◆ DeclareVariableName()

Variable * v8::internal::Scope::DeclareVariableName ( const AstRawString * name,
VariableMode mode,
bool * was_added,
VariableKind kind = NORMAL_VARIABLE )

Definition at line 1177 of file scopes.cc.

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

◆ DeleteUnresolved()

void v8::internal::Scope::DeleteUnresolved ( VariableProxy * var)

Definition at line 1245 of file scopes.cc.

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

◆ DeserializeScopeChain()

template<typename IsolateT >
Scope * v8::internal::Scope::DeserializeScopeChain ( IsolateT * isolate,
Zone * zone,
Tagged< ScopeInfo > scope_info,
DeclarationScope * script_scope,
AstValueFactory * ast_value_factory,
DeserializationMode deserialization_mode,
ParseInfo * info = nullptr )
static

Definition at line 416 of file scopes.cc.

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

◆ end_position()

int v8::internal::Scope::end_position ( ) const
inline

Definition at line 342 of file scopes.h.

Here is the caller graph for this function:

◆ FinalizeBlockScope()

Scope * v8::internal::Scope::FinalizeBlockScope ( )

Definition at line 847 of file scopes.cc.

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

◆ FindVariableDeclaredIn()

const AstRawString * v8::internal::Scope::FindVariableDeclaredIn ( Scope * scope,
VariableMode mode_limit )

Definition at line 1331 of file scopes.cc.

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

◆ ForceContextAllocationForParameters()

void v8::internal::Scope::ForceContextAllocationForParameters ( )
inline

Definition at line 349 of file scopes.h.

◆ ForceContextForLanguageMode()

bool v8::internal::Scope::ForceContextForLanguageMode ( ) const
inline

Definition at line 419 of file scopes.h.

Here is the caller graph for this function:

◆ ForceDynamicLookup()

void v8::internal::Scope::ForceDynamicLookup ( VariableProxy * proxy)

Definition at line 2061 of file scopes.cc.

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

◆ ForEach() [1/2]

template<typename FunctionType >
void v8::internal::Scope::ForEach ( FunctionType callback)

Definition at line 1567 of file scopes.cc.

◆ ForEach() [2/2]

template<typename FunctionType >
V8_INLINE void v8::internal::Scope::ForEach ( FunctionType callback)
Here is the caller graph for this function:

◆ GetClosureScope() [1/2]

DeclarationScope * v8::internal::Scope::GetClosureScope ( )

Definition at line 1480 of file scopes.cc.

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

◆ GetClosureScope() [2/2]

const DeclarationScope * v8::internal::Scope::GetClosureScope ( ) const

Definition at line 1472 of file scopes.cc.

Here is the call graph for this function:

◆ GetConstructorScope()

DeclarationScope * v8::internal::Scope::GetConstructorScope ( )

Definition at line 1511 of file scopes.cc.

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

◆ GetDeclarationScope()

DeclarationScope * v8::internal::Scope::GetDeclarationScope ( )

Definition at line 1456 of file scopes.cc.

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

◆ GetHomeObjectScope()

Scope * v8::internal::Scope::GetHomeObjectScope ( )

Definition at line 1523 of file scopes.cc.

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

◆ GetNonEvalDeclarationScope()

DeclarationScope * v8::internal::Scope::GetNonEvalDeclarationScope ( )

Definition at line 1464 of file scopes.cc.

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

◆ GetOuterScopeWithContext()

Scope * v8::internal::Scope::GetOuterScopeWithContext ( )

Definition at line 1550 of file scopes.cc.

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

◆ GetReceiverScope()

DeclarationScope * v8::internal::Scope::GetReceiverScope ( )

Definition at line 1501 of file scopes.cc.

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

◆ GetScriptScope()

DeclarationScope * v8::internal::Scope::GetScriptScope ( )

Definition at line 1542 of file scopes.cc.

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

◆ has_await_using_declaration()

bool v8::internal::Scope::has_await_using_declaration ( ) const
inline

Definition at line 393 of file scopes.h.

Here is the caller graph for this function:

◆ has_forced_context_allocation_for_parameters()

bool v8::internal::Scope::has_forced_context_allocation_for_parameters ( ) const
inline

Definition at line 353 of file scopes.h.

Here is the caller graph for this function:

◆ has_using_declaration()

bool v8::internal::Scope::has_using_declaration ( ) const
inline

Definition at line 392 of file scopes.h.

◆ HasContextExtensionSlot()

bool v8::internal::Scope::HasContextExtensionSlot ( ) const
inline

Definition at line 505 of file scopes.h.

Here is the caller graph for this function:

◆ HasReceiverToDeserialize()

bool v8::internal::Scope::HasReceiverToDeserialize ( ) const

Definition at line 1381 of file scopes.cc.

Here is the caller graph for this function:

◆ HasSimpleParameters()

bool v8::internal::Scope::HasSimpleParameters ( )

Definition at line 383 of file scopes.cc.

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

◆ HasThisReference()

bool v8::internal::Scope::HasThisReference ( ) const

Definition at line 1385 of file scopes.cc.

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

◆ inner_scope()

Scope * v8::internal::Scope::inner_scope ( ) const
inline

Definition at line 484 of file scopes.h.

Here is the caller graph for this function:

◆ inner_scope_calls_eval()

bool v8::internal::Scope::inner_scope_calls_eval ( ) const
inline

Definition at line 387 of file scopes.h.

Here is the caller graph for this function:

◆ is_block_scope()

bool v8::internal::Scope::is_block_scope ( ) const
inline

Definition at line 368 of file scopes.h.

Here is the caller graph for this function:

◆ is_block_scope_for_object_literal()

bool v8::internal::Scope::is_block_scope_for_object_literal ( ) const
inline

Definition at line 378 of file scopes.h.

◆ is_catch_scope()

bool v8::internal::Scope::is_catch_scope ( ) const
inline

Definition at line 367 of file scopes.h.

Here is the caller graph for this function:

◆ is_class_scope()

bool v8::internal::Scope::is_class_scope ( ) const
inline

Definition at line 373 of file scopes.h.

Here is the caller graph for this function:

◆ is_debug_evaluate_scope()

bool v8::internal::Scope::is_debug_evaluate_scope ( ) const
inline

Definition at line 608 of file scopes.h.

Here is the caller graph for this function:

◆ is_declaration_scope()

bool v8::internal::Scope::is_declaration_scope ( ) const
inline

Definition at line 372 of file scopes.h.

Here is the caller graph for this function:

◆ is_eval_scope()

bool v8::internal::Scope::is_eval_scope ( ) const
inline

Definition at line 361 of file scopes.h.

Here is the caller graph for this function:

◆ is_function_scope()

bool v8::internal::Scope::is_function_scope ( ) const
inline

Definition at line 362 of file scopes.h.

Here is the caller graph for this function:

◆ is_hidden()

bool v8::internal::Scope::is_hidden ( ) const
inline

Definition at line 346 of file scopes.h.

Here is the caller graph for this function:

◆ is_home_object_scope()

bool v8::internal::Scope::is_home_object_scope ( ) const
inline

Definition at line 374 of file scopes.h.

Here is the caller graph for this function:

◆ is_module_scope()

bool v8::internal::Scope::is_module_scope ( ) const
inline

Definition at line 363 of file scopes.h.

Here is the caller graph for this function:

◆ is_nonlinear()

bool v8::internal::Scope::is_nonlinear ( ) const
inline

Definition at line 414 of file scopes.h.

◆ is_reparsed()

bool v8::internal::Scope::is_reparsed ( ) const
inline

Definition at line 116 of file scopes.h.

Here is the caller graph for this function:

◆ is_repl_mode_scope()

bool v8::internal::Scope::is_repl_mode_scope ( ) const
inline

Definition at line 610 of file scopes.h.

Here is the caller graph for this function:

◆ is_script_scope()

bool v8::internal::Scope::is_script_scope ( ) const
inline

Definition at line 364 of file scopes.h.

Here is the caller graph for this function:

◆ is_with_scope()

bool v8::internal::Scope::is_with_scope ( ) const
inline

Definition at line 371 of file scopes.h.

Here is the caller graph for this function:

◆ is_wrapped_function()

bool v8::internal::Scope::is_wrapped_function ( ) const
inline

Definition at line 397 of file scopes.h.

Here is the caller graph for this function:

◆ IsConstructorScope()

bool v8::internal::Scope::IsConstructorScope ( ) const

Definition at line 1586 of file scopes.cc.

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

◆ IsOuterScopeOf()

bool v8::internal::Scope::IsOuterScopeOf ( Scope * other) const

Definition at line 1591 of file scopes.cc.

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

◆ IsSkippableFunctionScope()

bool v8::internal::Scope::IsSkippableFunctionScope ( )

Definition at line 1682 of file scopes.cc.

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

◆ language_mode()

LanguageMode v8::internal::Scope::language_mode ( ) const
inline

Definition at line 477 of file scopes.h.

Here is the caller graph for this function:

◆ locals()

base::ThreadedList< Variable > * v8::internal::Scope::locals ( )
inline

Definition at line 231 of file scopes.h.

Here is the caller graph for this function:

◆ Lookup()

template<Scope::ScopeLookupMode mode>
Variable * v8::internal::Scope::Lookup ( VariableProxy * proxy,
Scope * scope,
Scope * outer_scope_end,
Scope * cache_scope = nullptr,
bool force_context_allocation = false )
staticprivate

Definition at line 2072 of file scopes.cc.

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

◆ LookupForTesting()

Variable * v8::internal::Scope::LookupForTesting ( const AstRawString * name)
inline

Definition at line 644 of file scopes.h.

Here is the call graph for this function:

◆ LookupInScopeInfo()

Variable * v8::internal::Scope::LookupInScopeInfo ( const AstRawString * name,
Scope * cache )

Definition at line 958 of file scopes.cc.

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

◆ LookupInScopeOrScopeInfo()

Variable * v8::internal::Scope::LookupInScopeOrScopeInfo ( const AstRawString * name,
Scope * cache )
inline

Definition at line 638 of file scopes.h.

Here is the caller graph for this function:

◆ LookupLocal()

Variable * v8::internal::Scope::LookupLocal ( const AstRawString * name)
inline

Definition at line 200 of file scopes.h.

Here is the caller graph for this function:

◆ LookupSloppyEval()

Variable * v8::internal::Scope::LookupSloppyEval ( VariableProxy * proxy,
Scope * scope,
Scope * outer_scope_end,
Scope * cache_scope,
bool force_context_allocation )
staticprivate

Definition at line 2206 of file scopes.cc.

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

◆ LookupWith()

Variable * v8::internal::Scope::LookupWith ( VariableProxy * proxy,
Scope * scope,
Scope * outer_scope_end,
Scope * cache_scope,
bool force_context_allocation )
staticprivate

Definition at line 2172 of file scopes.cc.

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

◆ must_use_preparsed_scope_data()

bool v8::internal::Scope::must_use_preparsed_scope_data ( ) const
inline

Definition at line 191 of file scopes.h.

◆ MustAllocate()

bool v8::internal::Scope::MustAllocate ( Variable * var)
private

Definition at line 2394 of file scopes.cc.

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

◆ MustAllocateInContext()

bool v8::internal::Scope::MustAllocateInContext ( Variable * var)
private

Definition at line 2410 of file scopes.cc.

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

◆ needs_home_object()

bool v8::internal::Scope::needs_home_object ( ) const
inline

Definition at line 612 of file scopes.h.

Here is the caller graph for this function:

◆ NeedsContext()

bool v8::internal::Scope::NeedsContext ( ) const
inline

Definition at line 430 of file scopes.h.

Here is the caller graph for this function:

◆ NeedsScopeInfo()

bool v8::internal::Scope::NeedsScopeInfo ( ) const
private

Definition at line 1488 of file scopes.cc.

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

◆ NewTemporary() [1/2]

Variable * v8::internal::Scope::NewTemporary ( const AstRawString * name)

Definition at line 1250 of file scopes.cc.

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

◆ NewTemporary() [2/2]

Variable * v8::internal::Scope::NewTemporary ( const AstRawString * name,
MaybeAssignedFlag maybe_assigned )
private

Definition at line 1254 of file scopes.cc.

Here is the call graph for this function:

◆ NewUnresolved()

VariableProxy * v8::internal::Scope::NewUnresolved ( AstNodeFactory * factory,
const AstRawString * name,
int start_pos,
VariableKind kind = NORMAL_VARIABLE )
inline

Definition at line 234 of file scopes.h.

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

◆ NonLocal()

Variable * v8::internal::Scope::NonLocal ( const AstRawString * name,
VariableMode mode )
private

Definition at line 2049 of file scopes.cc.

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

◆ num_heap_slots()

int v8::internal::Scope::num_heap_slots ( ) const
inline

Definition at line 503 of file scopes.h.

Here is the caller graph for this function:

◆ num_stack_slots()

int v8::internal::Scope::num_stack_slots ( ) const
inline

Definition at line 502 of file scopes.h.

◆ num_var()

int v8::internal::Scope::num_var ( ) const
inline

Definition at line 586 of file scopes.h.

◆ outer_scope()

Scope * v8::internal::Scope::outer_scope ( ) const
inline

Definition at line 488 of file scopes.h.

Here is the caller graph for this function:

◆ private_name_lookup_skips_outer_class()

bool v8::internal::Scope::private_name_lookup_skips_outer_class ( ) const
inline

Definition at line 388 of file scopes.h.

Here is the caller graph for this function:

◆ RecordEvalCall()

void v8::internal::Scope::RecordEvalCall ( )
inline

Definition at line 1340 of file scopes.h.

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

◆ RecordInnerScopeEvalCall()

void v8::internal::Scope::RecordInnerScopeEvalCall ( )
inline

Definition at line 278 of file scopes.h.

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

◆ RemoveInnerScope()

bool v8::internal::Scope::RemoveInnerScope ( Scope * inner_scope)
inline

Definition at line 622 of file scopes.h.

Here is the caller graph for this function:

◆ ResolvePreparsedVariable()

void v8::internal::Scope::ResolvePreparsedVariable ( VariableProxy * proxy,
Scope * scope,
Scope * end )
staticprivate

Definition at line 2351 of file scopes.cc.

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

◆ ResolveTo()

void v8::internal::Scope::ResolveTo ( VariableProxy * proxy,
Variable * var )
private

Definition at line 2345 of file scopes.cc.

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

◆ ResolveVariable()

void v8::internal::Scope::ResolveVariable ( VariableProxy * proxy)
private

Definition at line 2250 of file scopes.cc.

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

◆ ResolveVariablesRecursively()

bool v8::internal::Scope::ResolveVariablesRecursively ( Scope * end)
private

Definition at line 2367 of file scopes.cc.

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

◆ RewriteReplGlobalVariables()

void v8::internal::Scope::RewriteReplGlobalVariables ( )

Definition at line 1764 of file scopes.cc.

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

◆ SavePreparseData()

void v8::internal::Scope::SavePreparseData ( Parser * parser)
private

Definition at line 1694 of file scopes.cc.

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

◆ scope_info()

Handle< ScopeInfo > v8::internal::Scope::scope_info ( ) const
inline

Definition at line 581 of file scopes.h.

Here is the caller graph for this function:

◆ scope_type()

ScopeType v8::internal::Scope::scope_type ( ) const
inline

Definition at line 474 of file scopes.h.

Here is the caller graph for this function:

◆ set_end_position()

void v8::internal::Scope::set_end_position ( int statement_pos)
inline

Definition at line 343 of file scopes.h.

Here is the caller graph for this function:

◆ set_is_block_scope_for_object_literal()

void v8::internal::Scope::set_is_block_scope_for_object_literal ( )
inline

Definition at line 382 of file scopes.h.

Here is the caller graph for this function:

◆ set_is_debug_evaluate_scope()

void v8::internal::Scope::set_is_debug_evaluate_scope ( )
inline

Definition at line 607 of file scopes.h.

Here is the caller graph for this function:

◆ set_is_hidden()

void v8::internal::Scope::set_is_hidden ( )
inline

Definition at line 347 of file scopes.h.

Here is the caller graph for this function:

◆ set_is_wrapped_function()

void v8::internal::Scope::set_is_wrapped_function ( )
inline

Definition at line 401 of file scopes.h.

Here is the caller graph for this function:

◆ set_language_mode()

void v8::internal::Scope::set_language_mode ( LanguageMode language_mode)
inlineprotected

Definition at line 657 of file scopes.h.

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

◆ set_needs_home_object()

void v8::internal::Scope::set_needs_home_object ( )
inline

Definition at line 617 of file scopes.h.

Here is the caller graph for this function:

◆ set_start_position()

void v8::internal::Scope::set_start_position ( int statement_pos)
inline

Definition at line 339 of file scopes.h.

Here is the caller graph for this function:

◆ SetDefaults()

void v8::internal::Scope::SetDefaults ( )
private

Definition at line 341 of file scopes.cc.

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

◆ SetLanguageMode()

void v8::internal::Scope::SetLanguageMode ( LanguageMode language_mode)
inline

Definition at line 288 of file scopes.h.

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

◆ SetMustUsePreparseData()

void v8::internal::Scope::SetMustUsePreparseData ( )
inline

Definition at line 181 of file scopes.h.

Here is the caller graph for this function:

◆ SetNonlinear()

void v8::internal::Scope::SetNonlinear ( )
inline

Definition at line 302 of file scopes.h.

Here is the caller graph for this function:

◆ SetScriptScopeInfo()

template<typename IsolateT >
void v8::internal::Scope::SetScriptScopeInfo ( IsolateT * isolate,
DeclarationScope * script_scope )
static

Definition at line 515 of file scopes.cc.

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

◆ ShouldBanArguments()

bool v8::internal::Scope::ShouldBanArguments ( )

Definition at line 1497 of file scopes.cc.

Here is the call graph for this function:

◆ sibling()

Scope * v8::internal::Scope::sibling ( ) const
inline

Definition at line 485 of file scopes.h.

Here is the caller graph for this function:

◆ start_position()

int v8::internal::Scope::start_position ( ) const
inline

Definition at line 338 of file scopes.h.

Here is the caller graph for this function:

◆ UniqueIdInScript()

int v8::internal::Scope::UniqueIdInScript ( ) const

Definition at line 2578 of file scopes.cc.

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

◆ zone()

Zone * v8::internal::Scope::zone ( ) const
inline

Definition at line 179 of file scopes.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ ClassScope

friend class ClassScope
friend

Definition at line 759 of file scopes.h.

◆ DeclarationScope

friend class DeclarationScope
friend

Definition at line 758 of file scopes.h.

◆ ScopeTestHelper

friend class ScopeTestHelper
friend

Definition at line 760 of file scopes.h.

Member Data Documentation

◆ calls_eval_

bool v8::internal::Scope::calls_eval_
private

Definition at line 815 of file scopes.h.

◆ decls_

base::ThreadedList<Declaration> v8::internal::Scope::decls_
private

Definition at line 781 of file scopes.h.

◆ end_position_

int v8::internal::Scope::end_position_
private

Definition at line 800 of file scopes.h.

◆ force_context_allocation_for_parameters_

bool v8::internal::Scope::force_context_allocation_for_parameters_
private

Definition at line 828 of file scopes.h.

◆ has_await_using_declaration_

bool v8::internal::Scope::has_await_using_declaration_
private

Definition at line 845 of file scopes.h.

◆ has_using_declaration_

bool v8::internal::Scope::has_using_declaration_
private

Definition at line 844 of file scopes.h.

◆ inner_scope_

Scope* v8::internal::Scope::inner_scope_
private

Definition at line 765 of file scopes.h.

◆ inner_scope_calls_eval_

bool v8::internal::Scope::inner_scope_calls_eval_
private

Definition at line 827 of file scopes.h.

◆ is_block_scope_for_object_literal_

bool v8::internal::Scope::is_block_scope_for_object_literal_
private

Definition at line 841 of file scopes.h.

◆ is_debug_evaluate_scope_

bool v8::internal::Scope::is_debug_evaluate_scope_
private

Definition at line 824 of file scopes.h.

◆ is_declaration_scope_

bool v8::internal::Scope::is_declaration_scope_
private

Definition at line 831 of file scopes.h.

◆ is_hidden_

bool v8::internal::Scope::is_hidden_
private

Definition at line 821 of file scopes.h.

◆ is_strict_

bool v8::internal::Scope::is_strict_
private

Definition at line 813 of file scopes.h.

◆ is_wrapped_function_

bool v8::internal::Scope::is_wrapped_function_
private

Definition at line 849 of file scopes.h.

◆ locals_

base::ThreadedList<Variable> v8::internal::Scope::locals_
private

Definition at line 776 of file scopes.h.

◆ must_use_preparsed_scope_data_

bool v8::internal::Scope::must_use_preparsed_scope_data_
private

Definition at line 838 of file scopes.h.

◆ needs_home_object_

bool v8::internal::Scope::needs_home_object_
private

Definition at line 840 of file scopes.h.

◆ num_heap_slots_

int v8::internal::Scope::num_heap_slots_
private

Definition at line 804 of file scopes.h.

◆ num_stack_slots_

int v8::internal::Scope::num_stack_slots_
private

Definition at line 803 of file scopes.h.

◆ outer_scope_

Scope* v8::internal::Scope::outer_scope_
private

Definition at line 764 of file scopes.h.

◆ private_name_lookup_skips_outer_class_

bool v8::internal::Scope::private_name_lookup_skips_outer_class_
private

Definition at line 836 of file scopes.h.

◆ scope_info_

IndirectHandle<ScopeInfo> v8::internal::Scope::scope_info_
private

Definition at line 784 of file scopes.h.

◆ scope_nonlinear_

bool v8::internal::Scope::scope_nonlinear_
private

Definition at line 820 of file scopes.h.

◆ scope_type_

const ScopeType v8::internal::Scope::scope_type_
private

Definition at line 807 of file scopes.h.

◆ sibling_

Scope* v8::internal::Scope::sibling_
private

Definition at line 766 of file scopes.h.

◆ sloppy_eval_can_extend_vars_

bool v8::internal::Scope::sloppy_eval_can_extend_vars_
private

Definition at line 818 of file scopes.h.

◆ start_position_

int v8::internal::Scope::start_position_
private

Definition at line 799 of file scopes.h.

◆ unresolved_list_

UnresolvedList v8::internal::Scope::unresolved_list_
private

Definition at line 779 of file scopes.h.

◆ variables_

VariableMap v8::internal::Scope::variables_
private

Definition at line 773 of file scopes.h.

◆ Zone

friend v8::internal::Scope::Zone
private

Definition at line 761 of file scopes.h.


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