Polaris: IntConstExpr Class Reference

IntConstExpr Class Reference

An expression representing an integer constant. More...

#include <IntConstExpr.h>

Inheritance diagram for IntConstExpr:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 IntConstExpr (int val)
 IntConstExpr (int val, int int_size)
 IntConstExpr (const IntConstExpr &e)
virtual ~IntConstExpr ()
 IntConstExpr code:.
virtual IntConstExproperator= (const IntConstExpr &)
virtual int value () const
 DUMMY FUNCTIONS.
virtual void value (int)
 Access the integer value of the expression.
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 Member Functions

 IntConstExpr ()
virtual Expression_divide_by_int (int &)
virtual int _gcd (void) const
virtual Boolean _args_are_equal (Expression &, Boolean consider_side_effects)

Protected Attributes

int _value

Friends

class ExprTable

Detailed Description

An expression representing an integer constant.

Polaris Expression

See also:
Expression/IntConstExpr.h

Expression/IntConstExpr.h

Expression/Expression.cc

Description

An IntConstExpr represents an integer constant expression.

Definition at line 26 of file IntConstExpr.h.


Constructor & Destructor Documentation

IntConstExpr::IntConstExpr int  val  )  [inline]
 

Definition at line 74 of file IntConstExpr.h.

References _value, INTEGER_CONSTANT_OP, INTEGER_TYPE, and make_type().

IntConstExpr::IntConstExpr int  val,
int  int_size
[inline]
 

Definition at line 81 of file IntConstExpr.h.

References _value, INTEGER_CONSTANT_OP, INTEGER_TYPE, and make_type().

IntConstExpr::IntConstExpr const IntConstExpr e  )  [inline]
 

Definition at line 88 of file IntConstExpr.h.

References _value, e, and Expression::value().

IntConstExpr::~IntConstExpr  )  [virtual]
 

IntConstExpr code:.

... nothing to do

Definition at line 5150 of file Expression.cc.

IntConstExpr::IntConstExpr  )  [inline, protected]
 

< nothing to do

Definition at line 67 of file IntConstExpr.h.

References INTEGER_CONSTANT_OP, INTEGER_TYPE, and make_type().

Referenced by clone().


Member Function Documentation

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

Definition at line 5174 of file Expression.cc.

References _value, e, and Expression::value().

int IntConstExpr::value  )  const [virtual]
 

DUMMY FUNCTIONS.

Reimplemented from Expression.

Definition at line 5156 of file Expression.cc.

References _value.

Referenced by node_compare(), and update_signature().

void IntConstExpr::value int   )  [virtual]
 

Access the integer value of the expression.

Reimplemented from Expression.

Definition at line 5162 of file Expression.cc.

References _value.

Expression * IntConstExpr::clone  )  const [virtual]
 

Return a copy of myself.

Implements Expression.

Definition at line 5168 of file Expression.cc.

References IntConstExpr().

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

debug indicates whether it should contain extra fields

Implements Expression.

int IntConstExpr::structures_OK  )  const [virtual]
 

Return 1 if my structures are in a valid state.

Implements Expression.

Definition at line 5183 of file Expression.cc.

References True.

virtual void IntConstExpr::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 & IntConstExpr::update_signature  )  [virtual]
 

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

Reimplemented from Expression.

Definition at line 7238 of file Expression.cc.

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

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

See Expression.h.

Reimplemented from Expression.

Definition at line 7330 of file Expression.cc.

References value().

int IntConstExpr::exchange_expr VDL vdl  )  [virtual]
 

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

Reimplemented from Expression.

Definition at line 5190 of file Expression.cc.

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

Expression * IntConstExpr::_divide_by_int int &   )  [protected, virtual]
 

Reimplemented from Expression.

Definition at line 10709 of file Expression.cc.

References _lgcd(), and _value.

int IntConstExpr::_gcd void   )  const [protected, virtual]
 

Reimplemented from Expression.

Definition at line 11515 of file Expression.cc.

References _value.

virtual Boolean IntConstExpr::_args_are_equal Expression ,
Boolean  consider_side_effects
[protected, virtual]
 

Reimplemented from Expression.


Friends And Related Function Documentation

friend class ExprTable [friend]
 

Definition at line 27 of file IntConstExpr.h.


Member Data Documentation

int IntConstExpr::_value [protected]
 

Definition at line 53 of file IntConstExpr.h.

Referenced by _divide_by_int(), _gcd(), IntConstExpr(), operator=(), and value().


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:33 2005