| 221 | validate_dict(fxn_dict2) |
| 222 | |
| 223 | def resolve_all_calls(call_graph): |
| 224 | def resolve_calls(fxn_dict2): |
| 225 | fxn_dict2['r_calls'] = [] |
| 226 | fxn_dict2['unresolved_calls'] = set() |
| 227 | |
| 228 | for call in fxn_dict2['calls']: |
| 229 | call_dict = find_fxn(fxn_dict2['tu'], call, call_graph) |
| 230 | if call_dict: |
| 231 | fxn_dict2['r_calls'].append(call_dict) |
| 232 | else: |
| 233 | fxn_dict2['unresolved_calls'].add(call) |
| 234 | |
| 235 | # Loop through every global and local function |
| 236 | # and resolve each call, save results in r_calls |
| 237 | for fxn_dict in call_graph['globals'].values(): |
| 238 | resolve_calls(fxn_dict) |
| 239 | |
| 240 | for l_dict in call_graph['locals'].values(): |
| 241 | for fxn_dict in l_dict.values(): |
| 242 | resolve_calls(fxn_dict) |
| 243 | |
| 244 | |
| 245 | def calc_all_wcs(call_graph): |