Polaris: ArrayRefExpr Class Reference

ArrayRefExpr Class Reference

An expression representing an array reference. More...

#include <ArrayRefExpr.h>

Inheritance diagram for ArrayRefExpr:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ArrayRefExpr (const Type &etype, Expression *array_exp, Expression *subscript_exp)
 ArrayRefExpr (const ArrayRefExpr &e)
virtual ~ArrayRefExpr ()
 Note: The following data fields are aliased: array = left subscript = right.
virtual ArrayRefExproperator= (const ArrayRefExpr &)
const Expressionarray () const
Expressionarray ()
virtual void array (Expression *)
 Access the variable name of the array reference.
const Expressionsubscript () const
Expressionsubscript ()
virtual void subscript (Expression *)
 Access the subscript expression of the array reference.
virtual Expressionclone () const
 Return a copy of myself.
virtual int structures_OK () const
 Return 1 if my structures are in a valid state.
virtual void convert (BinRep &exprSet, Symtab &symtab)
 Read in the values of my fields and my subexpressions from the given BinRep object.
virtual void print_debug (ostream &o, Boolean debug) const
 See Expression.h.
virtual const Symbolbase_variable_ref () const
 base_symbol If I am an IDExpr or an ArrayRefExpr, return the name of myself, otherwise return NULL.
virtual Symbolbase_variable_ref ()
 See Expression.h.
virtual int exchange_expr (VDL &vdl)
 Create a node in the "expression" member and return the index.

Protected Member Functions

 ArrayRefExpr (const Type &etype)

Protected Attributes

Arc_type_arcs

Friends

class ExprTable
class DDgraph

Detailed Description

An expression representing an array reference.

Polaris Expression

See also:
Expression/ArrayRefExpr.h

Expression/ArrayRefExpr.h

Expression/Expression.cc

Description

An ArrayRefExpr is an array reference. It consists of an array name and a subscripting expression.

USE: array is an IDExpr subscript is a CommaExpr

Definition at line 33 of file ArrayRefExpr.h.


Constructor & Destructor Documentation

ArrayRefExpr::ArrayRefExpr const Type etype,
Expression array_exp,
Expression subscript_exp
[inline]
 

Definition at line 97 of file ArrayRefExpr.h.

References _arcs, ARRAY_REF_OP, COMMA_OP, and ID_OP.

Referenced by clone().

ArrayRefExpr::ArrayRefExpr const ArrayRefExpr e  )  [inline]
 

Definition at line 111 of file ArrayRefExpr.h.

References _arcs, and e.

ArrayRefExpr::~ArrayRefExpr  )  [virtual]
 

Note: The following data fields are aliased: array = left subscript = right.

Definition at line 3393 of file Expression.cc.

References _arcs.

ArrayRefExpr::ArrayRefExpr const Type etype  )  [inline, protected]
 

Definition at line 90 of file ArrayRefExpr.h.

References _arcs, and ARRAY_REF_OP.


Member Function Documentation

ArrayRefExpr & ArrayRefExpr::operator= const ArrayRefExpr  )  [virtual]
 

Definition at line 3406 of file Expression.cc.

References _arcs, e, and BinaryExpr::operator=().

const Expression& ArrayRefExpr::array  )  const [inline, virtual]
 

Reimplemented from Expression.

Definition at line 45 of file ArrayRefExpr.h.

References BinaryExpr::_left_guarded().

Referenced by base_variable_ref().

Expression& ArrayRefExpr::array  )  [inline, virtual]
 

Reimplemented from Expression.

Definition at line 49 of file ArrayRefExpr.h.

References BinaryExpr::_left_guarded().

void ArrayRefExpr::array Expression  )  [virtual]
 

Access the variable name of the array reference.

This expression should always be an IDExpr.

Reimplemented from Expression.

Definition at line 3417 of file Expression.cc.

References BinaryExpr::_left(), e, ID_OP, and Expression::op().

const Expression& ArrayRefExpr::subscript  )  const [inline, virtual]
 

Reimplemented from Expression.

Definition at line 57 of file ArrayRefExpr.h.

References BinaryExpr::_right_guarded().

Expression& ArrayRefExpr::subscript  )  [inline, virtual]
 

Reimplemented from Expression.

Definition at line 61 of file ArrayRefExpr.h.

References BinaryExpr::_right_guarded().

void ArrayRefExpr::subscript Expression  )  [virtual]
 

Access the subscript expression of the array reference.

This expression should always be a CommaExpr.

Reimplemented from Expression.

Definition at line 3425 of file Expression.cc.

References BinaryExpr::_right(), COMMA_OP, e, and Expression::op().

Expression * ArrayRefExpr::clone  )  const [virtual]
 

Return a copy of myself.

Reimplemented from BinaryExpr.

Definition at line 3400 of file Expression.cc.

References ArrayRefExpr().

int ArrayRefExpr::structures_OK  )  const [virtual]
 

Return 1 if my structures are in a valid state.

Reimplemented from BinaryExpr.

Definition at line 3433 of file Expression.cc.

References True.

virtual void ArrayRefExpr::convert BinRep exprSet,
Symtab symtab
[virtual]
 

Read in the values of my fields and my subexpressions from the given BinRep object.

Convert(BinRep) expects the BinRep to be referencing an expression set of the same type as the expression. On return, all data from the expression set has been inserted into the appropriate fields in the expression object. NOTE that this converts the expression to an intermediate form which may contain TableExpr objects.

Reimplemented from BinaryExpr.

virtual void ArrayRefExpr::print_debug ostream &  o,
Boolean  debug
const [virtual]
 

See Expression.h.

Reimplemented from BinaryExpr.

const Symbol * ArrayRefExpr::base_variable_ref  )  const [virtual]
 

base_symbol If I am an IDExpr or an ArrayRefExpr, return the name of myself, otherwise return NULL.

Reimplemented from Expression.

Definition at line 11619 of file Expression.cc.

References array(), ID_OP, Expression::op(), and Expression::symbol().

Symbol * ArrayRefExpr::base_variable_ref  )  [virtual]
 

See Expression.h.

Reimplemented from Expression.

Definition at line 11628 of file Expression.cc.

References array(), ID_OP, Expression::op(), and Expression::symbol().

int ArrayRefExpr::exchange_expr VDL vdl  )  [virtual]
 

Create a node in the "expression" member and return the index.

Reimplemented from BinaryExpr.

Definition at line 3440 of file Expression.cc.

References Expression::data_ref(), Expression::exchange_expr(), BinRep::find_ref(), Set< T >::ins(), List< T >::ins_last(), and BinRep::to_tuple().


Friends And Related Function Documentation

friend class ExprTable [friend]
 

Reimplemented from BinaryExpr.

Definition at line 34 of file ArrayRefExpr.h.

friend class DDgraph [friend]
 

Reimplemented from Expression.

Definition at line 35 of file ArrayRefExpr.h.


Member Data Documentation

Arc_type* ArrayRefExpr::_arcs [protected]
 

Definition at line 80 of file ArrayRefExpr.h.

Referenced by ArrayRefExpr(), operator=(), and ~ArrayRefExpr().


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:43 2005