| 39 | } |
| 40 | |
| 41 | MGB_NOINLINE ValueRefList apply_debug(const Operator& op, Span<ValueRef> inputs) { |
| 42 | auto& context = Transformation::get_context(); |
| 43 | size_t& depth = context.next_transformation; |
| 44 | mgb_assert(depth < context.transformations.size()); |
| 45 | static const char tabs[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; |
| 46 | const char* prefix = tabs + (sizeof(tabs) / sizeof(char)) - depth - 1; |
| 47 | mgb_log_debug( |
| 48 | "%s apply %s to %s", prefix, op.to_string().c_str(), |
| 49 | imperative::to_string(inputs).c_str()); |
| 50 | ValueRefList result; |
| 51 | auto& transformation = *context.transformations[depth++]; |
| 52 | CleanupGuard _{[&] { --depth; }}; |
| 53 | result = transformation.apply_transformation(op, inputs); |
| 54 | mgb_log_debug( |
| 55 | "%s returns %s", prefix, |
| 56 | imperative::to_string(Span<ValueRef>(result)).c_str()); |
| 57 | return result; |
| 58 | } |
| 59 | |
| 60 | } // namespace |
| 61 |
nothing calls this directly
no test coverage detected