sail::FieldRefRead Class Reference

Represents a field read instruction of the form v1 = v2.f1. ... .fk. More...

#include <FieldRefRead.h>

Inheritance diagram for sail::FieldRefRead:
sail::SaveInstruction sail::Instruction

List of all members.

Public Member Functions

 FieldRefRead (Variable *v1, Variable *v2, int offset, il::node *original, int line)
 FieldRefRead (Variable *v1, Variable *v2, int offset, string field_name, il::node *original, int line)
 FieldRefRead (Variable *v1, Variable *v2, il::record_info *ri, il::node *original, int line)
virtual string to_string () const
virtual string to_string (bool pretty_print) const
virtual Variableget_lhs ()
virtual void set_lhs (Variable *v)
Variableget_rhs ()
int get_offset ()
string get_field_name ()
virtual bool is_removable ()

Friends

class boost::serialization::access

Detailed Description

Represents a field read instruction of the form v1 = v2.f1. ... .fk.

The field selectors are represented by their aggregate offset.


Member Function Documentation

string sail::FieldRefRead::get_field_name (  ) 
Returns:
a string representing the sequence of field selectors for pretty printing.
int sail::FieldRefRead::get_offset (  ) 
Returns:
the aggregate offset of the field selectors
Variable * sail::FieldRefRead::get_rhs (  ) 
Returns:
the struct whose fields are being read.
bool sail::FieldRefRead::is_removable (  )  [virtual]

An instruction is removable if it's not present in the original source code, but introduced in the translation from the high-level language to the low-level language. For instance, if **x is an expression used in the original code, the low-level language will introduce a temporary t=*x; such instructions are "removable" for printing purposes.

Implements sail::Instruction.


The documentation for this class was generated from the following files:
Generated on Sun Oct 17 14:01:32 2010 by  doxygen 1.6.3