Term* find_active_state_container(Branch* branch) { // Check if there is already a stateful input // Special case for if-block: Look for a unpack_state_from_list call if (is_case_branch(branch)) { Term* existing = find_term_with_function(branch, FUNCS.unpack_state_from_list); if (existing != NULL) return existing; } // Special case for for-block: Look for a unpack_state_from_list call Term* existing = find_state_input(branch); if (existing != NULL) return existing; return NULL; }
Term* for_loop_find_index(Branch* contents) { return find_term_with_function(contents, FUNCS.loop_index); }
Term* for_loop_find_output_index(Block* contents) { return find_term_with_function(contents, FUNCS.loop_output_index); }