expression_indirect_store Class Reference

#include <indirect_store.h>

Inheritance diagram for expression_indirect_store:

expression List of all members.

Public Member Functions

virtual ~expression_indirect_store ()
 expression_indirect_store (const expression::pointer &lhs, const expression::pointer &rhs, const type::pointer &tp, translator_compile *cntxt)
void traversal (int pprec)
void logical_traversal (int pprec, label::pointer &true_branch, label::pointer &false_branch, bool fall_through_preference)
int get_precedence () const
type::pointer get_type () const
bool is_lvalue () const
side_effect_t has_side_effect () const
expression::pointer optimize () const

Private Member Functions

 expression_indirect_store ()
 expression_indirect_store (const expression_indirect_store &)
expression_indirect_storeoperator= (const expression_indirect_store &)

Private Attributes

translator_compilecode
expression::pointer lhs
expression::pointer rhs
type::pointer storing_type

Detailed Description

The expression_indirect_store class is used to represent the code generation necessary for an indirect store.

Definition at line 32 of file indirect_store.h.


Constructor & Destructor Documentation

virtual expression_indirect_store::~expression_indirect_store (  )  [virtual]

The destructor.

expression_indirect_store::expression_indirect_store ( const expression::pointer lhs,
const expression::pointer rhs,
const type::pointer tp,
translator_compile cntxt 
)

The constructor.

expression_indirect_store::expression_indirect_store (  )  [private]

The default constructor.

expression_indirect_store::expression_indirect_store ( const expression_indirect_store  )  [private]

The copy constructor.


Member Function Documentation

void expression_indirect_store::traversal ( int  pprec  )  [virtual]

The traversal method may be used to traverse each of the declaractions in the list.

Parameters:
pprec The precedence of the parent expression node.

Implements expression.

void expression_indirect_store::logical_traversal ( int  pprec,
label::pointer true_branch,
label::pointer false_branch,
bool  fall_through_preference 
)

int expression_indirect_store::get_precedence (  )  const [virtual]

The get_precedence method is used to obtain the precedence of this expression node.

The highest precedence has the highest absolute value, the lowest precedence gets the lowest absolute value.

Implements expression.

type::pointer expression_indirect_store::get_type (  )  const [virtual]

The get_type method is used to get the type of this expression.

Implements expression.

bool expression_indirect_store::is_lvalue (  )  const [virtual]

The is_lvalue method is used to determine whether or not this expression is suitable to appear on the left hand side of an assignment expression.

Implements expression.

side_effect_t expression_indirect_store::has_side_effect (  )  const [virtual]

The has_side_effect method is used to determine if an expression has any effect. It is used by the parse to produce "statement with no effect" warnings.

Implements expression.

expression::pointer expression_indirect_store::optimize (  )  const [virtual]

The optimize method may be used to evaluate constant expressions, or substitute more efficient expressions.

This is intended to be called by the translator:: expression_statement method, or similar, where the expression is in its final form, and will get no deeper. In other words, when all available information has been provided.

There is no default implementation, even though most optimize implementations return self(), because this gives the compiler no opportunity to remind the authors of new classes that they have forgotten something.

Returns:
If the expression tree is not constant, or it is already as reduced as it can get, it returns itself. Otherwise, it returns a new expression node.

Implements expression.

expression_indirect_store& expression_indirect_store::operator= ( const expression_indirect_store  )  [private]

The assignment operator.


Member Data Documentation

translator_compile& expression_indirect_store::code [private]

The code instance variable i sused to remember where to send our generted code.

Definition at line 75 of file indirect_store.h.

expression::pointer expression_indirect_store::lhs [private]

The lhs instance variable is used to remember the address of left hand side of the assignment.

Definition at line 81 of file indirect_store.h.

expression::pointer expression_indirect_store::rhs [private]

The rhs instance variable is used to remember the value o be assigned.

Definition at line 87 of file indirect_store.h.

type::pointer expression_indirect_store::storing_type [private]

The storing_type instance variable is used to remember the type of value to be stored.

Definition at line 93 of file indirect_store.h.


The documentation for this class was generated from the following file:
Generated on Sun Feb 25 01:27:11 2007 for UCSDp-SystemCrossCompiler by  doxygen 1.5.1