Flambda: do not forget the default case when measuring the size of Switch

master
Mark Shinwell 2016-02-29 16:46:02 +00:00
parent 8cb01881f7
commit f5bc512181
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ let lambda_smaller' lam ~than:threshold =
let aux = function _::_::_ -> size := !size + 5 | _ -> () in
aux sw.consts; aux sw.blocks;
List.iter (fun (_, lam) -> lambda_size lam) sw.consts;
List.iter (fun (_, lam) -> lambda_size lam) sw.blocks
List.iter (fun (_, lam) -> lambda_size lam) sw.blocks;
Misc.Stdlib.Option.iter lambda_size sw.failaction
| String_switch (_, sw, def) ->
List.iter (fun (_, lam) ->
size := !size + 2;