Polaris: ArgNumberExpr Class Reference

ArgNumberExpr Class Reference

Expression for arguments in a statement function. More...

#include <ArgNumberExpr.h>

Inheritance diagram for ArgNumberExpr:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ArgNumberExpr (const Type &etype, int arg_value)
 ArgNumberExpr (const ArgNumberExpr &e)
virtual ~ArgNumberExpr ()
 ArgNumberExpr code:.
virtual ArgNumberExproperator= (const ArgNumberExpr &)
void value (int i)
 Methods specified in derived classes ArgNumberExpr.h and IntConstExpr.h.
int value () const
 Access the argument number of myself.
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
 debug indicates whether it should contain extra fields
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

 ArgNumberExpr (const Type &etype)

Protected Attributes

int _value

Friends

class ExprTable

Detailed Description

Expression for arguments in a statement function.

Polaris Expression

See also:
Expression/ArgNumberExpr.h

Expression/ArgNumberExpr.h

Expression/Expression.cc

Description

An ArgNumberExpr is the expression for arguments of a statement function. Arg number 1 is the first statement function argument, arg number 2 is the second, and so forth. These should never be seen in a scanned program since statement functions are in-lined as the program is being parsed.

Definition at line 30 of file ArgNumberExpr.h.


Constructor & Destructor Documentation

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

< nothing to do

Definition at line 67 of file ArgNumberExpr.h.

References ARG_OP.

Referenced by clone().

ArgNumberExpr::ArgNumberExpr const Type etype,
int  arg_value
[inline]
 

Definition at line 74 of file ArgNumberExpr.h.

References _value, and ARG_OP.

ArgNumberExpr::ArgNumberExpr const ArgNumberExpr e  )  [inline]
 

Definition at line 81 of file ArgNumberExpr.h.

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

ArgNumberExpr::~ArgNumberExpr  )  [virtual]
 

ArgNumberExpr code:.

... nothing to do

Definition at line 3299 of file Expression.cc.


Member Function Documentation

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

Definition at line 3305 of file Expression.cc.

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

void ArgNumberExpr::value int  i  )  [inline, virtual]
 

Methods specified in derived classes ArgNumberExpr.h and IntConstExpr.h.

Reimplemented from Expression.

Definition at line 88 of file ArgNumberExpr.h.

References _value.

int ArgNumberExpr::value  )  const [inline, virtual]
 

Access the argument number of myself.

Reimplemented from Expression.

Definition at line 94 of file ArgNumberExpr.h.

References _value.

Referenced by node_compare(), and update_signature().

Expression * ArgNumberExpr::clone  )  const [virtual]
 

Return a copy of myself.

Implements Expression.

Definition at line 3314 of file Expression.cc.

References ArgNumberExpr().

int ArgNumberExpr::structures_OK  )  const [virtual]
 

Return 1 if my structures are in a valid state.

Implements Expression.

Definition at line 3320 of file Expression.cc.

References True.

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

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

debug indicates whether it should contain extra fields

Implements Expression.

const ExprSignature & ArgNumberExpr::update_signature  )  [virtual]
 

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

Reimplemented from Expression.

Definition at line 7186 of file Expression.cc.

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

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

See Expression.h.

Reimplemented from Expression.

Definition at line 7310 of file Expression.cc.

References ARG_OP, Expression::op(), and value().

int ArgNumberExpr::exchange_expr VDL vdl  )  [virtual]
 

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

Reimplemented from Expression.

Definition at line 3327 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]
 

Definition at line 31 of file ArgNumberExpr.h.


Member Data Documentation

int ArgNumberExpr::_value [protected]
 

Definition at line 34 of file ArgNumberExpr.h.

Referenced by ArgNumberExpr(), 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:06:42 2005