:(before "End Instruction Modifying Transforms")
Transform.push_back(update_instruction_operations);
:(code)
void update_instruction_operations(recipe_ordinal r) {
trace(9991, "transform") << "--- compute instruction operations for recipe " << get(Recipe, r).name << end();
recipe& caller = get(Recipe, r);
for (long long int index = 0; index < SIZE(caller.steps); ++index) {
instruction& inst = caller.steps.at(index);
if (inst.is_label) continue;
if (!contains_key(Recipe_ordinal, inst.name)) {
raise_error << maybe(caller.name) << "instruction " << inst.name << " has no recipe\n" << end();
continue;
}
inst.operation = get(Recipe_ordinal, inst.name);
}
}
string maybe(string s) {
return s + ": ";
}
void transform(string form) {
load(form);
transform_all();
}