v8
3.25.30(node0.11.13)
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 | scope_type_ |
Handle< String > | scope_name_ |
VariableMap | variables_ |
ZoneList< Variable * > | internals_ |
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_ |
StrictMode | strict_mode_ |
int | start_position_ |
int | end_position_ |
bool | outer_scope_calls_sloppy_eval_ |
bool | inner_scope_calls_eval_ |
bool | force_eager_compilation_ |
bool | force_context_allocation_ |
bool | already_resolved_ |
int | num_var_or_const_ |
int | num_stack_slots_ |
int | num_heap_slots_ |
int | num_modules_ |
Variable * | module_var_ |
Handle< ScopeInfo > | scope_info_ |
Friends | |
class | ParserFactory |
|
protected |
Definition at line 105 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 1230 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 1374 of file scopes.cc.
References Scope::AllocateModulesRecursively(), Scope::already_resolved(), ASSERT, Isolate::factory(), Scope::inner_scopes_, Scope::interface_, Factory::InternalizeOneByteString(), Scope::is_module_scope(), Interface::IsFrozen(), Scope::isolate_, Scope::module_var_, Scope::NewInternal(), v8::internal::NULL, Scope::num_modules_, and STATIC_ASCII_VECTOR.
Referenced by Scope::AllocateModulesRecursively(), and Scope::AllocateVariables().
|
protected |
Definition at line 1291 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 1305 of file scopes.cc.
References Scope::AllocateNonParameterLocal(), VarAndOrder::Compare(), Scope::function_, Scope::internals_, TemplateHashMapImpl< AllocationPolicy >::Next(), v8::internal::NULL, TemplateHashMapImpl< AllocationPolicy >::occupancy(), TemplateHashMapImpl< AllocationPolicy >::Start(), Scope::temps_, Scope::variables_, and Scope::zone().
Referenced by Scope::AllocateVariablesRecursively().
|
protected |
Definition at line 1235 of file scopes.cc.
References Scope::AllocateHeapSlot(), Variable::AllocateTo(), Scope::arguments(), Scope::arguments_, ASSERT, Isolate::factory(), Variable::ForceContextAllocation(), Scope::HasArgumentsParameter(), 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_, Variable::scope(), v8::internal::SLOPPY, and Scope::strict_mode().
Referenced by Scope::AllocateVariablesRecursively().
|
protected |
Definition at line 1225 of file scopes.cc.
References Variable::AllocateTo(), Variable::LOCAL, and Scope::num_stack_slots_.
Referenced by Scope::AllocateNonParameterLocal().
|
protected |
Definition at line 642 of file scopes.cc.
References Scope::AllocateModulesRecursively(), Scope::AllocateVariablesRecursively(), ASSERT, Scope::calls_sloppy_eval(), Scope::is_global_scope(), Scope::is_module_scope(), v8::internal::NULL, Scope::num_modules_, Scope::outer_scope_, Scope::outer_scope_calls_sloppy_eval(), Scope::PropagateScopeInfo(), and Scope::ResolveVariablesRecursively().
Referenced by Scope::Analyze().
|
protected |
Definition at line 1338 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 711 of file scopes.cc.
References Scope::force_eager_compilation_, and Scope::HasLazyCompilableOuterContext().
Referenced by CompilationInfo::ShouldSelfOptimize().
bool AllowsLazyCompilationWithoutContext | ( | ) | const |
Definition at line 716 of file scopes.cc.
References Scope::force_eager_compilation_, and Scope::HasTrivialOuterContext().
|
inlineprotected |
Definition at line 519 of file scopes.h.
References Scope::already_resolved_.
Referenced by Scope::AllocateModulesRecursively(), Scope::AllocateVariablesRecursively(), Scope::Analyze(), Scope::DeclareLocal(), Scope::DeclareParameter(), Scope::ForceContextAllocation(), Scope::Initialize(), Scope::LookupRecursive(), Scope::NewInternal(), Scope::NewTemporary(), and Scope::NewUnresolved().
|
static |
Definition at line 278 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(), v8::internal::NULL, Scope::outer_scope(), CompilationInfo::PrepareForCompilation(), v8::internal::PrintF(), and CompilationInfo::zone().
|
inline |
Definition at line 341 of file scopes.h.
References Scope::arguments_.
Referenced by Scope::AllocateParameterLocals(), and HOptimizedGraphBuilder::SetUpScope().
|
inline |
Definition at line 299 of file scopes.h.
References Scope::scope_calls_eval_.
Referenced by Scope::AllocateVariablesRecursively(), HOptimizedGraphBuilder::BuildGraph(), and ScopeInfo::Create().
|
inline |
Definition at line 300 of file scopes.h.
References Scope::scope_calls_eval_, v8::internal::SLOPPY, and Scope::strict_mode_.
Referenced by Scope::AllocateVariables(), Scope::LookupRecursive(), and Scope::PropagateScopeInfo().
Declaration * CheckConflictingVarDeclarations | ( | ) |
Definition at line 551 of file scopes.cc.
References Scope::decls_, Scope::is_declaration_scope(), VariableMap::Lookup(), Variable::mode(), Declaration::mode(), v8::internal::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 590 of file scopes.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT, VarAndOrder::Compare(), Scope::has_forced_context_allocation(), Scope::internals_, 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 310 of file scopes.h.
References Scope::scope_contains_with_.
Referenced by Scope::DeserializeScopeChain().
int ContextChainLength | ( | Scope * | scope | ) |
Definition at line 721 of file scopes.cc.
References ASSERT, v8::internal::NULL, and Scope::outer_scope_.
int ContextLocalCount | ( | ) | const |
Definition at line 1398 of file scopes.cc.
References Scope::function_, Context::MIN_CONTEXT_SLOTS, v8::internal::NULL, and Scope::num_heap_slots().
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 344 of file scopes.h.
References Scope::decls_.
Referenced by HOptimizedGraphBuilder::BuildGraph(), and AstTyper::Run().
Scope * DeclarationScope | ( | ) |
Definition at line 743 of file scopes.cc.
References Scope::is_declaration_scope(), and Scope::outer_scope().
Referenced by ParserTraits::CheckFunctionLiteralInsideTopLevelObjectLiteral(), ParserTraits::CheckPossibleEvalCall(), and Scope::HasLazyCompilableOuterContext().
Definition at line 482 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 467 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 458 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 214 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::IsNativeContext(), Context::IsWithContext(), Context::module(), v8::internal::MODULE_SCOPE, v8::internal::name, 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 265 of file scopes.h.
References Scope::end_position_.
Referenced by Scope::GetNestedScopeChain().
Scope * FinalizeBlockScope | ( | ) |
Definition at line 362 of file scopes.cc.
References List< T, P >::Add(), ASSERT, Scope::inner_scopes_, Scope::internals_, 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 271 of file scopes.h.
References Scope::already_resolved(), ASSERT, and Scope::force_context_allocation_.
|
inline |
Definition at line 381 of file scopes.h.
References Scope::force_eager_compilation_.
|
inline |
Definition at line 326 of file scopes.h.
References ASSERT, Scope::function_, and Scope::is_function_scope().
Referenced by HOptimizedGraphBuilder::BuildGraph(), ScopeInfo::Create(), and AstTyper::Run().
Definition at line 760 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 752 of file scopes.cc.
References ScopeInfo::Create(), Scope::scope_info_, and Scope::zone().
Referenced by Scope::GetNestedScopeChain().
Scope * GlobalScope | ( | ) |
Definition at line 734 of file scopes.cc.
References Scope::is_global_scope(), and Scope::outer_scope().
|
inline |
Definition at line 275 of file scopes.h.
References Scope::force_context_allocation_.
Referenced by Scope::CollectStackAndContextLocals(), and Scope::MustAllocateInContext().
|
protected |
Definition at line 1214 of file scopes.cc.
References Isolate::factory(), Scope::isolate_, v8::internal::name, and Scope::params_.
Referenced by Scope::AllocateParameterLocals().
|
inline |
Definition at line 220 of file scopes.h.
References Scope::illegal_redecl_, and v8::internal::NULL.
Referenced by HOptimizedGraphBuilder::BuildGraph(), Scope::Scope(), Scope::SetIllegalRedeclaration(), and Scope::VisitIllegalRedeclaration().
bool HasLazyCompilableOuterContext | ( | ) | const |
Definition at line 693 of file scopes.cc.
References Scope::DeclarationScope(), v8::internal::NULL, and Scope::outer_scope_.
Referenced by Scope::AllowsLazyCompilation().
|
protected |
Definition at line 669 of file scopes.cc.
References v8::internal::NULL.
Referenced by Scope::HasTrivialOuterContext().
bool HasTrivialOuterContext | ( | ) | const |
Definition at line 683 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 314 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 308 of file scopes.h.
References Scope::scope_inside_with_.
Referenced by CompilationInfo::DisableOptimization().
|
inline |
Definition at line 353 of file scopes.h.
References Scope::interface_.
Referenced by Scope::Analyze(), and Scope::NewUnresolved().
|
inline |
Definition at line 288 of file scopes.h.
References v8::internal::BLOCK_SCOPE, and Scope::scope_type_.
Referenced by Scope::FinalizeBlockScope(), Scope::MustAllocate(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 287 of file scopes.h.
References v8::internal::CATCH_SCOPE, and Scope::scope_type_.
Referenced by Scope::MustAllocate(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 290 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 283 of file scopes.h.
References v8::internal::EVAL_SCOPE, and Scope::scope_type_.
Referenced by Scope::GetNestedScopeChain(), Scope::is_declaration_scope(), Scope::is_strict_eval_scope(), and Rewriter::Rewrite().
|
inline |
Definition at line 284 of file scopes.h.
References v8::internal::FUNCTION_SCOPE, and Scope::scope_type_.
Referenced by Scope::AllocateParameterLocals(), Scope::AllocateVariablesRecursively(), HOptimizedGraphBuilder::BuildGraph(), ScopeInfo::Create(), Scope::DeclareFunctionVar(), Scope::DeclareParameter(), Scope::function(), Scope::Initialize(), Scope::is_declaration_scope(), Scope::LookupRecursive(), Scope::parameter(), and AstTyper::Run().
|
inline |
Definition at line 286 of file scopes.h.
References v8::internal::GLOBAL_SCOPE, and Scope::scope_type_.
Referenced by Scope::AllocateVariables(), Scope::Analyze(), ParserTraits::CheckFunctionLiteralInsideTopLevelObjectLiteral(), Scope::DeclareDynamicGlobal(), Scope::GlobalScope(), Scope::is_declaration_scope(), Variable::IsGlobalObjectProperty(), Scope::LookupRecursive(), Scope::MustAllocate(), Scope::MustAllocateInContext(), Scope::RecordEvalCall(), Scope::ResolveVariable(), Scope::ResolveVariablesRecursively(), and Rewriter::Rewrite().
|
inline |
Definition at line 285 of file scopes.h.
References v8::internal::MODULE_SCOPE, and Scope::scope_type_.
Referenced by Scope::AllocateModulesRecursively(), Scope::AllocateVariables(), Scope::AllocateVariablesRecursively(), Scope::is_declaration_scope(), Scope::MustAllocate(), and Scope::MustAllocateInContext().
|
inline |
Definition at line 294 of file scopes.h.
References Scope::is_eval_scope(), v8::internal::STRICT, and Scope::strict_mode_.
|
inline |
Definition at line 289 of file scopes.h.
References Scope::scope_type_, and v8::internal::WITH_SCOPE.
Referenced by Scope::AllocateVariablesRecursively(), Scope::Initialize(), and Scope::LookupRecursive().
Definition at line 416 of file scopes.h.
References VariableMap::Lookup(), v8::internal::NULL, and Scope::variables_.
Definition at line 392 of file scopes.cc.
References Variable::AllocateTo(), ASSERT, Variable::CONTEXT, VariableMap::Declare(), v8::internal::DYNAMIC, v8::internal::kCreatedInitialized, VariableMap::Lookup(), Variable::LOOKUP, v8::internal::mode(), Variable::NORMAL, v8::internal::NULL, and Scope::variables_.
Referenced by Scope::AllocateParameterLocals(), ModuleInfo::Create(), and Scope::LookupRecursive().
Definition at line 447 of file scopes.cc.
References v8::internal::NULL.
Variable * LookupFunctionVar | ( | Handle< String > | name, |
AstNodeFactory< AstNullVisitor > * | factory | ||
) |
Definition at line 423 of file scopes.cc.
References Variable::AllocateTo(), Variable::CONTEXT, Scope::DeclareFunctionVar(), Scope::function_, v8::internal::kCreatedInitialized, v8::internal::mode(), Variable::NORMAL, v8::internal::NULL, and Scope::zone().
Referenced by Scope::LookupRecursive().
|
protected |
Definition at line 964 of file scopes.cc.
References Scope::already_resolved(), ASSERT, Scope::BOUND, Scope::BOUND_EVAL_SHADOWED, Scope::calls_sloppy_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().
|
inline |
Definition at line 378 of file scopes.h.
References Scope::module_var_.
|
protected |
Definition at line 1172 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 1192 of file scopes.cc.
References Variable::has_forced_context_allocation(), Scope::has_forced_context_allocation(), Scope::inner_scope_calls_eval_, v8::internal::INTERNAL, 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 505 of file scopes.cc.
References Scope::already_resolved(), ASSERT, v8::internal::INTERNAL, Scope::internals_, v8::internal::kCreatedInitialized, Variable::NORMAL, and Scope::zone().
Referenced by Scope::AllocateModulesRecursively().
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 List< T, P >::Add(), Scope::already_resolved(), ASSERT, Scope::interface(), and Scope::unresolved_.
Referenced by ParserTraits::ExpressionFromIdentifier().
|
protected |
Definition at line 943 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 369 of file scopes.h.
References Scope::num_heap_slots_.
Referenced by Scope::ContextLocalCount(), ScopeInfo::Create(), and CompilationInfo::num_heap_slots().
|
inline |
Definition at line 375 of file scopes.h.
References Scope::num_modules_.
|
inline |
Definition at line 338 of file scopes.h.
References Scope::params_.
Referenced by ScopeInfo::Create(), OptimizedCompileJob::CreateGraph(), CompilationInfo::num_parameters(), and HOptimizedGraphBuilder::SetUpScope().
|
inline |
Definition at line 368 of file scopes.h.
References Scope::num_stack_slots_.
Referenced by ScopeInfo::Create(), OptimizedCompileJob::CreateGraph(), and Scope::StackLocalCount().
|
inline |
Definition at line 365 of file scopes.h.
References Scope::num_var_or_const_.
Referenced by Scope::FinalizeBlockScope().
|
inline |
Definition at line 350 of file scopes.h.
References Scope::outer_scope_.
Referenced by Scope::Analyze(), Scope::DeclarationScope(), Scope::FinalizeBlockScope(), Scope::GlobalScope(), and Scope::Initialize().
|
inline |
Definition at line 303 of file scopes.h.
References Scope::outer_scope_calls_sloppy_eval_.
Referenced by Scope::AllocateVariables(), and CompilationInfo::DisableOptimization().
|
inline |
Definition at line 333 of file scopes.h.
References ASSERT, Scope::is_function_scope(), and Scope::params_.
Referenced by ScopeInfo::Create().
|
protected |
Definition at line 1151 of file scopes.cc.
References Scope::calls_sloppy_eval(), Scope::force_eager_compilation_, Scope::inner_scope_calls_eval_, Scope::inner_scopes_, Scope::outer_scope_calls_sloppy_eval_, Scope::PropagateScopeInfo(), and Scope::scope_calls_eval_.
Referenced by Scope::AllocateVariables(), Scope::DeserializeScopeChain(), and Scope::PropagateScopeInfo().
|
inline |
Definition at line 322 of file scopes.h.
References Scope::receiver_.
Referenced by Scope::Initialize(), and ParserTraits::ThisExpression().
|
inline |
Definition at line 234 of file scopes.h.
References Scope::is_global_scope(), and Scope::scope_calls_eval_.
Referenced by ParserTraits::CheckPossibleEvalCall().
|
inline |
Definition at line 231 of file scopes.h.
References Scope::scope_contains_with_.
Referenced by Scope::DeserializeScopeChain().
void RemoveUnresolved | ( | VariableProxy * | var | ) |
Definition at line 493 of file scopes.cc.
References List< T, P >::Remove(), and Scope::unresolved_.
|
protected |
Definition at line 1027 of file scopes.cc.
References ASSERT, 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(), Variable::is_const_mode(), Variable::is_dynamic(), Scope::is_global_scope(), Variable::IsGlobalObjectProperty(), CompilationInfo::isolate(), Scope::LookupRecursive(), Variable::name(), Factory::NewJSArray(), Factory::NewSyntaxError(), NONE, Scope::NonLocal(), v8::internal::NULL, v8::internal::PrintF(), CompilationInfo::script(), Variable::set_local_if_not_shadowed(), JSObject::SetElement(), v8::internal::STRICT, Scope::strict_mode(), Scope::UNBOUND, Scope::UNBOUND_EVAL_SHADOWED, v8::internal::USE(), and Scope::zone().
Referenced by Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 1131 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 316 of file scopes.h.
References Scope::scope_type_.
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 266 of file scopes.h.
References Scope::end_position_.
|
inline |
Definition at line 262 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_.
Definition at line 111 of file scopes.h.
References Scope::scope_name_.
|
inline |
Definition at line 237 of file scopes.h.
References Scope::strict_mode(), and Scope::strict_mode_.
int StackLocalCount | ( | ) | const |
Definition at line 1392 of file scopes.cc.
References Scope::function_, v8::internal::NULL, and Scope::num_stack_slots().
Referenced by ScopeInfo::Create().
|
inline |
Definition at line 261 of file scopes.h.
References Scope::start_position_.
Referenced by Scope::GetNestedScopeChain().
|
inline |
Definition at line 319 of file scopes.h.
References Scope::strict_mode_.
Referenced by Scope::AllocateParameterLocals(), ScopeInfo::Create(), Scope::ResolveVariable(), and Scope::SetStrictMode().
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::NewInternal(), Scope::NewTemporary(), Scope::NonLocal(), and Scope::ResolveVariable().
|
protected |
Definition at line 502 of file scopes.h.
Referenced by Scope::already_resolved().
|
protected |
Definition at line 472 of file scopes.h.
Referenced by Scope::AllocateParameterLocals(), and Scope::arguments().
|
protected |
Definition at line 466 of file scopes.h.
Referenced by Scope::AddDeclaration(), Scope::CheckConflictingVarDeclarations(), and Scope::declarations().
|
protected |
Definition at line 462 of file scopes.h.
Referenced by Scope::NonLocal().
|
protected |
Definition at line 492 of file scopes.h.
Referenced by Scope::end_position(), and Scope::set_end_position().
|
protected |
Definition at line 498 of file scopes.h.
Referenced by Scope::ForceContextAllocation(), and Scope::has_forced_context_allocation().
|
protected |
Definition at line 497 of file scopes.h.
Referenced by Scope::AllowsLazyCompilation(), Scope::AllowsLazyCompilationWithoutContext(), Scope::ForceEagerCompilation(), and Scope::PropagateScopeInfo().
|
protected |
Definition at line 470 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::ContextLocalCount(), Scope::DeclareFunctionVar(), Scope::function(), Scope::LookupFunctionVar(), and Scope::StackLocalCount().
|
protected |
Definition at line 477 of file scopes.h.
Referenced by Scope::HasIllegalRedeclaration(), Scope::SetIllegalRedeclaration(), and Scope::VisitIllegalRedeclaration().
|
protected |
Definition at line 496 of file scopes.h.
Referenced by Scope::MustAllocate(), Scope::MustAllocateInContext(), and Scope::PropagateScopeInfo().
Definition at line 441 of file scopes.h.
Referenced by Scope::AllocateModulesRecursively(), Scope::AllocateVariablesRecursively(), Scope::FinalizeBlockScope(), Scope::GetNestedScopeChain(), Scope::Initialize(), Scope::inner_scopes(), Scope::PropagateScopeInfo(), and Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 474 of file scopes.h.
Referenced by Scope::AllocateModulesRecursively(), and Scope::interface().
Definition at line 456 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CollectStackAndContextLocals(), Scope::FinalizeBlockScope(), and Scope::NewInternal().
|
protected |
Definition at line 437 of file scopes.h.
Referenced by Scope::AllocateModulesRecursively(), Scope::AllocateNonParameterLocal(), Scope::AllocateParameterLocals(), Scope::HasArgumentsParameter(), and Scope::Initialize().
|
protected |
Definition at line 515 of file scopes.h.
Referenced by Scope::AllocateModulesRecursively(), and Scope::module_var().
|
protected |
Definition at line 509 of file scopes.h.
Referenced by Scope::AllocateHeapSlot(), Scope::AllocateVariablesRecursively(), and Scope::num_heap_slots().
|
protected |
Definition at line 512 of file scopes.h.
Referenced by Scope::AllocateModulesRecursively(), Scope::AllocateVariables(), and Scope::num_modules().
|
protected |
Definition at line 508 of file scopes.h.
Referenced by Scope::AllocateStackSlot(), Scope::AllocateVariablesRecursively(), and Scope::num_stack_slots().
|
protected |
Definition at line 505 of file scopes.h.
Referenced by Scope::DeclareLocal(), and Scope::num_var_or_const().
|
protected |
Definition at line 440 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 495 of file scopes.h.
Referenced by Scope::outer_scope_calls_sloppy_eval(), and Scope::PropagateScopeInfo().
Definition at line 460 of file scopes.h.
Referenced by Scope::AllocateParameterLocals(), Scope::DeclareParameter(), Scope::FinalizeBlockScope(), Scope::HasArgumentsParameter(), Scope::num_parameters(), and Scope::parameter().
|
protected |
Definition at line 468 of file scopes.h.
Referenced by Scope::Initialize(), and Scope::receiver().
|
protected |
Definition at line 487 of file scopes.h.
Referenced by Scope::calls_eval(), Scope::calls_sloppy_eval(), Scope::MustAllocate(), Scope::MustAllocateInContext(), Scope::PropagateScopeInfo(), and Scope::RecordEvalCall().
|
protected |
Definition at line 484 of file scopes.h.
Referenced by Scope::contains_with(), Scope::MustAllocate(), Scope::MustAllocateInContext(), and Scope::RecordWithStatement().
Definition at line 518 of file scopes.h.
Referenced by Scope::GetScopeInfo().
|
protected |
Definition at line 482 of file scopes.h.
Referenced by Scope::DeserializeScopeChain(), Scope::HasTrivialOuterContext(), Scope::Initialize(), and Scope::inside_with().
Definition at line 447 of file scopes.h.
Referenced by Scope::SetScopeName().
|
protected |
Definition at line 444 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::scope_type().
|
protected |
Definition at line 491 of file scopes.h.
Referenced by Scope::set_start_position(), and Scope::start_position().
|
protected |
Definition at line 489 of file scopes.h.
Referenced by Scope::calls_sloppy_eval(), Scope::is_strict_eval_scope(), Scope::SetStrictMode(), and Scope::strict_mode().
Definition at line 458 of file scopes.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CollectStackAndContextLocals(), Scope::FinalizeBlockScope(), and Scope::NewTemporary().
|
protected |
Definition at line 464 of file scopes.h.
Referenced by Scope::FinalizeBlockScope(), Scope::NewUnresolved(), Scope::RemoveUnresolved(), and Scope::ResolveVariablesRecursively().
|
protected |
Definition at line 454 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().