Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Public Member Functions | Static Public Member Functions | List of all members
RefDerefExpr Class Reference

Expression that represents dereferencing a reference to get its value. More...

#include <expr.h>

Inheritance diagram for RefDerefExpr:
Inheritance graph
[legend]
Collaboration diagram for RefDerefExpr:
Collaboration graph
[legend]

Public Member Functions

 RefDerefExpr (Expr *e, SourcePos p)
 
const TypeGetType () const
 
void Print () const
 
ExprTypeCheck ()
 
int EstimateCost () const
 
- Public Member Functions inherited from DerefExpr
 DerefExpr (Expr *e, SourcePos p, unsigned scid=DerefExprID)
 
llvm::Value * GetValue (FunctionEmitContext *ctx) const
 
llvm::Value * GetLValue (FunctionEmitContext *ctx) const
 
const TypeGetLValueType () const
 
SymbolGetBaseSymbol () const
 
ExprOptimize ()
 
- Public Member Functions inherited from Expr
 Expr (SourcePos p, unsigned scid)
 
virtual std::pair< llvm::Constant *, bool > GetStorageConstant (const Type *type) const
 
virtual std::pair< llvm::Constant *, bool > GetConstant (const Type *type) const
 
- Public Member Functions inherited from ASTNode
 ASTNode (SourcePos p, unsigned scid)
 
virtual ~ASTNode ()
 
unsigned getValueID () const
 

Static Public Member Functions

static bool classof (RefDerefExpr const *)
 
static bool classof (ASTNode const *N)
 
- Static Public Member Functions inherited from DerefExpr
static bool classof (DerefExpr const *)
 
static bool classof (ASTNode const *N)
 
- Static Public Member Functions inherited from Expr
static bool classof (Expr const *)
 
static bool classof (ASTNode const *N)
 
- Static Public Member Functions inherited from ASTNode
static bool classof (ASTNode const *)
 

Additional Inherited Members

- Public Types inherited from ASTNode
enum  ASTNodeTy {
  AddressOfExprID, AssignExprID, BinaryExprID, ConstExprID,
  DerefExprID, PtrDerefExprID, RefDerefExprID, ExprListID,
  FunctionCallExprID, FunctionSymbolExprID, IndexExprID, StructMemberExprID,
  VectorMemberExprID, NewExprID, NullPointerExprID, ReferenceExprID,
  SelectExprID, SizeOfExprID, SymbolExprID, SyncExprID,
  TypeCastExprID, UnaryExprID, MaxExprID, AssertStmtID,
  BreakStmtID, CaseStmtID, ContinueStmtID, DeclStmtID,
  DefaultStmtID, DeleteStmtID, DoStmtID, ExprStmtID,
  ForeachActiveStmtID, ForeachStmtID, ForeachUniqueStmtID, ForStmtID,
  GotoStmtID, IfStmtID, LabeledStmtID, PrintStmtID,
  ReturnStmtID, StmtListID, SwitchStmtID, UnmaskedStmtID
}
 
- Public Attributes inherited from DerefExpr
Exprexpr
 
- Public Attributes inherited from ASTNode
SourcePos pos
 

Detailed Description

Expression that represents dereferencing a reference to get its value.

Definition at line 572 of file expr.h.

Constructor & Destructor Documentation

◆ RefDerefExpr()

RefDerefExpr::RefDerefExpr ( Expr e,
SourcePos  p 
)

Definition at line 7334 of file expr.cpp.

Member Function Documentation

◆ classof() [1/2]

static bool RefDerefExpr::classof ( RefDerefExpr const *  )
inlinestatic

Definition at line 576 of file expr.h.

◆ classof() [2/2]

static bool RefDerefExpr::classof ( ASTNode const *  N)
inlinestatic

◆ EstimateCost()

int RefDerefExpr::EstimateCost ( ) const
virtual

Estimate the execution cost of the node (not including the cost of the children. The value returned should be based on the COST_* enumerant values defined in ispc.h.

Implements ASTNode.

Definition at line 7362 of file expr.cpp.

References COST_DEREF, and DerefExpr::expr.

◆ GetType()

const Type * RefDerefExpr::GetType ( ) const
virtual

Returns the Type of the expression.

Implements Expr.

Definition at line 7336 of file expr.cpp.

References AssertPos, Module::errorCount, DerefExpr::expr, Type::GetReferenceTarget(), Expr::GetType(), and m.

Referenced by Print().

◆ Print()

void RefDerefExpr::Print ( ) const
virtual

Prints the expression to standard output (used for debugging).

Implements Expr.

Definition at line 7369 of file expr.cpp.

References DerefExpr::expr, GetType(), Expr::Print(), and SourcePos::Print().

◆ TypeCheck()

Expr * RefDerefExpr::TypeCheck ( )
virtual

This method should perform type checking of the expression and return a pointer to the resulting expression. If an error is encountered, NULL should be returned.

Implements Expr.

Definition at line 7347 of file expr.cpp.

References AssertPos, Module::errorCount, DerefExpr::expr, Expr::GetType(), and m.


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