NonBinaryExpr Class ReferenceAn expression containing two or more arguments.
More...
#include <NonBinaryExpr.h>
Inheritance diagram for NonBinaryExpr:
[legend]List of all members.
|
Public Member Functions |
| | NonBinaryExpr (OP_TYPE o, const Type &e) |
| | Constructor for a NonBinaryExpr with no args.
|
| | NonBinaryExpr (OP_TYPE o, const Type &e, Expression *exp1, Expression *exp2=0, Expression *exp3=0, Expression *exp4=0, Expression *exp5=0) |
| | Constructor for a NonBinaryExpr with up to five args.
|
| | NonBinaryExpr (OP_TYPE o, const Type &e, List< Expression > *list) |
| | Creates a new NonBinaryExpr object with the expressions in 'list' as its arguments.
|
| | NonBinaryExpr (const NonBinaryExpr &e) |
| | Copy constructor.
|
| virtual | ~NonBinaryExpr () |
| | Virtual destructor.
|
| NonBinaryExpr & | operator= (const NonBinaryExpr &) |
| | Copy assignment.
|
| virtual void | relink_eptrs (ProgramUnit &p) |
| | Change pointers in a NonBinaryExpr to point within the given ProgramUnit.
|
| virtual Expression * | clone () const |
| | Return a copy of myself.
|
| virtual const List< Expression > & | arg_list () const |
| virtual List< Expression > & | arg_list () |
| | Return a reference to list of all expression arguments of myself.
|
| virtual const RefList< Expression > * | arg_refs () const |
| | Return a list of references to all expression arguments 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 Expression * | member_ref (const Symbol *) |
| | See Expression.h.
|
| virtual int | exchange_expr (VDL &vdl) |
| | Create a node in the "expression" member and return the index.
|
Protected Member Functions |
| virtual Expression * | _fold_top (void) |
| virtual Expression * | _divides_evenly (const Symbol *) |
| virtual Expression * | _divide_by_int (int &) |
| virtual int | _gcd (void) const |
| virtual Expression * | _distribute_top (void) |
| virtual Boolean | _args_are_equal (Expression &, Boolean consider_side_effects) |
| virtual Expression * | _combine_top () |
| virtual void | _backup_aux () |
Protected Attributes |
| List< Expression > | _arg_list |
Friends |
| class | ExprTable |
Detailed Description
An expression containing two or more arguments.
Polaris Expression - See also:
- Expression/NonBinaryExpr.h
Expression/NonBinaryExpr.h
Expression/Expression.cc
A NonBinaryExpr is an expression that can have a variable number of arguments. These arguments are accessed through the method arg_list(). A NonBinaryExpr can be one of several kinds of expressions. The most common of these are are ADD_OP (+), MULT_OP (*), AND_OP (.AND.), and OR_OP (.OR.). In most cases, NonBinaryExprs are commutative.
Definition at line 34 of file NonBinaryExpr.h.
Constructor & Destructor Documentation
| NonBinaryExpr::NonBinaryExpr |
( |
OP_TYPE |
o, |
|
|
const Type & |
e |
|
) |
[inline] |
|
|
|
Constructor for a NonBinaryExpr with up to five args.
|
| NonBinaryExpr::NonBinaryExpr |
( |
const NonBinaryExpr & |
e |
) |
[inline] |
|
Member Function Documentation
| void NonBinaryExpr::relink_eptrs |
( |
ProgramUnit & |
p |
) |
[virtual] |
|
| Expression * NonBinaryExpr::clone |
( |
|
) |
const [virtual] |
|
| const List< Expression > & NonBinaryExpr::arg_list |
( |
|
) |
const [virtual] |
|
| int NonBinaryExpr::structures_OK |
( |
|
) |
const [virtual] |
|
| virtual void NonBinaryExpr::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.
Reimplemented in CommaExpr. |
| virtual void NonBinaryExpr::print_debug |
( |
ostream & |
o, |
|
|
Boolean |
debug |
|
) |
const [virtual] |
|
|
|
debug indicates whether it should contain extra fields
Implements Expression.
Reimplemented in CommaExpr. |
| int NonBinaryExpr::exchange_expr |
( |
VDL & |
vdl |
) |
[virtual] |
|
|
|
Create a node in the "expression" member and return the index.
Reimplemented from Expression.
Reimplemented in CommaExpr.
Definition at line 5988 of file Expression.cc.
References _arg_list, ADD_OP, AND_OP, COLON_OP, Iterator< T >::current(), EQV_OP, Expression::exchange_expr(), BinRep::find_ref(), Set< T >::ins(), List< T >::ins_last(), MULT_OP, NEQV_OP, OR_OP, BinRep::to_tuple(), and Iterator< T >::valid(). |
| Expression * NonBinaryExpr::_fold_top |
( |
void |
|
) |
[protected, virtual] |
|
|
|
... Do nothing
Reimplemented from Expression.
Definition at line 9733 of file Expression.cc.
References _expr_can_contain_omega(), _simplify_options, ADD_OP, AND_OP, arg_list(), Iterator< T >::current(), EQV_OP, Mutator< T >::grab(), MULT_OP, NEQV_OP, OMEGA_OP, Expression::op(), OR_OP, and Iterator< T >::valid().
Referenced by _divide_by_int(). |
| Expression * NonBinaryExpr::_divides_evenly |
( |
const Symbol * |
|
) |
[protected, virtual] |
|
| Expression * NonBinaryExpr::_divide_by_int |
( |
int & |
divisor |
) |
[protected, virtual] |
|
|
|
... Do nothing
Reimplemented from Expression.
Definition at line 10719 of file Expression.cc.
References _arg_list, Expression::_divide_by_int(), _fold_top(), _gcd(), _lgcd(), _standardize_top(), ADD_OP, Iterator< T >::current(), List< T >::modify(), MULT_OP, Expression::op(), and Iterator< T >::valid(). |
| int NonBinaryExpr::_gcd |
( |
void |
|
) |
const [protected, virtual] |
|
| Expression * NonBinaryExpr::_distribute_top |
( |
void |
|
) |
[protected, virtual] |
|
| Expression * NonBinaryExpr::_combine_top |
( |
void |
|
) |
[protected, virtual] |
|
| void NonBinaryExpr::_backup_aux |
( |
|
) |
[protected, virtual] |
|
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files:
|