2 #ifndef BDWY_LOCALVARIABLE_H
3 #define BDWY_LOCALVARIABLE_H
11 typedef std::map< std::string , annVariable * >
var_map;
19 typedef std::set< annVariable * >
var_set;
24 typedef std::map< procLocation *, pointerValue > variable_binding_map;
25 typedef variable_binding_map::iterator variable_binding_map_p;
59 variable_binding_map _bindings ;
93 std::string procedure_name,
113 void clear(procLocation *where);
114 void clear_all() { _bindings.clear(); }
122 inline declNode * decl()
const {
return _decl; }
140 _decl->decl_location(declNode::TOP);
150 _decl->decl_location(declNode::FORMAL);
166 pointerValue & get_binding(procLocation *where);
176 pointerValue & fresh_binding(procLocation *where)
179 return get_binding(where);
187 void set_binding(memoryBlock * block, procLocation *where)
190 _bindings[where].blocks.clear();
191 _bindings[where].blocks.insert(block);
218 void print(std::ostream & o)
const;