Polaris: LabelExpr Class Reference

LabelExpr Class Reference

An expression representing a statement label reference. More...

#include <LabelExpr.h>

Inheritance diagram for LabelExpr:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 LabelExpr (Statement &stmt)
 LabelExpr (const LabelExpr &e)
virtual ~LabelExpr ()
 LabelExpr code:.
virtual LabelExproperator= (const LabelExpr &e)
const Statementstmt () const
Statementstmt ()
 Methods specified in derived class LabelExpr.h.
void stmt (Statement &stmt)
 Access the statement label represented by this expression.
virtual void relink_eptrs (ProgramUnit &p)
 Change pointer in LabelExpr to point into the given ProgramUnit.
virtual Expressionclone () const
 Return a copy of myself.
virtual void print_debug (ostream &o, Boolean debug) const
 debug indicates whether it should contain extra fields
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 const ExprSignatureupdate_signature ()
virtual int node_compare (const Expression &ex) const
 See Expression.h.
virtual int exchange_expr (VDL &vdl)
 Create a node in the "expression" member and return the index.

Protected Attributes

Statement_stmt

Detailed Description

An expression representing a statement label reference.

Polaris Expression

See also:
Expression/LabelExpr.h

Expression/LabelExpr.h

Expression/Expression.cc

Description

A LabelExpr is a reference to a statement label in an s_control_type and simply contains a reference to a Statement.

Definition at line 27 of file LabelExpr.h.


Constructor & Destructor Documentation

LabelExpr::LabelExpr Statement stmt  )  [inline]
 

Definition at line 61 of file LabelExpr.h.

References _stmt, LABEL_OP, make_type(), stmt(), and VOID_TYPE.

Referenced by clone().

LabelExpr::LabelExpr const LabelExpr e  )  [inline]
 

Definition at line 68 of file LabelExpr.h.

References _stmt, and e.

LabelExpr::~LabelExpr  )  [virtual]
 

LabelExpr code:.

Note: The following data fields are aliased: label = data

... nothing to do

Definition at line 5441 of file Expression.cc.


Member Function Documentation

LabelExpr & LabelExpr::operator= const LabelExpr e  )  [virtual]
 

Definition at line 5447 of file Expression.cc.

References _stmt, and e.

const Statement & LabelExpr::stmt  )  const [virtual]
 

Reimplemented from Expression.

Definition at line 5460 of file Expression.cc.

References _stmt.

Referenced by LabelExpr(), stmt(), and update_signature().

Statement & LabelExpr::stmt  )  [virtual]
 

Methods specified in derived class LabelExpr.h.

Reimplemented from Expression.

Definition at line 5466 of file Expression.cc.

References _stmt.

void LabelExpr::stmt Statement stmt  )  [virtual]
 

Access the statement label represented by this expression.

Reimplemented from Expression.

Definition at line 5472 of file Expression.cc.

References _stmt, LABEL_STMT, stmt(), and Statement::stmt_class().

void LabelExpr::relink_eptrs ProgramUnit p  )  [virtual]
 

Change pointer in LabelExpr to point into the given ProgramUnit.

Reimplemented from Expression.

Definition at line 5508 of file Expression.cc.

References _stmt, and Statement::tag().

Expression * LabelExpr::clone  )  const [virtual]
 

Return a copy of myself.

Implements Expression.

Definition at line 5454 of file Expression.cc.

References LabelExpr().

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

debug indicates whether it should contain extra fields

Implements Expression.

int LabelExpr::structures_OK  )  const [virtual]
 

Return 1 if my structures are in a valid state.

Implements Expression.

Definition at line 5491 of file Expression.cc.

References _stmt, False, Statement::structures_OK(), and True.

virtual void LabelExpr::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.

Implements Expression.

const ExprSignature & LabelExpr::update_signature  )  [virtual]
 

... _signature_live().merge( (int) type().data_type() ); ... _signature_live().merge( type().size() );

Reimplemented from Expression.

Definition at line 7252 of file Expression.cc.

References Expression::_signature_live(), ExprSignature::clear(), ExprSignature::merge(), Expression::op(), Expression::signature(), and stmt().

int LabelExpr::node_compare const Expression ex  )  const [virtual]
 

See Expression.h.

Reimplemented from Expression.

Definition at line 7336 of file Expression.cc.

References Expression::value().

int LabelExpr::exchange_expr VDL vdl  )  [virtual]
 

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

Reimplemented from Expression.

Definition at line 5516 of file Expression.cc.

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


Member Data Documentation

Statement* LabelExpr::_stmt [protected]
 

Definition at line 54 of file LabelExpr.h.

Referenced by LabelExpr(), operator=(), relink_eptrs(), stmt(), and structures_OK().


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:07:40 2005