@@ -27,7 +27,8 @@ type ocaml =
2727 as_parameter : bool ;
2828 as_argument_for : string option ;
2929 zero_alloc_check : Zero_alloc_annotations.Check .t ;
30- allow_illegal_crossing : bool
30+ zero_alloc_assert : Zero_alloc_annotations.Assert .t ;
31+ infer_with_bounds : bool
3132 }
3233
3334let dump_warnings st =
@@ -57,7 +58,9 @@ let dump_ocaml x =
5758 (" parameters" , `List (List. map ~f: Json. string x.parameters));
5859 (" as_parameter" , `Bool x.as_parameter);
5960 ( " zero_alloc_check" ,
60- `String (Zero_alloc_annotations.Check. to_string x.zero_alloc_check) )
61+ `String (Zero_alloc_annotations.Check. to_string x.zero_alloc_check) );
62+ (" zero_alloc_assert" ,
63+ `String (Zero_alloc_annotations.Assert. to_string x.zero_alloc_assert) )
6164 ]
6265
6366(* * Some paths can be resolved relative to a current working directory *)
@@ -452,7 +455,6 @@ let ocaml_ignored_flags =
452455 " -drawflambda" ;
453456 " -drawlambda" ;
454457 " -dreload" ;
455- " -dscheduling" ;
456458 " -dsel" ;
457459 " -dsource" ;
458460 " -dspill" ;
@@ -652,6 +654,7 @@ let ocaml_ignored_parametrized_flags =
652654 " -o" ;
653655 " -rounds" ;
654656 " -runtime-variant" ;
657+ " -ocamlrunparam" ;
655658 " -unbox-closures-factor" ;
656659 " -use-prims" ;
657660 " -use_runtime" ;
@@ -834,10 +837,17 @@ let ocaml_flags =
834837 failwith (" Invalid value for -zero-alloc-check: " ^ zero_alloc_str)),
835838 " Check that annotated functions do not allocate and do not have \
836839 indirect calls. " ^ Zero_alloc_annotations.Check. doc );
837- ( " -allow-illegal-crossing" ,
838- Marg. unit (fun ocaml -> { ocaml with allow_illegal_crossing = true }),
839- " Type declarations will not be checked along the portability or \
840- contention axes" )
840+ ( " -zero-alloc-assert" ,
841+ Marg. param " string" (fun zero_alloc_str ocaml ->
842+ match Zero_alloc_annotations.Assert. of_string zero_alloc_str with
843+ | Some zero_alloc_assert -> { ocaml with zero_alloc_assert }
844+ | None ->
845+ failwith (" Invalid value for -zero-alloc-assert: " ^ zero_alloc_str)),
846+ " Add zero_alloc annotations to all functions. " ^
847+ Zero_alloc_annotations.Assert. doc );
848+ ( " -infer-with-bounds" ,
849+ Marg. unit (fun ocaml -> { ocaml with infer_with_bounds = true }),
850+ " Infer with-bounds on kinds for type declarations. May impact performance." )
841851 ]
842852
843853(* * {1 Main configuration} *)
@@ -866,7 +876,8 @@ let initial =
866876 as_parameter = false ;
867877 as_argument_for = None ;
868878 zero_alloc_check = Zero_alloc_annotations.Check. Check_default ;
869- allow_illegal_crossing = false
879+ zero_alloc_assert = Zero_alloc_annotations.Assert. Assert_default ;
880+ infer_with_bounds = false
870881 };
871882 merlin =
872883 { build_path = [] ;
0 commit comments