00001
00010 #ifndef ADDRESSLABEL_H_
00011 #define ADDRESSLABEL_H_
00012
00013 #include "SaveInstruction.h"
00014
00015
00016 #include<string>
00017 using namespace std;
00018
00019 namespace il{
00020 class node;
00021 class type;
00022 }
00023
00024 namespace sail {
00025
00026 class Variable;
00027
00033 class AddressLabel:public SaveInstruction {
00034
00035 friend class boost::serialization::access;
00036
00037 template<class Archive>
00038 void serialize(Archive & ar, const unsigned int version)
00039 {
00040 ar & boost::serialization::base_object<sail::SaveInstruction>(*this);
00041 ar & v;
00042 ar & label;
00043 ar & is_function;
00044 }
00045 private:
00046 Variable* v;
00047 string label;
00048 bool is_function;
00049 public:
00050 AddressLabel(Variable* v, string label, bool is_function,
00051 il::node* original, int line);
00052 AddressLabel(){};
00053 virtual ~AddressLabel();
00054 virtual string to_string() const;
00055 virtual Variable* get_lhs();
00056 virtual void set_lhs(Variable* v);
00057 string get_label();
00058 bool is_function_label();
00059 il::type* get_signature();
00060 virtual string to_string(bool pretty_print) const;
00061 virtual bool is_removable();
00062 };
00063
00064 }
00065
00066 #endif