class ModelAction;
-typedef ModelList<const ModelAction *> action_mlist_t;
-typedef SnapList<uint32_t> func_id_list_t;
+typedef ModelList<FuncInst *> func_inst_list_t;
class FuncInst {
-public:
+public:
FuncInst(ModelAction *act);
~FuncInst();
- ModelAction * get_action() const { return action; }
+ //ModelAction * get_action() const { return action; }
const char * get_position() const { return position; }
+ void * get_location() const { return location; }
+ action_type get_type() const { return type; }
+
+ MEMALLOC
private:
- ModelAction * const action;
+ //ModelAction * const action;
const char * position;
+ void *location;
+ action_type type;
};
class FuncNode {
FuncNode();
~FuncNode();
+ void add_action(ModelAction *act);
+
HashTable<const char *, FuncInst *, uintptr_t, 4> * getFuncInsts() { return &func_insts; }
+ func_inst_list_t * get_inst_list() { return &inst_list; }
+
+ MEMALLOC
private:
+ /* Use source line number as the key of hashtable
+ *
+ * To do: cds_atomic_compare_exchange contains three atomic operations
+ * that are feeded with the same source line number by llvm pass
+ */
HashTable<const char *, FuncInst *, uintptr_t, 4> func_insts;
-};
+ func_inst_list_t inst_list;
+};