Public Member Functions | Private Attributes

OA::RefOp Class Reference

#include <MemRefExpr.hpp>

Inheritance diagram for OA::RefOp:
Inheritance graph
[legend]
Collaboration diagram for OA::RefOp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RefOp (MemRefType mrType, OA_ptr< MemRefExpr > mre)
 RefOp (RefOp &mre)
 copy constructor
virtual ~RefOp ()
bool isaRefOp ()
SymHandle getBaseSym ()
virtual std::string typeString ()
OA_ptr< MemRefExprgetBase ()
OA_ptr< MemRefExprgetMemRefExpr ()
 Return the MRE that decorating this object.
virtual OA_ptr< MemRefExprcomposeWith (OA_ptr< MemRefExpr > mre)=0
 Will make this Refop wrap the given mre and return the result.
virtual void output (IRHandlesIRInterface &ir)

Private Attributes

OA_ptr< MemRefExprmMRE

Detailed Description

The RefOp implements a decorator pattern for memory references. If we decorate a memory reference with a RefOp it represents either a dereference or referencing a subset of a location (eg. field access or array access).

Definition at line 387 of file MemRefExpr.hpp.


Constructor & Destructor Documentation

OA::RefOp::RefOp ( MemRefType  mrType,
OA_ptr< MemRefExpr mre 
) [inline]

Definition at line 390 of file MemRefExpr.hpp.

OA::RefOp::RefOp ( RefOp mre  )  [inline]

copy constructor

Definition at line 395 of file MemRefExpr.hpp.

virtual OA::RefOp::~RefOp (  )  [inline, virtual]

Definition at line 397 of file MemRefExpr.hpp.


Member Function Documentation

virtual OA_ptr<MemRefExpr> OA::RefOp::composeWith ( OA_ptr< MemRefExpr mre  )  [pure virtual]

Will make this Refop wrap the given mre and return the result.

Implemented in OA::AddressOf, OA::Deref, and OA::SubSetRef.

OA_ptr< MemRefExpr > OA::RefOp::getBase (  ) 

iterate up through every decorating MRE until we find the base and return it.

Definition at line 335 of file MemRefExpr.cpp.

SymHandle OA::RefOp::getBaseSym (  ) 

iterate up every decorating MRE until we find the base, then return the symbol handle for this base.

Definition at line 319 of file MemRefExpr.cpp.

References OA::OA_ptr< T >::convert(), and mMRE.

Here is the call graph for this function:

OA_ptr<MemRefExpr> OA::RefOp::getMemRefExpr (  )  [inline]

Return the MRE that decorating this object.

Definition at line 418 of file MemRefExpr.hpp.

References mMRE.

Referenced by NotationGenerator::outputMemRefExpr(), and OA::DUG::CreateLocationVisitor::visitSubSetRef().

bool OA::RefOp::isaRefOp (  )  [inline, virtual]

Reimplemented from OA::MemRefExpr.

Definition at line 402 of file MemRefExpr.hpp.

void OA::RefOp::output ( IRHandlesIRInterface ir  )  [virtual]

Reimplemented from OA::MemRefExpr.

Reimplemented in OA::AddressOf, OA::Deref, OA::SubSetRef, OA::IdxAccess, OA::IdxExprAccess, and OA::FieldAccess.

Definition at line 350 of file MemRefExpr.cpp.

virtual std::string OA::RefOp::typeString (  )  [inline, virtual]

Reimplemented from OA::MemRefExpr.

Reimplemented in OA::AddressOf, OA::Deref, OA::SubSetRef, OA::IdxAccess, OA::IdxExprAccess, and OA::FieldAccess.

Definition at line 411 of file MemRefExpr.hpp.


Member Data Documentation

Definition at line 438 of file MemRefExpr.hpp.

Referenced by getBaseSym(), and getMemRefExpr().


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