v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Variable Class Reference

#include <variables.h>

Inheritance diagram for Variable:
Collaboration diagram for Variable:

Public Types

enum  Kind { NORMAL, THIS, ARGUMENTS }
 
enum  Location {
  UNALLOCATED, PARAMETER, LOCAL, CONTEXT,
  LOOKUP
}
 

Public Member Functions

 Variable (Scope *scope, Handle< String > name, VariableMode mode, bool is_valid_lhs, Kind kind, InitializationFlag initialization_flag, Interface *interface=Interface::NewValue())
 
bool IsValidLeftHandSide ()
 
Scopescope () const
 
Handle< Stringname () const
 
VariableMode mode () const
 
bool has_forced_context_allocation () const
 
void ForceContextAllocation ()
 
bool is_used ()
 
void set_is_used (bool flag)
 
int initializer_position ()
 
void set_initializer_position (int pos)
 
bool IsVariable (Handle< String > n) const
 
bool IsUnallocated () const
 
bool IsParameter () const
 
bool IsStackLocal () const
 
bool IsStackAllocated () const
 
bool IsContextSlot () const
 
bool IsLookupSlot () const
 
bool IsGlobalObjectProperty () const
 
bool is_dynamic () const
 
bool is_const_mode () const
 
bool binding_needs_init () const
 
bool is_this () const
 
bool is_arguments () const
 
bool is_possibly_eval () const
 
Variablelocal_if_not_shadowed () const
 
void set_local_if_not_shadowed (Variable *local)
 
Location location () const
 
int index () const
 
InitializationFlag initialization_flag () const
 
Interfaceinterface () const
 
void AllocateTo (Location location, int index)
 
- Public Member Functions inherited from ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Static Public Member Functions

static const char * Mode2String (VariableMode mode)
 
static int CompareIndex (Variable *const *v, Variable *const *w)
 

Detailed Description

Definition at line 42 of file variables.h.

Member Enumeration Documentation

enum Kind
Enumerator
NORMAL 
THIS 
ARGUMENTS 

Definition at line 44 of file variables.h.

enum Location
Enumerator
UNALLOCATED 
PARAMETER 
LOCAL 
CONTEXT 
LOOKUP 

Definition at line 50 of file variables.h.

Constructor & Destructor Documentation

Variable ( Scope scope,
Handle< String name,
VariableMode  mode,
bool  is_valid_lhs,
Kind  kind,
InitializationFlag  initialization_flag,
Interface interface = Interface::NewValue() 
)

Definition at line 57 of file variables.cc.

References ASSERT, v8::internal::kNeedsInitialization, and v8::internal::VAR.

Member Function Documentation

bool binding_needs_init ( ) const
inline

Definition at line 125 of file variables.h.

References v8::internal::kNeedsInitialization.

int CompareIndex ( Variable *const *  v,
Variable *const *  w 
)
static

Definition at line 92 of file variables.cc.

Referenced by ScopeInfo::Create().

void ForceContextAllocation ( )
inline

Definition at line 101 of file variables.h.

References ASSERT, and v8::internal::TEMPORARY.

Referenced by Scope::AllocateParameterLocals(), and Scope::LookupRecursive().

bool has_forced_context_allocation ( ) const
inline

Definition at line 98 of file variables.h.

Referenced by Scope::MustAllocate(), and Scope::MustAllocateInContext().

int index ( ) const
inline

Definition at line 147 of file variables.h.

Referenced by Variable::AllocateTo(), ScopeInfo::Create(), and Scope::LinkModules().

InitializationFlag initialization_flag ( ) const
inline

Definition at line 148 of file variables.h.

Referenced by ScopeInfo::Create().

int initializer_position ( )
inline

Definition at line 108 of file variables.h.

Interface* interface ( ) const
inline

Definition at line 151 of file variables.h.

Referenced by Scope::ResolveVariable().

bool is_arguments ( ) const
inline

Definition at line 130 of file variables.h.

References Variable::ARGUMENTS.

bool is_const_mode ( ) const
inline

Definition at line 124 of file variables.h.

References v8::internal::IsImmutableVariableMode().

Referenced by Scope::LinkModules().

bool is_dynamic ( ) const
inline

Definition at line 123 of file variables.h.

References v8::internal::IsDynamicVariableMode().

Referenced by Scope::ResolveVariable().

bool is_possibly_eval ( ) const
inline

Definition at line 133 of file variables.h.

References FACTORY, and Variable::IsVariable().

bool is_this ( ) const
inline

Definition at line 129 of file variables.h.

References Variable::THIS.

Referenced by VariableProxy::BindTo(), Variable::IsVariable(), and Scope::MustAllocate().

bool is_used ( )
inline
bool IsGlobalObjectProperty ( ) const
bool IsLookupSlot ( ) const
inline

Definition at line 120 of file variables.h.

References Variable::LOOKUP.

bool IsParameter ( ) const
inline

Definition at line 116 of file variables.h.

References Variable::PARAMETER.

Referenced by Scope::AllocateParameterLocals(), and Variable::IsStackAllocated().

bool IsStackAllocated ( ) const
inline

Definition at line 118 of file variables.h.

References Variable::IsParameter(), and Variable::IsStackLocal().

bool IsUnallocated ( ) const
inline
bool IsValidLeftHandSide ( )
inline

Definition at line 88 of file variables.h.

bool IsVariable ( Handle< String n) const
inline
Variable* local_if_not_shadowed ( ) const
inline

Definition at line 137 of file variables.h.

References ASSERT, v8::internal::DYNAMIC_LOCAL, and v8::internal::NULL.

Location location ( ) const
inline

Definition at line 146 of file variables.h.

Referenced by Variable::AllocateTo().

Scope* scope ( ) const
inline

Definition at line 94 of file variables.h.

Referenced by Scope::AllocateNonParameterLocal(), and Scope::AllocateParameterLocals().

void set_initializer_position ( int  pos)
inline

Definition at line 109 of file variables.h.

void set_is_used ( bool  flag)
inline

Definition at line 106 of file variables.h.

References v8::internal::flag.

Referenced by VariableProxy::BindTo(), and Scope::MustAllocate().

void set_local_if_not_shadowed ( Variable local)
inline

Definition at line 142 of file variables.h.

Referenced by Scope::ResolveVariable().


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