V8 Project
v8::internal::AstNode::IdGen Class Reference

#include <ast.h>

+ Collaboration diagram for v8::internal::AstNode::IdGen:

Public Member Functions

 IdGen (int id=0)
 
int GetNextId ()
 
int ReserveIdRange (int n)
 

Private Attributes

int id_
 

Detailed Description

Definition at line 187 of file ast.h.

Constructor & Destructor Documentation

◆ IdGen()

v8::internal::AstNode::IdGen::IdGen ( int  id = 0)
inlineexplicit

Definition at line 189 of file ast.h.

189 : id_(id) {}

Member Function Documentation

◆ GetNextId()

int v8::internal::AstNode::IdGen::GetNextId ( )
inline

Definition at line 191 of file ast.h.

191 { return ReserveIdRange(1); }
int ReserveIdRange(int n)
Definition: ast.h:192

References ReserveIdRange().

+ Here is the call graph for this function:

◆ ReserveIdRange()

int v8::internal::AstNode::IdGen::ReserveIdRange ( int  n)
inline

Definition at line 192 of file ast.h.

192  {
193  int tmp = id_;
194  id_ += n;
195  return tmp;
196  }

References id_.

Referenced by GetNextId().

+ Here is the caller graph for this function:

Member Data Documentation

◆ id_

int v8::internal::AstNode::IdGen::id_
private

Definition at line 199 of file ast.h.

Referenced by ReserveIdRange().


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