![]() |
v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <scopes.h>
Static Public Member Functions | |
static bool | Analyze (CompilationInfo *info) |
static Scope * | DeserializeScopeChain (Context *context, Scope *global_scope, Zone *zone) |
Protected Types | |
enum | BindingKind { BOUND, BOUND_EVAL_SHADOWED, UNBOUND, UNBOUND_EVAL_SHADOWED, DYNAMIC_LOOKUP } |
Protected Attributes | |
Isolate *const | isolate_ |
Scope * | outer_scope_ |
ZoneList< Scope * > | inner_scopes_ |
ScopeType | type_ |
Handle< String > | scope_name_ |
VariableMap | variables_ |
ZoneList< Variable * > | temps_ |
ZoneList< Variable * > | params_ |
DynamicScopePart * | dynamics_ |
ZoneList< VariableProxy * > | unresolved_ |
ZoneList< Declaration * > | decls_ |
Variable * | receiver_ |
VariableDeclaration * | function_ |
Variable * | arguments_ |
Interface * | interface_ |
Expression * | illegal_redecl_ |
bool | scope_inside_with_ |
bool | scope_contains_with_ |
bool | scope_calls_eval_ |
LanguageMode | language_mode_ |
int | start_position_ |
int | end_position_ |
bool | outer_scope_calls_non_strict_eval_ |
bool | inner_scope_calls_eval_ |
bool | force_eager_compilation_ |
bool | already_resolved_ |
int | num_var_or_const_ |
int | num_stack_slots_ |
int | num_heap_slots_ |
Handle< ScopeInfo > | scope_info_ |
Friends | |
class | ParserFactory |
|
protected |
Definition at line 106 of file scopes.cc.
References ASSERT, ASSERT_EQ, v8::internal::GLOBAL_SCOPE, Scope::HasIllegalRedeclaration(), and v8::internal::NULL.
Referenced by Scope::DeserializeScopeChain().
void AddDeclaration | ( | Declaration * | declaration | ) |
Definition at line 522 of file scopes.cc.
References Scope::decls_, and Scope::zone().
|
protected |
Definition at line 1155 of file scopes.cc.
References Variable::AllocateTo(), Variable::CONTEXT, and Scope::num_heap_slots_.
Referenced by Scope::AllocateNonParameterLocal(), and Scope::AllocateParameterLocals().
|
protected |
Definition at line 1216 of file scopes.cc.
References Scope::AllocateHeapSlot(), Scope::AllocateStackSlot(), ASSERT, Isolate::factory(), Scope::isolate_, Variable::IsStackLocal(), Variable::IsUnallocated(), Variable::IsVariable(), Scope::MustAllocate(), Scope::MustAllocateInContext(), and Variable::scope().
Referenced by Scope::AllocateNonParameterLocals().
|
protected |
Definition at line 1230 of file scopes.cc.
References Scope::AllocateNonParameterLocal(), Scope::function_, TemplateHashMapImpl< AllocationPolicy >::Next(), v8::internal::NULL, Declaration::proxy(), TemplateHashMapImpl< AllocationPolicy >::Start(), Scope::temps_, VariableProxy::var(), and Scope::variables_.
Referenced by Scope::AllocateVariablesRecursively().
|
protected |
Definition at line 1160 of file scopes.cc.
References Scope::AllocateHeapSlot(), Variable::AllocateTo(), Scope::arguments(), Scope::arguments_, ASSERT, Isolate::factory(), Variable::ForceContextAllocation(), Scope::HasArgumentsParameter(), Scope::is_classic_mode(), Scope::is_function_scope(), Variable::IsContextSlot(), Scope::isolate_, Variable::IsParameter(), Variable::IsUnallocated(), Scope::LocalLookup(), Scope::MustAllocate(), Scope::MustAllocateInContext(), v8::internal::NULL, Variable::PARAMETER, Scope::params_, and Variable::scope().
Referenced by Scope::AllocateVariablesRecursively().
|
protected |
Definition at line 1150 of file scopes.cc.
References Variable::AllocateTo(), Variable::LOCAL, and Scope::num_stack_slots_.
Referenced by Scope::AllocateNonParameterLocal().
|
protected |
Definition at line 619 of file scopes.cc.
References Scope::AllocateVariablesRecursively(), Scope::calls_non_strict_eval(), v8::internal::NULL, Scope::outer_scope_, Scope::outer_scope_calls_non_strict_eval(), Scope::PropagateScopeInfo(), and Scope::ResolveVariablesRecursively().
Referenced by Scope::Analyze().
|
protected |
Definition at line 1253 of file scopes.cc.
References Scope::AllocateNonParameterLocals(), Scope::AllocateParameterLocals(), Scope::already_resolved(), ASSERT, Scope::calls_eval(), Scope::inner_scopes_, Scope::is_function_scope(), Scope::is_module_scope(), Scope::is_with_scope(), Context::MIN_CONTEXT_SLOTS, Scope::num_heap_slots_, and Scope::num_stack_slots_.
Referenced by Scope::AllocateVariables().
bool AllowsLazyCompilation | ( | ) | const |
Definition at line 640 of file scopes.cc.
References Scope::force_eager_compilation_, and Scope::HasTrivialOuterContext().
Referenced by FunctionLiteral::AllowsLazyCompilation().
bool AllowsLazyRecompilation | ( | ) | const |
Definition at line 669 of file scopes.cc.
References Scope::force_eager_compilation_, and Scope::TrivialDeclarationScopesBeforeWithScope().
|
inlineprotected |
Definition at line 500 of file scopes.h.
References Scope::already_resolved_.
Referenced by Scope::AllocateVariablesRecursively(), Scope::Analyze(), Scope::DeclareLocal(), Scope::DeclareParameter(), Scope::Initialize(), Scope::NewTemporary(), and Scope::NewUnresolved().
|
static |
Definition at line 263 of file scopes.cc.
References Scope::AllocateVariables(), Scope::already_resolved(), ASSERT, Scope::function(), Scope::interface(), Scope::is_global_scope(), Factory::NewJSArray(), Factory::NewSyntaxError(), v8::internal::NULL, Scope::outer_scope(), VariableProxy::position(), v8::internal::PrintF(), and Declaration::scope().
|
inline |
Definition at line 338 of file scopes.h.
References Scope::arguments_.
Referenced by Scope::AllocateParameterLocals(), and Compiler::SetFunctionInfo().
|
inline |
Definition at line 296 of file scopes.h.
References Scope::scope_calls_eval_.
Referenced by Scope::AllocateVariablesRecursively(), ScopeInfo::Create(), and HGraphBuilder::CreateGraph().
|
inline |
Definition at line 297 of file scopes.h.
References Scope::is_classic_mode(), and Scope::scope_calls_eval_.
Referenced by Scope::AllocateVariables(), Scope::LookupRecursive(), and Scope::PropagateScopeInfo().
VariableProxy * CheckAssignmentToConst | ( | ) |
Definition at line 566 of file scopes.cc.
References ASSERT, Scope::inner_scopes_, Scope::is_extended_mode(), v8::internal::NULL, and Scope::unresolved_.
Declaration * CheckConflictingVarDeclarations | ( | ) |
Definition at line 542 of file scopes.cc.
References Scope::decls_, Scope::is_declaration_scope(), VariableMap::Lookup(), Variable::mode(), Declaration::mode(), VariableProxy::name(), v8::internal::NULL, Scope::outer_scope_, Declaration::proxy(), Declaration::scope(), v8::internal::VAR, and Scope::variables_.
void CollectStackAndContextLocals | ( | ZoneList< Variable * > * | stack_locals, |
ZoneList< Variable * > * | context_locals | ||
) |
Definition at line 589 of file scopes.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT, Variable::is_used(), Variable::IsContextSlot(), Variable::IsStackLocal(), TemplateHashMapImpl< AllocationPolicy >::Next(), v8::internal::NULL, TemplateHashMapImpl< AllocationPolicy >::Start(), Scope::temps_, Scope::variables_, and Scope::zone().
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 307 of file scopes.h.
References Scope::scope_contains_with_.
Referenced by Scope::DeserializeScopeChain().
int ContextChainLength | ( | Scope * | scope | ) |
Definition at line 689 of file scopes.cc.
References ASSERT, v8::internal::NULL, and Scope::outer_scope_.
int ContextLocalCount | ( | ) | const |
Definition at line 1295 of file scopes.cc.
References Scope::function_, Variable::IsContextSlot(), Context::MIN_CONTEXT_SLOTS, v8::internal::NULL, Scope::num_heap_slots(), Declaration::proxy(), and VariableProxy::var().
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 341 of file scopes.h.
References Scope::decls_.
Referenced by HGraphBuilder::CreateGraph().
Scope * DeclarationScope | ( | ) |
Definition at line 699 of file scopes.cc.
References Scope::is_declaration_scope(), and Scope::outer_scope().
Referenced by Scope::TrivialDeclarationScopesBeforeWithScope().
|
inline |
Definition at line 142 of file scopes.h.
References ASSERT, Scope::function_, and Scope::is_function_scope().
Referenced by Scope::LookupFunctionVar().
Definition at line 486 of file scopes.cc.
References ASSERT, VariableMap::Declare(), v8::internal::DYNAMIC_GLOBAL, Scope::is_global_scope(), v8::internal::kCreatedInitialized, Variable::NORMAL, and Scope::variables_.
Variable * DeclareLocal | ( | Handle< String > | name, |
VariableMode | mode, | ||
InitializationFlag | init_flag, | ||
Interface * | interface = Interface::NewValue() |
||
) |
Definition at line 468 of file scopes.cc.
References Scope::already_resolved(), ASSERT, v8::internal::CONST, v8::internal::CONST_HARMONY, VariableMap::Declare(), v8::internal::LET, Variable::NORMAL, Scope::num_var_or_const_, v8::internal::VAR, and Scope::variables_.
void DeclareParameter | ( | Handle< String > | name, |
VariableMode | mode | ||
) |
Definition at line 459 of file scopes.cc.
References Scope::already_resolved(), ASSERT, VariableMap::Declare(), Scope::is_function_scope(), v8::internal::kCreatedInitialized, Variable::NORMAL, Scope::params_, Scope::variables_, and Scope::zone().
Definition at line 211 of file scopes.cc.
References ASSERT, v8::internal::BLOCK_SCOPE, ScopeInfo::cast(), String::cast(), Context::closure(), Scope::contains_with(), Context::extension(), v8::internal::FUNCTION_SCOPE, Context::IsBlockContext(), Context::IsCatchContext(), Context::IsFunctionContext(), Context::IsWithContext(), v8::internal::NULL, Context::previous(), Scope::PropagateScopeInfo(), Scope::RecordWithStatement(), Scope::Scope(), Scope::scope_inside_with_, v8::internal::WITH_SCOPE, and Scope::zone().
|
inline |
Definition at line 266 of file scopes.h.
References Scope::end_position_.
Referenced by FunctionLiteral::end_position(), Scope::GetNestedScopeChain(), and TEST().
Scope * FinalizeBlockScope | ( | ) |
Definition at line 364 of file scopes.cc.
References ASSERT, Scope::inner_scopes_, Scope::is_block_scope(), v8::internal::NULL, Scope::num_var_or_const(), Scope::outer_scope(), Scope::outer_scope_, Scope::params_, Scope::temps_, Scope::unresolved_, and Scope::zone().
|
inline |
Definition at line 372 of file scopes.h.
References Scope::force_eager_compilation_.
|
inline |
Definition at line 323 of file scopes.h.
References ASSERT, Scope::function_, and Scope::is_function_scope().
Referenced by Scope::Analyze(), ScopeInfo::Create(), and HGraphBuilder::CreateGraph().
Definition at line 716 of file scopes.cc.
References ASSERT, Scope::end_position(), Scope::GetNestedScopeChain(), Scope::GetScopeInfo(), Scope::inner_scopes_, Scope::is_eval_scope(), and Scope::start_position().
Referenced by Scope::GetNestedScopeChain().
Definition at line 708 of file scopes.cc.
References ScopeInfo::Create(), Scope::scope_info_, and Scope::zone().
Referenced by Scope::GetNestedScopeChain().
|
protected |
Definition at line 1139 of file scopes.cc.
References Isolate::factory(), Scope::isolate_, and Scope::params_.
Referenced by Scope::AllocateParameterLocals().
|
inline |
Definition at line 214 of file scopes.h.
References Scope::illegal_redecl_, and v8::internal::NULL.
Referenced by HGraphBuilder::CreateGraph(), Scope::Scope(), Scope::SetIllegalRedeclaration(), and Scope::VisitIllegalRedeclaration().
|
protected |
Definition at line 645 of file scopes.cc.
References v8::internal::NULL.
Referenced by Scope::HasTrivialOuterContext().
bool HasTrivialOuterContext | ( | ) | const |
Definition at line 659 of file scopes.cc.
References Scope::HasTrivialContext(), v8::internal::NULL, Scope::outer_scope_, and Scope::scope_inside_with_.
Referenced by Scope::AllowsLazyCompilation().
void Initialize | ( | ) |
Definition at line 316 of file scopes.cc.
References Variable::AllocateTo(), Scope::already_resolved(), Variable::ARGUMENTS, ASSERT, VariableMap::Declare(), Isolate::factory(), Scope::inner_scopes_, Scope::is_declaration_scope(), Scope::is_function_scope(), Scope::is_with_scope(), Scope::isolate_, v8::internal::kCreatedInitialized, v8::internal::NULL, Scope::outer_scope(), Scope::outer_scope_, Variable::PARAMETER, Scope::receiver(), Scope::receiver_, Scope::scope_inside_with_, Variable::THIS, v8::internal::VAR, Scope::variables_, and Scope::zone().
|
inline |
Definition at line 305 of file scopes.h.
References Scope::scope_inside_with_.
|
inline |
Definition at line 350 of file scopes.h.
References Scope::interface_.
Referenced by Scope::Analyze(), and Scope::NewUnresolved().
|
inline |
Definition at line 280 of file scopes.h.
References v8::internal::BLOCK_SCOPE, and Scope::type_.
Referenced by Scope::FinalizeBlockScope(), Scope::MustAllocate(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 279 of file scopes.h.
References v8::internal::CATCH_SCOPE, and Scope::type_.
Referenced by Scope::MustAllocate(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 285 of file scopes.h.
References v8::internal::CLASSIC_MODE, and Scope::language_mode().
Referenced by Scope::AllocateParameterLocals(), Scope::calls_non_strict_eval(), and Scope::is_strict_or_extended_eval_scope().
|
inline |
Definition at line 282 of file scopes.h.
References Scope::is_eval_scope(), Scope::is_function_scope(), and Scope::is_global_scope().
Referenced by Scope::CheckConflictingVarDeclarations(), Scope::DeclarationScope(), Scope::Initialize(), and Scope::TrivialDeclarationScopesBeforeWithScope().
|
inline |
Definition at line 275 of file scopes.h.
References v8::internal::EVAL_SCOPE, and Scope::type_.
Referenced by Scope::GetNestedScopeChain(), Scope::is_declaration_scope(), Scope::is_strict_or_extended_eval_scope(), and Rewriter::Rewrite().
|
inline |
Definition at line 288 of file scopes.h.
References v8::internal::EXTENDED_MODE, and Scope::language_mode().
Referenced by Scope::CheckAssignmentToConst().
|
inline |
Definition at line 276 of file scopes.h.
References v8::internal::FUNCTION_SCOPE, and Scope::type_.
Referenced by Scope::AllocateParameterLocals(), Scope::AllocateVariablesRecursively(), ScopeInfo::Create(), HGraphBuilder::CreateGraph(), Scope::DeclareFunctionVar(), Scope::DeclareParameter(), Scope::function(), Scope::Initialize(), Scope::is_declaration_scope(), Scope::LookupRecursive(), and Scope::parameter().
|
inline |
Definition at line 278 of file scopes.h.
References v8::internal::GLOBAL_SCOPE, and Scope::type_.
Referenced by Scope::Analyze(), Scope::DeclareGlobal(), Scope::is_declaration_scope(), Variable::is_global(), Scope::LookupRecursive(), Scope::RecordEvalCall(), Rewriter::Rewrite(), and TEST().
|
inline |
Definition at line 277 of file scopes.h.
References v8::internal::MODULE_SCOPE, and Scope::type_.
Referenced by Scope::AllocateVariablesRecursively(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 291 of file scopes.h.
References Scope::is_classic_mode(), and Scope::is_eval_scope().
|
inline |
Definition at line 281 of file scopes.h.
References Scope::type_, and v8::internal::WITH_SCOPE.
Referenced by Scope::AllocateVariablesRecursively(), Scope::Initialize(), Scope::LookupRecursive(), and Scope::TrivialDeclarationScopesBeforeWithScope().
Definition at line 406 of file scopes.h.
References VariableMap::Lookup(), v8::internal::NULL, and Scope::variables_.
|
inline |
Definition at line 316 of file scopes.h.
References Scope::language_mode_.
Referenced by Compiler::BuildFunctionInfo(), ScopeInfo::Create(), Scope::is_classic_mode(), Scope::is_extended_mode(), FunctionLiteral::language_mode(), and Scope::SetLanguageMode().
Definition at line 393 of file scopes.cc.
References Variable::AllocateTo(), ASSERT, Variable::CONTEXT, VariableMap::Declare(), v8::internal::DYNAMIC, v8::internal::kCreatedInitialized, VariableMap::Lookup(), Variable::LOOKUP, Variable::NORMAL, v8::internal::NULL, Scope::scope_info_, and Scope::variables_.
Referenced by Scope::AllocateParameterLocals(), and Scope::LookupRecursive().
Definition at line 448 of file scopes.cc.
References v8::internal::NULL.
Variable * LookupFunctionVar | ( | Handle< String > | name, |
AstNodeFactory< AstNullVisitor > * | factory | ||
) |
Definition at line 424 of file scopes.cc.
References Variable::AllocateTo(), Variable::CONTEXT, Scope::DeclareFunctionVar(), Scope::function_, Handle< T >::is_identical_to(), v8::internal::kCreatedInitialized, VariableProxy::name(), Variable::NORMAL, v8::internal::NULL, Declaration::proxy(), Scope::scope_info_, VariableProxy::var(), and Scope::zone().
Referenced by Scope::LookupRecursive().
|
protected |
Definition at line 916 of file scopes.cc.
References ASSERT, Scope::BOUND, Scope::BOUND_EVAL_SHADOWED, Scope::calls_non_strict_eval(), Scope::DYNAMIC_LOOKUP, Variable::ForceContextAllocation(), Scope::is_function_scope(), Scope::is_global_scope(), Scope::is_with_scope(), Scope::LocalLookup(), Scope::LookupFunctionVar(), Scope::LookupRecursive(), v8::internal::NULL, Scope::outer_scope_, Scope::UNBOUND, and Scope::UNBOUND_EVAL_SHADOWED.
Referenced by Scope::LookupRecursive(), and Scope::ResolveVariable().
|
protected |
Definition at line 1103 of file scopes.cc.
References Variable::has_forced_context_allocation(), Scope::inner_scope_calls_eval_, Scope::is_block_scope(), Scope::is_catch_scope(), Variable::is_global(), Variable::is_this(), Variable::is_used(), Variable::name(), Scope::scope_calls_eval_, Scope::scope_contains_with_, and Variable::set_is_used().
Referenced by Scope::AllocateNonParameterLocal(), and Scope::AllocateParameterLocals().
|
protected |
Definition at line 1121 of file scopes.cc.
References Variable::has_forced_context_allocation(), Scope::inner_scope_calls_eval_, Scope::is_block_scope(), Scope::is_catch_scope(), Variable::is_global(), Scope::is_module_scope(), Variable::mode(), Scope::scope_calls_eval_, Scope::scope_contains_with_, and v8::internal::TEMPORARY.
Referenced by Scope::AllocateNonParameterLocal(), and Scope::AllocateParameterLocals().
Definition at line 509 of file scopes.cc.
References Scope::already_resolved(), ASSERT, v8::internal::kCreatedInitialized, Variable::NORMAL, v8::internal::TEMPORARY, Scope::temps_, and Scope::zone().
Referenced by Rewriter::Rewrite().
|
inline |
Definition at line 167 of file scopes.h.
References Scope::already_resolved(), ASSERT, Scope::interface(), and Scope::unresolved_.
|
protected |
Definition at line 895 of file scopes.cc.
References Variable::AllocateTo(), VariableMap::Declare(), Scope::dynamics_, DynamicScopePart::GetMap(), v8::internal::kCreatedInitialized, v8::internal::kNeedsInitialization, VariableMap::Lookup(), Variable::LOOKUP, Variable::NORMAL, v8::internal::NULL, v8::internal::VAR, and Scope::zone().
Referenced by Scope::ResolveVariable().
|
inline |
Definition at line 366 of file scopes.h.
References Scope::num_heap_slots_.
Referenced by Scope::ContextLocalCount(), ScopeInfo::Create(), and Scope::TrivialDeclarationScopesBeforeWithScope().
|
inline |
Definition at line 335 of file scopes.h.
References Scope::params_.
Referenced by ScopeInfo::Create(), and HEnvironment::HEnvironment().
|
inline |
Definition at line 365 of file scopes.h.
References Scope::num_stack_slots_.
Referenced by ScopeInfo::Create(), HEnvironment::HEnvironment(), and Scope::StackLocalCount().
|
inline |
Definition at line 362 of file scopes.h.
References Scope::num_var_or_const_.
Referenced by Scope::FinalizeBlockScope().
|
inline |
Definition at line 347 of file scopes.h.
References Scope::outer_scope_.
Referenced by Scope::Analyze(), Scope::DeclarationScope(), Scope::FinalizeBlockScope(), and Scope::Initialize().
|
inline |
Definition at line 300 of file scopes.h.
References Scope::outer_scope_calls_non_strict_eval_.
Referenced by Scope::AllocateVariables().
|
inline |
Definition at line 330 of file scopes.h.
References ASSERT, Scope::is_function_scope(), and Scope::params_.
Referenced by ScopeInfo::Create().
|
protected |
Definition at line 1082 of file scopes.cc.
References Scope::calls_non_strict_eval(), Scope::force_eager_compilation_, Scope::inner_scope_calls_eval_, Scope::inner_scopes_, Scope::outer_scope_calls_non_strict_eval_, Scope::PropagateScopeInfo(), and Scope::scope_calls_eval_.
Referenced by Scope::AllocateVariables(), Scope::DeserializeScopeChain(), and Scope::PropagateScopeInfo().
|
inline |
Definition at line 319 of file scopes.h.
References Scope::receiver_.
Referenced by Scope::Initialize().
|
inline |
Definition at line 233 of file scopes.h.
References Scope::is_global_scope(), and Scope::scope_calls_eval_.
|
inline |
Definition at line 230 of file scopes.h.
References Scope::scope_contains_with_.
Referenced by Scope::DeserializeScopeChain().
void RemoveUnresolved | ( | VariableProxy * | var | ) |
Definition at line 497 of file scopes.cc.
References Scope::unresolved_.
|
protected |
Definition at line 971 of file scopes.cc.
References ASSERT, VariableProxy::BindTo(), Scope::BOUND, Scope::BOUND_EVAL_SHADOWED, v8::internal::DYNAMIC, v8::internal::DYNAMIC_GLOBAL, v8::internal::DYNAMIC_LOCAL, Scope::DYNAMIC_LOOKUP, Variable::interface(), VariableProxy::interface(), Variable::is_dynamic(), Variable::is_global(), v8::internal::kStrictMode, Scope::LookupRecursive(), Variable::name(), VariableProxy::name(), Factory::NewJSArray(), Factory::NewSyntaxError(), NONE, Scope::NonLocal(), v8::internal::NULL, VariableProxy::position(), v8::internal::PrintF(), Variable::set_local_if_not_shadowed(), JSObject::SetElement(), Scope::UNBOUND, Scope::UNBOUND_EVAL_SHADOWED, Interface::Unify(), v8::internal::USE(), VariableProxy::var(), and Scope::zone().
Referenced by Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 1062 of file scopes.cc.
References ASSERT, Scope::inner_scopes_, Scope::ResolveVariable(), and Scope::unresolved_.
Referenced by Scope::AllocateVariables().
|
inline |
Definition at line 267 of file scopes.h.
References Scope::end_position_.
|
inline |
Definition at line 263 of file scopes.h.
References Scope::start_position_.
void SetIllegalRedeclaration | ( | Expression * | expression | ) |
Definition at line 527 of file scopes.cc.
References ASSERT, Scope::HasIllegalRedeclaration(), and Scope::illegal_redecl_.
|
inline |
Definition at line 236 of file scopes.h.
References Scope::language_mode(), and Scope::language_mode_.
Definition at line 111 of file scopes.h.
References Scope::scope_name_.
int StackLocalCount | ( | ) | const |
Definition at line 1289 of file scopes.cc.
References Scope::function_, Variable::IsStackLocal(), v8::internal::NULL, Scope::num_stack_slots(), Declaration::proxy(), and VariableProxy::var().
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 262 of file scopes.h.
References Scope::start_position_.
Referenced by Scope::GetNestedScopeChain(), FunctionLiteral::start_position(), and TEST().
bool TrivialDeclarationScopesBeforeWithScope | ( | ) | const |
Definition at line 675 of file scopes.cc.
References Scope::DeclarationScope(), Scope::is_declaration_scope(), Scope::is_with_scope(), v8::internal::NULL, Scope::num_heap_slots(), and Scope::outer_scope_.
Referenced by Scope::AllowsLazyRecompilation().
|
inline |
Definition at line 313 of file scopes.h.
References Scope::type_.
Referenced by ScopeInfo::Create().
void VisitIllegalRedeclaration | ( | AstVisitor * | visitor | ) |
Definition at line 536 of file scopes.cc.
References AstNode::Accept(), ASSERT, Scope::HasIllegalRedeclaration(), and Scope::illegal_redecl_.
|
inline |
Definition at line 120 of file scopes.h.
Referenced by Scope::AddDeclaration(), Scope::CollectStackAndContextLocals(), Scope::DeclareParameter(), Scope::DeserializeScopeChain(), Scope::FinalizeBlockScope(), Scope::GetScopeInfo(), Scope::Initialize(), Scope::LookupFunctionVar(), Scope::NewTemporary(), Scope::NonLocal(), and Scope::ResolveVariable().
|
protected |
Definition at line 489 of file scopes.h.
Referenced by Scope::already_resolved().
|
protected |
Definition at line 460 of file scopes.h.
Referenced by Scope::AllocateParameterLocals(), and Scope::arguments().
|
protected |
Definition at line 454 of file scopes.h.
Referenced by Scope::AddDeclaration(), Scope::CheckConflictingVarDeclarations(), and Scope::declarations().
|
protected |
Definition at line 450 of file scopes.h.
Referenced by Scope::NonLocal().
|
protected |
Definition at line 480 of file scopes.h.
Referenced by Scope::end_position(), and Scope::set_end_position().
|
protected |
Definition at line 485 of file scopes.h.
Referenced by Scope::AllowsLazyCompilation(), Scope::AllowsLazyRecompilation(), Scope::ForceEagerCompilation(), and Scope::PropagateScopeInfo().
|
protected |
Definition at line 458 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::ContextLocalCount(), Scope::DeclareFunctionVar(), Scope::function(), Scope::LookupFunctionVar(), and Scope::StackLocalCount().
|
protected |
Definition at line 465 of file scopes.h.
Referenced by Scope::HasIllegalRedeclaration(), Scope::SetIllegalRedeclaration(), and Scope::VisitIllegalRedeclaration().
|
protected |
Definition at line 484 of file scopes.h.
Referenced by Scope::MustAllocate(), Scope::MustAllocateInContext(), and Scope::PropagateScopeInfo().
Definition at line 431 of file scopes.h.
Referenced by Scope::AllocateVariablesRecursively(), Scope::CheckAssignmentToConst(), Scope::FinalizeBlockScope(), Scope::GetNestedScopeChain(), Scope::Initialize(), Scope::inner_scopes(), Scope::PropagateScopeInfo(), and Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 462 of file scopes.h.
Referenced by Scope::interface().
|
protected |
Definition at line 427 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocal(), Scope::AllocateParameterLocals(), Scope::HasArgumentsParameter(), and Scope::Initialize().
|
protected |
Definition at line 477 of file scopes.h.
Referenced by Scope::language_mode(), and Scope::SetLanguageMode().
|
protected |
Definition at line 496 of file scopes.h.
Referenced by Scope::AllocateHeapSlot(), Scope::AllocateVariablesRecursively(), and Scope::num_heap_slots().
|
protected |
Definition at line 495 of file scopes.h.
Referenced by Scope::AllocateStackSlot(), Scope::AllocateVariablesRecursively(), and Scope::num_stack_slots().
|
protected |
Definition at line 492 of file scopes.h.
Referenced by Scope::DeclareLocal(), and Scope::num_var_or_const().
|
protected |
Definition at line 430 of file scopes.h.
Referenced by Scope::AllocateVariables(), Scope::CheckConflictingVarDeclarations(), Scope::ContextChainLength(), Scope::FinalizeBlockScope(), Scope::HasTrivialOuterContext(), Scope::Initialize(), Scope::LookupRecursive(), Scope::outer_scope(), and Scope::TrivialDeclarationScopesBeforeWithScope().
|
protected |
Definition at line 483 of file scopes.h.
Referenced by Scope::outer_scope_calls_non_strict_eval(), and Scope::PropagateScopeInfo().
Definition at line 448 of file scopes.h.
Referenced by Scope::AllocateParameterLocals(), Scope::DeclareParameter(), Scope::FinalizeBlockScope(), Scope::HasArgumentsParameter(), Scope::num_parameters(), and Scope::parameter().
|
protected |
Definition at line 456 of file scopes.h.
Referenced by Scope::Initialize(), and Scope::receiver().
|
protected |
Definition at line 475 of file scopes.h.
Referenced by Scope::calls_eval(), Scope::calls_non_strict_eval(), Scope::MustAllocate(), Scope::MustAllocateInContext(), Scope::PropagateScopeInfo(), and Scope::RecordEvalCall().
|
protected |
Definition at line 472 of file scopes.h.
Referenced by Scope::contains_with(), Scope::MustAllocate(), Scope::MustAllocateInContext(), and Scope::RecordWithStatement().
Definition at line 499 of file scopes.h.
Referenced by Scope::GetScopeInfo(), Scope::LocalLookup(), and Scope::LookupFunctionVar().
|
protected |
Definition at line 470 of file scopes.h.
Referenced by Scope::DeserializeScopeChain(), Scope::HasTrivialOuterContext(), Scope::Initialize(), and Scope::inside_with().
Definition at line 437 of file scopes.h.
Referenced by Scope::SetScopeName().
|
protected |
Definition at line 479 of file scopes.h.
Referenced by Scope::set_start_position(), and Scope::start_position().
Definition at line 446 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CollectStackAndContextLocals(), Scope::FinalizeBlockScope(), and Scope::NewTemporary().
|
protected |
Definition at line 434 of file scopes.h.
Referenced by Scope::is_block_scope(), Scope::is_catch_scope(), Scope::is_eval_scope(), Scope::is_function_scope(), Scope::is_global_scope(), Scope::is_module_scope(), Scope::is_with_scope(), and Scope::type().
|
protected |
Definition at line 452 of file scopes.h.
Referenced by Scope::CheckAssignmentToConst(), Scope::FinalizeBlockScope(), Scope::NewUnresolved(), Scope::RemoveUnresolved(), and Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 444 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CheckConflictingVarDeclarations(), Scope::CollectStackAndContextLocals(), Scope::DeclareGlobal(), Scope::DeclareLocal(), Scope::DeclareParameter(), Scope::Initialize(), Scope::IsDeclared(), and Scope::LocalLookup().