@@ -97,7 +97,7 @@ def map_(
9797
9898 results = []
9999 for ele in values :
100- ret = interp_ .run_lattice (fn , (ele ,), ())
100+ ret = interp_ .run_lattice (fn , (ele ,), (), () )
101101 results .append (ret )
102102
103103 if isinstance (stmt , ilist .Map ):
@@ -180,13 +180,10 @@ def invoke(
180180 frame : ForwardFrame [Address ],
181181 stmt : func .Invoke ,
182182 ):
183-
184- args = interp_ .permute_values (
185- stmt .callee .arg_names , frame .get_values (stmt .inputs ), stmt .kwargs
186- )
187- _ , ret = interp_ .run_method (
188- stmt .callee ,
189- args ,
183+ _ , ret = interp_ .call (
184+ stmt .callee .code ,
185+ interp_ .method_self (stmt .callee ),
186+ * frame .get_values (stmt .inputs ),
190187 )
191188
192189 return (ret ,)
@@ -219,7 +216,8 @@ def call(
219216 result = interp_ .run_lattice (
220217 frame .get (stmt .callee ),
221218 frame .get_values (stmt .inputs ),
222- stmt .kwargs ,
219+ stmt .keys ,
220+ frame .get_values (stmt .kwargs ),
223221 )
224222 return (result ,)
225223
@@ -319,26 +317,28 @@ def ifelse(
319317 ):
320318 body = stmt .then_body if const_cond .data else stmt .else_body
321319 with interp_ .new_frame (stmt , has_parent_access = True ) as body_frame :
322- ret = interp_ .run_ssacfg_region (body_frame , body , ( address_cond ,) )
320+ ret = interp_ .frame_call_region (body_frame , stmt , body , address_cond )
323321 # interp_.set_values(frame, body_frame.entries.keys(), body_frame.entries.values())
324322 return ret
325323 else :
326324 # run both branches
327325 with interp_ .new_frame (stmt , has_parent_access = True ) as then_frame :
328- then_results = interp_ .run_ssacfg_region (
329- then_frame , stmt . then_body , ( address_cond ,)
330- )
331- interp_ . set_values (
332- frame , then_frame . entries . keys (), then_frame . entries . values ()
326+ then_results = interp_ .frame_call_region (
327+ then_frame ,
328+ stmt ,
329+ stmt . then_body ,
330+ address_cond ,
333331 )
332+ frame .set_values (then_frame .entries .keys (), then_frame .entries .values ())
334333
335334 with interp_ .new_frame (stmt , has_parent_access = True ) as else_frame :
336- else_results = interp_ .run_ssacfg_region (
337- else_frame , stmt . else_body , ( address_cond ,)
338- )
339- interp_ . set_values (
340- frame , else_frame . entries . keys (), else_frame . entries . values ()
335+ else_results = interp_ .frame_call_region (
336+ else_frame ,
337+ stmt ,
338+ stmt . else_body ,
339+ address_cond ,
341340 )
341+ frame .set_values (else_frame .entries .keys (), else_frame .entries .values ())
342342 # TODO: pick the non-return value
343343 if isinstance (then_results , interp .ReturnValue ) and isinstance (
344344 else_results , interp .ReturnValue
@@ -364,12 +364,12 @@ def for_loop(
364364 iter_type , iterable = interp_ .unpack_iterable (frame .get (stmt .iterable ))
365365
366366 if iter_type is None :
367- return interp_ .eval_stmt_fallback (frame , stmt )
367+ return interp_ .eval_fallback (frame , stmt )
368368
369369 for value in iterable :
370370 with interp_ .new_frame (stmt , has_parent_access = True ) as body_frame :
371- loop_vars = interp_ .run_ssacfg_region (
372- body_frame , stmt .body , ( value ,) + loop_vars
371+ loop_vars = interp_ .frame_call_region (
372+ body_frame , stmt , stmt .body , value , * loop_vars
373373 )
374374
375375 if loop_vars is None :
0 commit comments