V8 Project
|
#include <variables.h>
Public Types | |
enum | Kind { NORMAL , THIS , ARGUMENTS } |
enum | Location { UNALLOCATED , PARAMETER , LOCAL , CONTEXT , LOOKUP } |
Static Public Member Functions | |
static const char * | Mode2String (VariableMode mode) |
static int | CompareIndex (Variable *const *v, Variable *const *w) |
Definition at line 20 of file variables.h.
v8::internal::Variable::Variable | ( | Scope * | scope, |
const AstRawString * | name, | ||
VariableMode | mode, | ||
bool | is_valid_ref, | ||
Kind | kind, | ||
InitializationFlag | initialization_flag, | ||
MaybeAssignedFlag | maybe_assigned_flag = kNotAssigned , |
||
Interface * | interface = Interface::NewValue() |
||
) |
Definition at line 35 of file variables.cc.
References DCHECK, initialization_flag(), v8::internal::kNeedsInitialization, mode(), and v8::internal::VAR.
Definition at line 131 of file variables.h.
References index(), index_, location(), and location_.
Referenced by v8::internal::Scope::AllocateHeapSlot(), v8::internal::Scope::AllocateParameterLocals(), v8::internal::Scope::AllocateStackSlot(), v8::internal::Parser::Declare(), v8::internal::Scope::Initialize(), v8::internal::Scope::LookupFunctionVar(), v8::internal::Scope::LookupLocal(), and v8::internal::Scope::NonLocal().
|
inline |
Definition at line 103 of file variables.h.
References initialization_flag_, and v8::internal::kNeedsInitialization.
Definition at line 67 of file variables.cc.
References v8::base::internal::y.
Referenced by v8::internal::ScopeInfo::Create(), and v8::internal::FunctionInfoListener::SerializeFunctionScope().
|
inline |
Definition at line 77 of file variables.h.
References DCHECK, force_context_allocation_, mode_, and v8::internal::TEMPORARY.
Referenced by v8::internal::Scope::AllocateParameterLocals(), and v8::internal::Scope::LookupRecursive().
|
inline |
Definition at line 74 of file variables.h.
References force_context_allocation_.
Referenced by v8::internal::Scope::MustAllocate(), and v8::internal::Scope::MustAllocateInContext().
|
inline |
Definition at line 125 of file variables.h.
References index_.
Referenced by v8::internal::FullCodeGenerator::AllocateModules(), AllocateTo(), v8::internal::compiler::AstGraphBuilder::Environment::Bind(), v8::internal::compiler::AstGraphBuilder::BuildLocalFunctionContext(), v8::internal::compiler::AstGraphBuilder::BuildVariableAssignment(), v8::internal::compiler::AstGraphBuilder::BuildVariableLoad(), v8::internal::ModuleInfo::Create(), v8::internal::LCodeGen::GeneratePrologue(), v8::internal::HOptimizedGraphBuilder::HandleCompoundAssignment(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::IndexFor(), v8::internal::compiler::AstGraphBuilder::Environment::Lookup(), and v8::internal::AstTyper::variable_index().
|
inline |
Definition at line 126 of file variables.h.
References initialization_flag_.
Referenced by v8::internal::ScopeInfo::Create(), and Variable().
|
inline |
|
inline |
Definition at line 129 of file variables.h.
References interface_.
Referenced by v8::internal::Parser::Declare(), v8::internal::Scope::ResolveVariable(), and v8::internal::Rewriter::Rewrite().
|
inline |
Definition at line 108 of file variables.h.
References ARGUMENTS, and kind_.
Referenced by v8::internal::HOptimizedGraphBuilder::IsEligibleForEnvironmentLivenessAnalysis().
|
inline |
Definition at line 102 of file variables.h.
References v8::internal::IsImmutableVariableMode(), and mode_.
Referenced by v8::internal::Scope::ResolveVariable().
|
inline |
Definition at line 101 of file variables.h.
References v8::internal::IsDynamicVariableMode(), and mode_.
Referenced by v8::internal::Scope::ResolveVariable().
Definition at line 111 of file variables.h.
References v8::internal::Isolate::factory(), and IsVariable().
|
inline |
Definition at line 107 of file variables.h.
Referenced by v8::internal::compiler::AstGraphBuilder::BuildVariableDelete(), v8::internal::HOptimizedGraphBuilder::IsEligibleForEnvironmentLivenessAnalysis(), IsVariable(), v8::internal::HOptimizedGraphBuilder::LookupGlobalProperty(), v8::internal::Scope::MustAllocate(), v8::internal::compiler::AstGraphBuilder::VisitDelete(), and v8::internal::HOptimizedGraphBuilder::VisitDelete().
|
inline |
Definition at line 81 of file variables.h.
References is_used_.
Referenced by v8::internal::Scope::CollectStackAndContextLocals(), v8::internal::ScopeInfo::Create(), and v8::internal::Scope::MustAllocate().
|
inline |
Definition at line 97 of file variables.h.
References CONTEXT, and location_.
Referenced by v8::internal::Scope::AllocateParameterLocals(), v8::internal::compiler::AstGraphBuilder::BuildArgumentsObject(), v8::internal::HOptimizedGraphBuilder::BuildContextChainWalk(), v8::internal::compiler::AstGraphBuilder::BuildLocalFunctionContext(), v8::internal::Scope::CollectStackAndContextLocals(), v8::internal::ScopeInfo::Create(), v8::internal::LCodeGen::GeneratePrologue(), and v8::internal::HOptimizedGraphBuilder::VisitDelete().
bool v8::internal::Variable::IsGlobalObjectProperty | ( | ) | const |
Definition at line 58 of file variables.cc.
References v8::internal::Scope::is_global_scope(), v8::internal::IsDeclaredVariableMode(), v8::internal::IsDynamicVariableMode(), v8::internal::IsLexicalVariableMode(), mode_, NULL, and scope_.
Referenced by v8::internal::Scope::MustAllocate(), and v8::internal::Scope::ResolveVariable().
|
inline |
|
inline |
Definition at line 94 of file variables.h.
References location_, and PARAMETER.
Referenced by v8::internal::Scope::AllocateParameterLocals(), v8::internal::compiler::AstGraphBuilder::Environment::Bind(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::IndexFor(), IsStackAllocated(), v8::internal::compiler::AstGraphBuilder::Environment::Lookup(), and v8::internal::AstTyper::variable_index().
|
inline |
Definition at line 96 of file variables.h.
References IsParameter(), and IsStackLocal().
Referenced by v8::internal::compiler::AstGraphBuilder::Environment::Bind(), v8::internal::compiler::AstGraphBuilder::BuildArgumentsObject(), v8::internal::FINAL< kOperandKind, kNumCachedOperands >::IndexFor(), v8::internal::compiler::AstGraphBuilder::Environment::Lookup(), v8::internal::HOptimizedGraphBuilder::SetUpScope(), and v8::internal::HOptimizedGraphBuilder::VisitDelete().
|
inline |
Definition at line 95 of file variables.h.
References LOCAL, and location_.
Referenced by v8::internal::Scope::AllocateNonParameterLocal(), v8::internal::compiler::AstGraphBuilder::Environment::Bind(), v8::internal::Scope::CollectStackAndContextLocals(), v8::internal::ScopeInfo::Create(), IsStackAllocated(), v8::internal::compiler::AstGraphBuilder::Environment::Lookup(), and v8::internal::AstTyper::variable_index().
|
inline |
Definition at line 93 of file variables.h.
References location_, and UNALLOCATED.
Referenced by v8::internal::Scope::AllocateNonParameterLocal(), v8::internal::Scope::AllocateParameterLocals(), and v8::internal::HOptimizedGraphBuilder::VisitDelete().
|
inline |
Definition at line 89 of file variables.h.
References is_this(), and name().
Referenced by v8::internal::Scope::AllocateNonParameterLocal(), and is_possibly_eval().
|
inline |
Definition at line 115 of file variables.h.
References DCHECK, v8::internal::DYNAMIC_LOCAL, local_if_not_shadowed_, mode_, and NULL.
|
inline |
Definition at line 124 of file variables.h.
References location_.
Referenced by AllocateTo(), v8::internal::compiler::AstGraphBuilder::BuildVariableAssignment(), v8::internal::compiler::AstGraphBuilder::BuildVariableDelete(), v8::internal::compiler::AstGraphBuilder::BuildVariableLoad(), v8::internal::HOptimizedGraphBuilder::HandleCompoundAssignment(), and v8::internal::Expression::IsUndefinedLiteral().
|
inline |
Definition at line 83 of file variables.h.
References maybe_assigned_.
Referenced by v8::internal::compiler::AstGraphBuilder::BuildVariableLoad(), and v8::internal::ScopeInfo::Create().
|
inline |
Definition at line 73 of file variables.h.
References mode_.
Referenced by v8::internal::compiler::AstGraphBuilder::BuildVariableAssignment(), v8::internal::compiler::AstGraphBuilder::BuildVariableLoad(), v8::internal::Scope::CheckConflictingVarDeclarations(), v8::internal::ModuleInfo::Create(), v8::internal::ScopeInfo::Create(), v8::internal::Parser::Declare(), v8::internal::HOptimizedGraphBuilder::HandleCompoundAssignment(), Mode2String(), v8::internal::Scope::MustAllocateInContext(), v8::internal::Parser::ParseExportDeclaration(), and Variable().
|
static |
Definition at line 17 of file variables.cc.
References v8::internal::CONST, v8::internal::CONST_LEGACY, v8::internal::DYNAMIC, v8::internal::DYNAMIC_GLOBAL, v8::internal::DYNAMIC_LOCAL, v8::internal::INTERNAL, v8::internal::LET, mode(), v8::internal::MODULE, NULL, v8::internal::TEMPORARY, UNREACHABLE, and v8::internal::VAR.
Definition at line 71 of file variables.h.
References name_, and v8::internal::AstString::string().
Referenced by v8::internal::compiler::AstGraphBuilder::BuildThrowReferenceError(), v8::internal::compiler::AstGraphBuilder::BuildVariableAssignment(), v8::internal::compiler::AstGraphBuilder::BuildVariableDelete(), v8::internal::compiler::AstGraphBuilder::BuildVariableLoad(), v8::internal::ScopeInfo::Create(), v8::internal::HOptimizedGraphBuilder::HandleGlobalVariableAssignment(), IsVariable(), v8::internal::Scope::ResolveVariable(), and v8::internal::Rewriter::Rewrite().
|
inline |
Definition at line 72 of file variables.h.
References name_.
Referenced by v8::internal::Parser::Declare(), v8::internal::Scope::MustAllocate(), v8::internal::Scope::ResolveVariable(), and v8::internal::Rewriter::Rewrite().
|
inline |
Definition at line 69 of file variables.h.
References scope_.
Referenced by v8::internal::Scope::AllocateNonParameterLocal(), v8::internal::Scope::AllocateParameterLocals(), v8::internal::HOptimizedGraphBuilder::BuildContextChainWalk(), v8::internal::compiler::AstGraphBuilder::BuildLocalFunctionContext(), v8::internal::compiler::AstGraphBuilder::BuildVariableAssignment(), and v8::internal::compiler::AstGraphBuilder::BuildVariableLoad().
|
inline |
|
inline |
Definition at line 82 of file variables.h.
References is_used_.
Referenced by v8::internal::Scope::MustAllocate().
|
inline |
Definition at line 120 of file variables.h.
References local_if_not_shadowed_.
Referenced by v8::internal::Scope::ResolveVariable().
|
inline |
Definition at line 84 of file variables.h.
References v8::internal::kMaybeAssigned, and maybe_assigned_.
Referenced by v8::internal::Parser::Declare(), v8::internal::Scope::LookupRecursive(), v8::internal::Scope::MustAllocate(), v8::internal::Parser::ParseExportDeclaration(), v8::internal::Parser::ParseFunctionLiteral(), and v8::internal::Scope::ResolveVariable().
|
private |
Definition at line 157 of file variables.h.
Referenced by ForceContextAllocation(), and has_forced_context_allocation().
|
private |
Definition at line 144 of file variables.h.
Referenced by AllocateTo(), and index().
|
private |
Definition at line 159 of file variables.h.
Referenced by binding_needs_init(), and initialization_flag().
|
private |
Definition at line 145 of file variables.h.
Referenced by initializer_position(), and set_initializer_position().
|
private |
Definition at line 163 of file variables.h.
Referenced by interface().
|
private |
Definition at line 158 of file variables.h.
Referenced by is_used(), and set_is_used().
|
private |
Definition at line 154 of file variables.h.
Referenced by IsValidReference().
|
private |
Definition at line 142 of file variables.h.
Referenced by is_arguments(), and is_this().
|
private |
Definition at line 151 of file variables.h.
Referenced by local_if_not_shadowed(), and set_local_if_not_shadowed().
|
private |
Definition at line 143 of file variables.h.
Referenced by AllocateTo(), IsContextSlot(), IsLookupSlot(), IsParameter(), IsStackLocal(), IsUnallocated(), and location().
|
private |
Definition at line 160 of file variables.h.
Referenced by maybe_assigned(), and set_maybe_assigned().
|
private |
Definition at line 141 of file variables.h.
Referenced by ForceContextAllocation(), is_const_mode(), is_dynamic(), IsGlobalObjectProperty(), local_if_not_shadowed(), and mode().
|
private |
Definition at line 140 of file variables.h.
Referenced by name(), and raw_name().
|
private |
Definition at line 139 of file variables.h.
Referenced by IsGlobalObjectProperty(), and scope().