Represents a field read instruction of the form v1 = v2.f1. ... .fk. More...
#include <FieldRefRead.h>
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 Variable * | get_lhs () |
virtual void | set_lhs (Variable *v) |
Variable * | get_rhs () |
int | get_offset () |
string | get_field_name () |
virtual bool | is_removable () |
Friends | |
class | boost::serialization::access |
Represents a field read instruction of the form v1 = v2.f1. ... .fk.
The field selectors are represented by their aggregate offset.
string sail::FieldRefRead::get_field_name | ( | ) |
int sail::FieldRefRead::get_offset | ( | ) |
Variable * sail::FieldRefRead::get_rhs | ( | ) |
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.