- CASE_ON(BP_ON_NEW_NODE, new_node);
- CASE_ON(BP_ON_REPLACE, replace);
- CASE_ON(BP_ON_LOWER, lower);
- CASE_ON(BP_ON_REMIRG, free_graph);
- CASE_ON(BP_ON_NEW_ENT, new_entity);
- CASE_ON(BP_ON_NEW_TYPE, new_type);
+ CASE_ON(BP_ON_REPLACE, hook_replace, dbg_replace);
+ CASE_ON(BP_ON_LOWER, hook_lower, dbg_lower);
+ CASE_ON(BP_ON_REMIRG, hook_free_graph, dbg_free_graph);
+ CASE_ON(BP_ON_NEW_ENT, hook_new_entity, dbg_new_entity);
+ case BP_ON_NEW_THING:
+ if (!IS_HOOKED(hook_new_node))
+ HOOK(hook_new_node, dbg_new_node);
+ if (!IS_HOOKED(hook_new_type))
+ HOOK(hook_new_type, dbg_new_type);
+ if (!IS_HOOKED(hook_new_entity))
+ HOOK(hook_new_entity, dbg_new_entity);
+ break;