V8 Project
v8::internal::Declaration Class Referenceabstract

#include <ast.h>

+ Inheritance diagram for v8::internal::Declaration:
+ Collaboration diagram for v8::internal::Declaration:

Public Member Functions

VariableProxy * proxy () const
 
VariableMode mode () const
 
Scopescope () const
 
virtual InitializationFlag initialization () const =0
 
virtual bool IsInlineable () const
 
- Public Member Functions inherited from v8::internal::AstNode
void * operator new (size_t size, Zone *zone)
 
 AstNode (int position)
 
virtual ~AstNode ()
 
virtual void Accept (AstVisitor *v)=0
 
virtual NodeType node_type () const =0
 
int position () const
 
virtual TargetCollector * AsTargetCollector ()
 
virtual BreakableStatementAsBreakableStatement ()
 
virtual IterationStatementAsIterationStatement ()
 
virtual MaterializedLiteralAsMaterializedLiteral ()
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Protected Member Functions

 Declaration (Zone *zone, VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
 

Private Attributes

VariableProxy * proxy_
 
VariableMode mode_
 
Scopescope_
 

Additional Inherited Members

- Public Types inherited from v8::internal::AstNode
enum  NodeType { kInvalid = -1 }
 
- Static Protected Member Functions inherited from v8::internal::AstNode
static TypeFeedbackId reuse (BailoutId id)
 

Detailed Description

Definition at line 487 of file ast.h.

Constructor & Destructor Documentation

◆ Declaration()

v8::internal::Declaration::Declaration ( Zone zone,
VariableProxy *  proxy,
VariableMode  mode,
Scope scope,
int  pos 
)
inlineprotected

Definition at line 496 of file ast.h.

501  : AstNode(pos),
502  proxy_(proxy),
503  mode_(mode),
504  scope_(scope) {
506  }
AstNode(int position)
Definition: ast.h:213
VariableMode mode() const
Definition: ast.h:490
Scope * scope() const
Definition: ast.h:491
VariableProxy * proxy_
Definition: ast.h:509
VariableMode mode_
Definition: ast.h:510
VariableProxy * proxy() const
Definition: ast.h:489
#define DCHECK(condition)
Definition: logging.h:205
bool IsDeclaredVariableMode(VariableMode mode)
Definition: globals.h:705

References DCHECK, v8::internal::IsDeclaredVariableMode(), and mode().

+ Here is the call graph for this function:

Member Function Documentation

◆ initialization()

virtual InitializationFlag v8::internal::Declaration::initialization ( ) const
pure virtual

◆ IsInlineable()

bool v8::internal::Declaration::IsInlineable ( ) const
virtual

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

Definition at line 547 of file ast.cc.

547  {
548  return proxy()->var()->IsStackAllocated();
549 }

References proxy().

+ Here is the call graph for this function:

◆ mode()

VariableMode v8::internal::Declaration::mode ( ) const
inline

Definition at line 490 of file ast.h.

490 { return mode_; }

References mode_.

Referenced by v8::internal::Scope::CheckConflictingVarDeclarations(), Declaration(), and v8::internal::Parser::Declare().

+ Here is the caller graph for this function:

◆ proxy()

VariableProxy* v8::internal::Declaration::proxy ( ) const
inline

Definition at line 489 of file ast.h.

489 { return proxy_; }

References proxy_.

Referenced by v8::internal::Scope::CheckConflictingVarDeclarations(), v8::internal::Parser::CheckConflictingVarDeclarations(), v8::internal::Parser::Declare(), v8::internal::Parser::DesugarLetBindingsInForStatement(), and IsInlineable().

+ Here is the caller graph for this function:

◆ scope()

Scope* v8::internal::Declaration::scope ( ) const
inline

Definition at line 491 of file ast.h.

491 { return scope_; }

References scope_.

Referenced by v8::internal::Scope::CheckConflictingVarDeclarations().

+ Here is the caller graph for this function:

Member Data Documentation

◆ mode_

VariableMode v8::internal::Declaration::mode_
private

Definition at line 510 of file ast.h.

Referenced by mode().

◆ proxy_

VariableProxy* v8::internal::Declaration::proxy_
private

Definition at line 509 of file ast.h.

Referenced by proxy().

◆ scope_

Scope* v8::internal::Declaration::scope_
private

Definition at line 513 of file ast.h.

Referenced by scope().


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