v8
3.14.5(node0.10.28)
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 107 of file scopes.cc.
References ASSERT, v8::internal::GLOBAL_SCOPE, Scope::HasIllegalRedeclaration(), and v8::internal::NULL.
Referenced by Scope::DeserializeScopeChain().
void AddDeclaration | ( | Declaration * | declaration | ) |
Definition at line 531 of file scopes.cc.
References Scope::decls_, and Scope::zone().
|
protected |
Definition at line 1203 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 1358 of file scopes.cc.
References Scope::AllocateModules(), ASSERT, Isolate::factory(), Scope::GetScopeInfo(), Scope::inner_scopes_, Scope::interface_, Scope::is_global_scope(), Scope::is_module_scope(), Interface::IsFrozen(), CompilationInfo::isolate(), Interface::MakeSingleton(), Factory::NewJSModule(), Factory::NewModuleContext(), and Scope::scope_info_.
Referenced by Scope::AllocateModules(), and Scope::AllocateVariables().
|
protected |
Definition at line 1264 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 1278 of file scopes.cc.
References Scope::AllocateNonParameterLocal(), VarAndOrder::Compare(), Scope::function_, TemplateHashMapImpl< AllocationPolicy >::Next(), v8::internal::NULL, TemplateHashMapImpl< AllocationPolicy >::occupancy(), Declaration::proxy(), TemplateHashMapImpl< AllocationPolicy >::Start(), Scope::temps_, VariableProxy::var(), Scope::variables_, and Scope::zone().
Referenced by Scope::AllocateVariablesRecursively().
|
protected |
Definition at line 1208 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 1198 of file scopes.cc.
References Variable::AllocateTo(), Variable::LOCAL, and Scope::num_stack_slots_.
Referenced by Scope::AllocateNonParameterLocal().
|
protected |
Definition at line 651 of file scopes.cc.
References Scope::AllocateModules(), Scope::AllocateVariablesRecursively(), Scope::calls_non_strict_eval(), Scope::is_global_scope(), Scope::is_module_scope(), Scope::LinkModules(), 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 1309 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 725 of file scopes.cc.
References Scope::force_eager_compilation_, and Scope::HasLazyCompilableOuterContext().
Referenced by FunctionLiteral::AllowsLazyCompilation(), FullCodeGenerator::MakeCode(), and CompilationInfo::ShouldSelfOptimize().
bool AllowsLazyCompilationWithoutContext | ( | ) | const |
Definition at line 730 of file scopes.cc.
References Scope::force_eager_compilation_, and Scope::HasTrivialOuterContext().
Referenced by FunctionLiteral::AllowsLazyCompilationWithoutContext().
|
inlineprotected |
Definition at line 499 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 274 of file scopes.cc.
References Scope::AllocateVariables(), Scope::already_resolved(), ASSERT, Isolate::bootstrapper(), CompilationInfo::function(), Scope::interface(), Scope::is_global_scope(), Bootstrapper::IsActive(), CompilationInfo::isolate(), Factory::NewJSArray(), Factory::NewSyntaxError(), v8::internal::NULL, Scope::outer_scope(), VariableProxy::position(), v8::internal::PrintF(), FunctionLiteral::scope(), CompilationInfo::script(), CompilationInfo::SetScope(), and CompilationInfo::zone().
Referenced by Compiler::RecompileParallel().
|
inline |
Definition at line 339 of file scopes.h.
References Scope::arguments_.
Referenced by Scope::AllocateParameterLocals(), and Compiler::SetFunctionInfo().
|
inline |
Definition at line 297 of file scopes.h.
References Scope::scope_calls_eval_.
Referenced by Scope::AllocateVariablesRecursively(), ScopeInfo::Create(), and HGraphBuilder::CreateGraph().
|
inline |
Definition at line 298 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 575 of file scopes.cc.
References ASSERT, Scope::inner_scopes_, Scope::is_extended_mode(), v8::internal::NULL, and Scope::unresolved_.
Declaration * CheckConflictingVarDeclarations | ( | ) |
Definition at line 551 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 613 of file scopes.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT, VarAndOrder::Compare(), Variable::is_used(), Variable::IsContextSlot(), Variable::IsStackLocal(), TemplateHashMapImpl< AllocationPolicy >::Next(), v8::internal::NULL, TemplateHashMapImpl< AllocationPolicy >::occupancy(), TemplateHashMapImpl< AllocationPolicy >::Start(), Scope::temps_, Scope::variables_, and Scope::zone().
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 308 of file scopes.h.
References Scope::scope_contains_with_.
Referenced by Scope::DeserializeScopeChain().
int ContextChainLength | ( | Scope * | scope | ) |
Definition at line 735 of file scopes.cc.
References ASSERT, v8::internal::NULL, and Scope::outer_scope_.
int ContextLocalCount | ( | ) | const |
Definition at line 1351 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 342 of file scopes.h.
References Scope::decls_.
Referenced by HGraphBuilder::CreateGraph().
Scope * DeclarationScope | ( | ) |
Definition at line 745 of file scopes.cc.
References Scope::is_declaration_scope(), and Scope::outer_scope().
Referenced by Scope::HasLazyCompilableOuterContext().
Definition at line 495 of file scopes.cc.
References ASSERT, VariableMap::Declare(), v8::internal::DYNAMIC_GLOBAL, Scope::is_global_scope(), v8::internal::kCreatedInitialized, Variable::NORMAL, and Scope::variables_.
Referenced by Scope::ResolveVariable().
|
inline |
Definition at line 142 of file scopes.h.
References ASSERT, Scope::function_, and Scope::is_function_scope().
Referenced by Scope::LookupFunctionVar().
Variable * DeclareLocal | ( | Handle< String > | name, |
VariableMode | mode, | ||
InitializationFlag | init_flag, | ||
Interface * | interface = Interface::NewValue() |
||
) |
Definition at line 480 of file scopes.cc.
References Scope::already_resolved(), ASSERT, VariableMap::Declare(), v8::internal::IsDeclaredVariableMode(), Variable::NORMAL, Scope::num_var_or_const_, and Scope::variables_.
void DeclareParameter | ( | Handle< String > | name, |
VariableMode | mode | ||
) |
Definition at line 471 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 210 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, v8::internal::GLOBAL_SCOPE, Context::IsBlockContext(), Context::IsCatchContext(), Context::IsFunctionContext(), Context::IsGlobalContext(), Context::IsModuleContext(), Context::IsWithContext(), Context::module(), v8::internal::MODULE_SCOPE, 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 376 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 373 of file scopes.h.
References Scope::force_eager_compilation_.
|
inline |
Definition at line 324 of file scopes.h.
References ASSERT, Scope::function_, and Scope::is_function_scope().
Referenced by ScopeInfo::Create(), and HGraphBuilder::CreateGraph().
Definition at line 762 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 754 of file scopes.cc.
References ScopeInfo::Create(), Scope::scope_info_, and Scope::zone().
Referenced by Scope::AllocateModules(), and Scope::GetNestedScopeChain().
|
protected |
Definition at line 1187 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().
bool HasLazyCompilableOuterContext | ( | ) | const |
Definition at line 702 of file scopes.cc.
References Scope::DeclarationScope(), v8::internal::NULL, and Scope::outer_scope_.
Referenced by Scope::AllowsLazyCompilation().
|
protected |
Definition at line 678 of file scopes.cc.
References v8::internal::NULL.
Referenced by Scope::HasTrivialOuterContext().
bool HasTrivialOuterContext | ( | ) | const |
Definition at line 692 of file scopes.cc.
References Scope::HasTrivialContext(), v8::internal::NULL, Scope::outer_scope_, and Scope::scope_inside_with_.
Referenced by Scope::AllowsLazyCompilationWithoutContext(), and CompilationInfo::DisableOptimization().
void Initialize | ( | ) |
Definition at line 328 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 306 of file scopes.h.
References Scope::scope_inside_with_.
Referenced by CompilationInfo::DisableOptimization().
|
inline |
Definition at line 351 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 286 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(), Scope::is_global_scope(), and Scope::is_module_scope().
Referenced by Scope::CheckConflictingVarDeclarations(), Scope::DeclarationScope(), and Scope::Initialize().
|
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 289 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::AllocateModules(), Scope::AllocateVariables(), Scope::Analyze(), Scope::DeclareDynamicGlobal(), Scope::is_declaration_scope(), Variable::IsGlobalObjectProperty(), Scope::LinkModules(), Scope::LookupRecursive(), Scope::MustAllocate(), Scope::MustAllocateInContext(), Scope::RecordEvalCall(), Scope::ResolveVariable(), Scope::ResolveVariablesRecursively(), Rewriter::Rewrite(), and TEST().
|
inline |
Definition at line 277 of file scopes.h.
References v8::internal::MODULE_SCOPE, and Scope::type_.
Referenced by Scope::AllocateModules(), Scope::AllocateVariables(), Scope::AllocateVariablesRecursively(), Scope::is_declaration_scope(), Scope::LinkModules(), Scope::MustAllocate(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 292 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(), and Scope::LookupRecursive().
Definition at line 405 of file scopes.h.
References VariableMap::Lookup(), v8::internal::NULL, and Scope::variables_.
|
inline |
Definition at line 317 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().
|
protected |
Definition at line 1388 of file scopes.cc.
References ASSERT, Interface::Iterator::done(), DONT_DELETE, DONT_ENUM, Variable::index(), Scope::inner_scopes_, Interface::Instance(), Scope::interface_, Variable::is_const_mode(), Scope::is_global_scope(), Scope::is_module_scope(), Handle< T >::is_null(), Variable::IsContextSlot(), Interface::iterator(), v8::internal::kStrictMode, Scope::LinkModules(), Scope::LocalLookup(), Accessors::MakeModuleExport(), v8::internal::NULL, JSObject::PreventExtensions(), READ_ONLY, v8::internal::SetAccessor(), JSReceiver::SetProperty(), and v8::internal::USE().
Referenced by Scope::AllocateVariables(), and Scope::LinkModules().
Definition at line 405 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(), Scope::LinkModules(), and Scope::LookupRecursive().
Definition at line 460 of file scopes.cc.
References v8::internal::NULL.
Variable * LookupFunctionVar | ( | Handle< String > | name, |
AstNodeFactory< AstNullVisitor > * | factory | ||
) |
Definition at line 436 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 962 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 1149 of file scopes.cc.
References Variable::has_forced_context_allocation(), Scope::inner_scope_calls_eval_, Scope::is_block_scope(), Scope::is_catch_scope(), Scope::is_global_scope(), Scope::is_module_scope(), Variable::is_this(), Variable::is_used(), Variable::IsGlobalObjectProperty(), 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 1169 of file scopes.cc.
References Variable::has_forced_context_allocation(), Scope::inner_scope_calls_eval_, Scope::is_block_scope(), Scope::is_catch_scope(), Scope::is_global_scope(), Scope::is_module_scope(), v8::internal::IsLexicalVariableMode(), Variable::mode(), Scope::scope_calls_eval_, Scope::scope_contains_with_, and v8::internal::TEMPORARY.
Referenced by Scope::AllocateNonParameterLocal(), and Scope::AllocateParameterLocals().
Definition at line 518 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 941 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 367 of file scopes.h.
References Scope::num_heap_slots_.
Referenced by Scope::ContextLocalCount(), and ScopeInfo::Create().
|
inline |
Definition at line 336 of file scopes.h.
References Scope::params_.
Referenced by ScopeInfo::Create(), OptimizingCompiler::CreateGraph(), LChunk::GetParameterStackSlot(), and HEnvironment::HEnvironment().
|
inline |
Definition at line 366 of file scopes.h.
References Scope::num_stack_slots_.
Referenced by ScopeInfo::Create(), OptimizingCompiler::CreateGraph(), HEnvironment::HEnvironment(), and Scope::StackLocalCount().
|
inline |
Definition at line 363 of file scopes.h.
References Scope::num_var_or_const_.
Referenced by Scope::FinalizeBlockScope().
|
inline |
Definition at line 348 of file scopes.h.
References Scope::outer_scope_.
Referenced by Scope::Analyze(), Scope::DeclarationScope(), Scope::FinalizeBlockScope(), and Scope::Initialize().
|
inline |
Definition at line 301 of file scopes.h.
References Scope::outer_scope_calls_non_strict_eval_.
Referenced by Scope::AllocateVariables(), and CompilationInfo::DisableOptimization().
|
inline |
Definition at line 331 of file scopes.h.
References ASSERT, Scope::is_function_scope(), and Scope::params_.
Referenced by ScopeInfo::Create().
|
protected |
Definition at line 1128 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 320 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 506 of file scopes.cc.
References Scope::unresolved_.
|
protected |
Definition at line 1017 of file scopes.cc.
References ASSERT, VariableProxy::BindTo(), Scope::BOUND, Scope::BOUND_EVAL_SHADOWED, Scope::DeclareDynamicGlobal(), v8::internal::DYNAMIC, v8::internal::DYNAMIC_GLOBAL, v8::internal::DYNAMIC_LOCAL, Scope::DYNAMIC_LOOKUP, CompilationInfo::global_scope(), Variable::interface(), VariableProxy::interface(), Variable::is_dynamic(), Scope::is_global_scope(), Variable::IsGlobalObjectProperty(), v8::internal::kStrictMode, Scope::LookupRecursive(), Variable::name(), VariableProxy::name(), Factory::NewJSArray(), Factory::NewSyntaxError(), NONE, Scope::NonLocal(), v8::internal::NULL, VariableProxy::position(), v8::internal::PrintF(), CompilationInfo::script(), 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 1108 of file scopes.cc.
References ASSERT, CompilationInfo::global_scope(), Scope::inner_scopes_, Scope::is_global_scope(), 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 536 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 1345 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().
|
inline |
Definition at line 314 of file scopes.h.
References Scope::type_.
Referenced by ScopeInfo::Create().
void VisitIllegalRedeclaration | ( | AstVisitor * | visitor | ) |
Definition at line 545 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::AllocateNonParameterLocals(), 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 488 of file scopes.h.
Referenced by Scope::already_resolved().
|
protected |
Definition at line 459 of file scopes.h.
Referenced by Scope::AllocateParameterLocals(), and Scope::arguments().
|
protected |
Definition at line 453 of file scopes.h.
Referenced by Scope::AddDeclaration(), Scope::CheckConflictingVarDeclarations(), and Scope::declarations().
|
protected |
Definition at line 449 of file scopes.h.
Referenced by Scope::NonLocal().
|
protected |
Definition at line 479 of file scopes.h.
Referenced by Scope::end_position(), and Scope::set_end_position().
|
protected |
Definition at line 484 of file scopes.h.
Referenced by Scope::AllowsLazyCompilation(), Scope::AllowsLazyCompilationWithoutContext(), Scope::ForceEagerCompilation(), and Scope::PropagateScopeInfo().
|
protected |
Definition at line 457 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::ContextLocalCount(), Scope::DeclareFunctionVar(), Scope::function(), Scope::LookupFunctionVar(), and Scope::StackLocalCount().
|
protected |
Definition at line 464 of file scopes.h.
Referenced by Scope::HasIllegalRedeclaration(), Scope::SetIllegalRedeclaration(), and Scope::VisitIllegalRedeclaration().
|
protected |
Definition at line 483 of file scopes.h.
Referenced by Scope::MustAllocate(), Scope::MustAllocateInContext(), and Scope::PropagateScopeInfo().
Definition at line 430 of file scopes.h.
Referenced by Scope::AllocateModules(), Scope::AllocateVariablesRecursively(), Scope::CheckAssignmentToConst(), Scope::FinalizeBlockScope(), Scope::GetNestedScopeChain(), Scope::Initialize(), Scope::inner_scopes(), Scope::LinkModules(), Scope::PropagateScopeInfo(), and Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 461 of file scopes.h.
Referenced by Scope::AllocateModules(), Scope::interface(), and Scope::LinkModules().
|
protected |
Definition at line 426 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocal(), Scope::AllocateParameterLocals(), Scope::HasArgumentsParameter(), and Scope::Initialize().
|
protected |
Definition at line 476 of file scopes.h.
Referenced by Scope::language_mode(), and Scope::SetLanguageMode().
|
protected |
Definition at line 495 of file scopes.h.
Referenced by Scope::AllocateHeapSlot(), Scope::AllocateVariablesRecursively(), and Scope::num_heap_slots().
|
protected |
Definition at line 494 of file scopes.h.
Referenced by Scope::AllocateStackSlot(), Scope::AllocateVariablesRecursively(), and Scope::num_stack_slots().
|
protected |
Definition at line 491 of file scopes.h.
Referenced by Scope::DeclareLocal(), and Scope::num_var_or_const().
|
protected |
Definition at line 429 of file scopes.h.
Referenced by Scope::AllocateVariables(), Scope::CheckConflictingVarDeclarations(), Scope::ContextChainLength(), Scope::FinalizeBlockScope(), Scope::HasLazyCompilableOuterContext(), Scope::HasTrivialOuterContext(), Scope::Initialize(), Scope::LookupRecursive(), and Scope::outer_scope().
|
protected |
Definition at line 482 of file scopes.h.
Referenced by Scope::outer_scope_calls_non_strict_eval(), and Scope::PropagateScopeInfo().
Definition at line 447 of file scopes.h.
Referenced by Scope::AllocateParameterLocals(), Scope::DeclareParameter(), Scope::FinalizeBlockScope(), Scope::HasArgumentsParameter(), Scope::num_parameters(), and Scope::parameter().
|
protected |
Definition at line 455 of file scopes.h.
Referenced by Scope::Initialize(), and Scope::receiver().
|
protected |
Definition at line 474 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 471 of file scopes.h.
Referenced by Scope::contains_with(), Scope::MustAllocate(), Scope::MustAllocateInContext(), and Scope::RecordWithStatement().
Definition at line 498 of file scopes.h.
Referenced by Scope::AllocateModules(), Scope::GetScopeInfo(), Scope::LocalLookup(), and Scope::LookupFunctionVar().
|
protected |
Definition at line 469 of file scopes.h.
Referenced by Scope::DeserializeScopeChain(), Scope::HasTrivialOuterContext(), Scope::Initialize(), and Scope::inside_with().
Definition at line 436 of file scopes.h.
Referenced by Scope::SetScopeName().
|
protected |
Definition at line 478 of file scopes.h.
Referenced by Scope::set_start_position(), and Scope::start_position().
Definition at line 445 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CollectStackAndContextLocals(), Scope::FinalizeBlockScope(), and Scope::NewTemporary().
|
protected |
Definition at line 433 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 451 of file scopes.h.
Referenced by Scope::CheckAssignmentToConst(), Scope::FinalizeBlockScope(), Scope::NewUnresolved(), Scope::RemoveUnresolved(), and Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 443 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CheckConflictingVarDeclarations(), Scope::CollectStackAndContextLocals(), Scope::DeclareDynamicGlobal(), Scope::DeclareLocal(), Scope::DeclareParameter(), Scope::Initialize(), Scope::IsDeclared(), and Scope::LocalLookup().