Polaris: AssignmentStmt Class Reference

AssignmentStmt Class Reference

LHS and RHS of an assignment statement must be in shape conformance. More...

#include <AssignmentStmt.h>

Inheritance diagram for AssignmentStmt:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void build_refs ()
int iterate_in_exprs_valid () const
 Check if there are valid in_ref exprs.
Mutator< Expressioniterate_in_exprs_guarded ()
int iterate_out_exprs_valid () const
 Check if there are valid out_ref exprs.
Mutator< Expressioniterate_out_exprs_guarded ()
const Expressionlhs () const
Expressionlhs ()
const Expressionrhs () const
Expressionrhs ()
void lhs (Expression *e)
void rhs (Expression *e)
virtual int structures_OK () const
virtual void convert (BinRep &stmt, ExprTable &etable, Symtab &symtab, const NamelistDict &namelists, const FormatDB &formats, Dictionary< NextEntry > *next_table)
 AssignmentStmt (const char *l, Expression *lhs_exp, Expression *rhs_exp)
 AssignmentStmt (const AssignmentStmt &stmt)
virtual ~AssignmentStmt ()
virtual AssignmentStmtoperator= (const AssignmentStmt &stmt)
virtual Statementclone () const
virtual void print_debug (ostream &o, int debug) const
virtual void fortran_write (ostream &o, int &indent, char *type="") const
virtual void exchange_convert (VDL &vdl)
 Convert the Statement into the exchange format.

Friends

Statementmake_statement (const char *name, const BinRep &binstr)
 make_statement expects the statement name ("S10") and a binstr containing the statement set.

Detailed Description

LHS and RHS of an assignment statement must be in shape conformance.

Thus, either they have the same rank or RHS is a scalar.

Definition at line 16 of file AssignmentStmt.h.


Constructor & Destructor Documentation

AssignmentStmt::AssignmentStmt const char *  l,
Expression lhs_exp,
Expression rhs_exp
 

Definition at line 2488 of file Statement.cc.

References ASSIGNMENT_STMT, build_refs(), LHS, List< T >::make_static_list(), List< T >::modify(), null_to_omega(), RHS, and shape_conformance().

Referenced by clone().

AssignmentStmt::AssignmentStmt const AssignmentStmt stmt  ) 
 

Definition at line 2505 of file Statement.cc.

References ASSIGNMENT_STMT, build_refs(), Statement::copy_base(), LHS, List< T >::modify(), and RHS.

AssignmentStmt::~AssignmentStmt  )  [virtual]
 

... nothing to do

Definition at line 2534 of file Statement.cc.


Member Function Documentation

void AssignmentStmt::build_refs  )  [virtual]
 

... _in_refs and _act_refs come from the right-hand side and ... any array subscripting on the left-hand side

... _out_refs are the act_refs plus the left-hand side expression

Reimplemented from Statement.

Definition at line 2411 of file Statement.cc.

References Statement::_add_act_refs(), Statement::_add_in_refs(), ARRAY_REF_OP, RefSet< T >::clear(), RefSet< T >::ins(), and SUBSTRING_OP.

Referenced by AssignmentStmt(), lhs(), operator=(), and rhs().

int AssignmentStmt::iterate_in_exprs_valid  )  const [virtual]
 

Check if there are valid in_ref exprs.

Reimplemented from Statement.

Definition at line 2439 of file Statement.cc.

References OMEGA_OP, RHS, True, and List< T >::valid().

Mutator< Expression > AssignmentStmt::iterate_in_exprs_guarded  )  [virtual]
 

input expr is rhs

Reimplemented from Statement.

Definition at line 2446 of file Statement.cc.

References RHS.

int AssignmentStmt::iterate_out_exprs_valid  )  const [virtual]
 

Check if there are valid out_ref exprs.

Reimplemented from Statement.

Definition at line 2453 of file Statement.cc.

References LHS, OMEGA_OP, True, and List< T >::valid().

Mutator< Expression > AssignmentStmt::iterate_out_exprs_guarded  )  [virtual]
 

output expr is lhs

Reimplemented from Statement.

Definition at line 2460 of file Statement.cc.

References LHS.

const Expression& AssignmentStmt::lhs  )  const [inline, virtual]
 

Reimplemented from Statement.

Definition at line 30 of file AssignmentStmt.h.

References LHS.

Expression& AssignmentStmt::lhs  )  [inline, virtual]
 

Reimplemented from Statement.

Definition at line 31 of file AssignmentStmt.h.

References LHS.

const Expression& AssignmentStmt::rhs  )  const [inline, virtual]
 

Reimplemented from Statement.

Definition at line 32 of file AssignmentStmt.h.

References RHS.

Expression& AssignmentStmt::rhs  )  [inline, virtual]
 

Reimplemented from Statement.

Definition at line 33 of file AssignmentStmt.h.

References RHS.

void AssignmentStmt::lhs Expression e  )  [virtual]
 

Reimplemented from Statement.

Definition at line 2467 of file Statement.cc.

References build_refs(), e, LHS, and List< T >::modify().

void AssignmentStmt::rhs Expression e  )  [virtual]
 

Reimplemented from Statement.

Definition at line 2474 of file Statement.cc.

References build_refs(), e, List< T >::modify(), and RHS.

int AssignmentStmt::structures_OK  )  const [virtual]
 

Implements Statement.

Definition at line 2564 of file Statement.cc.

References Statement::in_out_refs_structures_OK().

virtual void AssignmentStmt::convert BinRep stmt,
ExprTable etable,
Symtab symtab,
const NamelistDict namelists,
const FormatDB formats,
Dictionary< NextEntry > *  next_table
[virtual]
 

Reimplemented from Statement.

AssignmentStmt & AssignmentStmt::operator= const AssignmentStmt stmt  )  [virtual]
 

Definition at line 2517 of file Statement.cc.

References build_refs(), Statement::copy_base(), LHS, List< T >::modify(), and RHS.

Statement * AssignmentStmt::clone  )  const [virtual]
 

Implements Statement.

Definition at line 2529 of file Statement.cc.

References AssignmentStmt().

void AssignmentStmt::print_debug ostream &  o,
int  debug
const [virtual]
 

... comment '}'

Implements Statement.

Definition at line 2552 of file Statement.cc.

References LHS, print_expr_ptr(), and RHS.

virtual void AssignmentStmt::fortran_write ostream &  o,
int &  indent,
char *  type = ""
const [virtual]
 

Implements Statement.

void AssignmentStmt::exchange_convert VDL vdl  )  [virtual]
 

Convert the Statement into the exchange format.

Reimplemented from Statement.

Definition at line 2572 of file Statement.cc.

References Statement::exchange_convert(), BinRep::find_ref(), Set< T >::ins(), List< T >::ins_last(), Statement::tag(), BinRep::to_set(), and BinRep::to_tuple().


Friends And Related Function Documentation

Statement* make_statement const char *  name,
const BinRep binstr
[friend]
 

make_statement expects the statement name ("S10") and a binstr containing the statement set.

It returns a pointer to the correct statement object with the tag field already filled in.

The statement table contains tuples of the from ["tag", { all the statement info}]. One should call make_statement passing the "tag" for the name and a binstr which represents the set.

Definition at line 265 of file StmtList.cc.


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