File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -501,14 +501,17 @@ and compile_general_cases
501501 (* * see #2413
502502 In general, we know it is last call,
503503 there is no need to print [break];
504- there is an exception when two conditions meet:
505- - should_break does not imply
506- There is one case (tailcall)
507- where [should_break] inferred false while our
508- exit engine could not infer
509- - has_exit
504+ But we need make sure the last call lambda does not
505+ have `(exit ..)` due to we pass should_return from Lstaticcath downwards
506+ Since this is a rough approximation, some `(exit ..)` does not destroy
507+ last call property, we use exiting should_break to improve preciseness
508+ (and it indeed help catch more cases)
509+
510+ - tailcall or not does not matter, if it is the tailcall
511+ break still should not be printed (it will be continuned)
510512 *)
511- should_break && (Lam_exit_code. has_exit lam)
513+ should_break &&
514+ (Lam_exit_code. has_exit lam)
512515 in
513516 {J. switch_case ;
514517 switch_body = switch_block, should_break
Original file line number Diff line number Diff line change @@ -97880,12 +97880,17 @@ and compile_general_cases
9788097880 (** see #2413
9788197881 In general, we know it is last call,
9788297882 there is no need to print [break];
97883- there is an exception when two conditions meet:
97884- - should_break does not imply
97885- There is one case
97886- where [should_break]for [tailcall], we get [should_break = false]
97883+ But we need make sure the last call lambda does not
97884+ have `(exit ..)` due to we pass should_return from Lstaticcath downwards
97885+ Since this is a rough approximation, some `(exit ..)` does not destroy
97886+ last call property, we use exiting should_break to improve preciseness
97887+ (and it indeed help catch more cases)
97888+
97889+ - tailcall or not does not matter, if it is the tailcall
97890+ break still should not be printed (it will be continuned)
9788797891 *)
97888- should_break && (Lam_exit_code.has_exit lam)
97892+ should_break &&
97893+ (Lam_exit_code.has_exit lam)
9788997894 in
9789097895 {J.switch_case ;
9789197896 switch_body = switch_block, should_break
You can’t perform that action at this time.
0 commit comments