static new Map applyAlwaysRules_handlers; sbool applyAlwaysRules_step_debug; // for handlers static new ThreadLocal applyAlwaysRules_ruleID; static void applyAlwaysRules_step() { L statements = lispStatements_cloned(); if (applyAlwaysRules_step_debug) print("applyAlwaysRules_step: " + struct(statements)); for (LispStatement s : statements) { Lisp l = s.term; O handler = applyAlwaysRules_handlers.get(l.head); if (handler != null) { applyAlwaysRules_ruleID.set(s.globalID); if (applyAlwaysRules_step_debug) print("Calling handler for " + l.head); try { callF(handler, /*lispSingleChildOrFull*/(l)); } finally { applyAlwaysRules_ruleID.set(null); } } } }