00001
00002
00003
00004
00005
00006
00007
00008 #ifndef ASSUMESIZE_H_
00009 #define ASSUMESIZE_H_
00010
00011 #include "Instruction.h"
00012
00013 #define ASSUME_SIZE_ID "assume_size"
00014
00015
00016 namespace sail {
00017
00022 class AssumeSize: public Instruction {
00023 friend class boost::serialization::access;
00024
00025 template<class Archive>
00026 void serialize(Archive & ar, const unsigned int version)
00027 {
00028 ar & boost::serialization::base_object<sail::Instruction>(*this);
00029 ar & buffer;
00030 ar & size;
00031 }
00032
00033 private:
00034 Symbol* buffer;
00035 Symbol* size;
00036
00037 public:
00038 AssumeSize();
00039 AssumeSize(Symbol* buffer, Symbol* size, il::node* original, int line);
00040 virtual ~AssumeSize();
00041 virtual string to_string() const;
00042 virtual string to_string(bool pretty_print) const;
00043 il::node* get_original_node();
00044
00045 virtual bool is_save_instruction();
00046
00047 bool is_synthetic();
00048 Symbol* get_buffer();
00049 Symbol* get_size();
00050
00051 virtual bool is_removable();
00052 };
00053
00054 }
00055
00056 #endif