MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / resolve_all_calls

Function resolve_all_calls

tools/WCS.py:223–242  ·  view source on GitHub ↗
(call_graph)

Source from the content-addressed store, hash-verified

221 validate_dict(fxn_dict2)
222
223def 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
245def calc_all_wcs(call_graph):

Callers 1

mainFunction · 0.85

Calls 1

resolve_callsFunction · 0.85

Tested by

no test coverage detected