Skip to content

Commit

Permalink
Backport: Warning for unused record fields (ocaml/ocaml#10232)
Browse files Browse the repository at this point in the history
Closes ocaml-flambda/flambda-backend#646.

Squashed commit of the following:

commit 1a2370e
Author: Leo White <leo@lpw25.net>
Date:   Mon Mar 22 14:39:26 2021 +0000

    Add Changes entry

commit 47a14b4
Author: Leo White <leo@lpw25.net>
Date:   Wed Feb 17 13:53:02 2021 +0000

    Add warning for unused labels

commit 3a128ca
Author: Leo White <leo@lpw25.net>
Date:   Wed Feb 17 13:52:42 2021 +0000

    Remove unused labels

commit f7ae40d
Author: Leo White <leo@lpw25.net>
Date:   Tue Feb 16 09:31:28 2021 +0000

    Add tests for unused labels
  • Loading branch information
lukemaurer committed Jul 12, 2022
1 parent 67b25c1 commit 25fb404
Show file tree
Hide file tree
Showing 35 changed files with 5,499 additions and 5,290 deletions.
5 changes: 2 additions & 3 deletions asmcomp/asmgen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ let end_gen_implementation ?toplevel ~ppf_dump

type middle_end =
backend:(module Backend_intf.S)
-> filename:string
-> prefixname:string
-> ppf_dump:Format.formatter
-> Lambda.program
Expand All @@ -246,15 +245,15 @@ let asm_filename output_prefix =
then output_prefix ^ ext_asm
else Filename.temp_file "camlasm" ext_asm

let compile_implementation ?toplevel ~backend ~filename ~prefixname ~middle_end
let compile_implementation ?toplevel ~backend ~prefixname ~middle_end
~ppf_dump (program : Lambda.program) =
compile_unit ~output_prefix:prefixname
~asm_filename:(asm_filename prefixname) ~keep_asm:!keep_asm_file
~obj_filename:(prefixname ^ ext_obj)
(fun () ->
Ident.Set.iter Compilenv.require_global program.required_globals;
let clambda_with_constants =
middle_end ~backend ~filename ~prefixname ~ppf_dump program
middle_end ~backend ~prefixname ~ppf_dump program
in
end_gen_implementation ?toplevel ~ppf_dump clambda_with_constants)

Expand Down
2 changes: 0 additions & 2 deletions asmcomp/asmgen.mli
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
(** The type of converters from Lambda to Clambda. *)
type middle_end =
backend:(module Backend_intf.S)
-> filename:string
-> prefixname:string
-> ppf_dump:Format.formatter
-> Lambda.program
Expand All @@ -28,7 +27,6 @@ type middle_end =
val compile_implementation
: ?toplevel:(string -> bool)
-> backend:(module Backend_intf.S)
-> filename:string
-> prefixname:string
-> middle_end:middle_end
-> ppf_dump:Format.formatter
Expand Down
1 change: 0 additions & 1 deletion asmcomp/asmpackager.ml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ let make_package_object ~ppf_dump members targetobj targetname coercion
program, Closure_middle_end.lambda_to_clambda
in
Asmgen.compile_implementation ~backend
~filename:targetname
~prefixname
~middle_end
~ppf_dump
Expand Down

0 comments on commit 25fb404

Please sign in to comment.