Skip to content

Commit 647a5f8

Browse files
committed
keep asm directives argument
1 parent bbfcd16 commit 647a5f8

File tree

10 files changed

+47
-11
lines changed

10 files changed

+47
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(**************************************************************************)
2+
(* *)
3+
(* OCaml *)
4+
(* *)
5+
(* Simon Spies, Jane Street Europe *)
6+
(* *)
7+
(* Copyright 2025 Jane Street Group LLC *)
8+
(* *)
9+
(* All rights reserved. This file is distributed under the terms of *)
10+
(* the GNU Lesser General Public License version 2.1, with the *)
11+
(* special exception on linking described in the file LICENSE. *)
12+
(* *)
13+
(**************************************************************************)
14+
15+
16+
type t = unit
17+
18+
let build_asm_directives () = ()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(**************************************************************************)
2+
(* *)
3+
(* OCaml *)
4+
(* *)
5+
(* Simon Spies, Jane Street Europe *)
6+
(* *)
7+
(* Copyright 2025 Jane Street Group LLC *)
8+
(* *)
9+
(* All rights reserved. This file is distributed under the terms of *)
10+
(* the GNU Lesser General Public License version 2.1, with the *)
11+
(* special exception on linking described in the file LICENSE. *)
12+
(* *)
13+
(**************************************************************************)
14+
15+
16+
type t
17+
18+
val build_asm_directives : unit -> t

backend/debug/dwarf/dwarf_high/dwarf_world.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open Asm_targets
1919
open Dwarf_low
2020

2121
val emit :
22-
asm_directives:(module Asm_directives.S) ->
22+
asm_directives:(Asm_directives_dwarf.t) ->
2323
compilation_unit_proto_die:Proto_die.t ->
2424
compilation_unit_header_label:Asm_label.t ->
2525
debug_loc_table:Debug_loc_table.t ->
@@ -31,7 +31,7 @@ val emit :
3131
unit
3232

3333
val emit_delayed :
34-
asm_directives:(module Asm_directives.S) ->
34+
asm_directives:(Asm_directives_dwarf.t) ->
3535
basic_block_sections:bool ->
3636
binary_backend_available:bool ->
3737
unit

backend/debug/dwarf/dwarf_low/address_index.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ include Identifiable.S with type t := t
2929
val size : t -> Dwarf_int.t
3030

3131
val emit :
32-
asm_directives:(module Asm_directives.S) -> ?comment:string -> t -> unit
32+
asm_directives:(Asm_directives_dwarf.t) -> ?comment:string -> t -> unit
3333

3434
module Pair : Identifiable.S with type t = t * t

backend/debug/dwarf/dwarf_low/dwarf_emittable.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module type S = sig
2424
val size : t -> Dwarf_int.t
2525

2626
(** Emit assembler directives to describe the given entity. *)
27-
val emit : asm_directives:(module Asm_directives.S) -> t -> unit
27+
val emit : asm_directives:(Asm_directives_dwarf.t) -> t -> unit
2828
end
2929

3030
module type S1_ignore = sig
@@ -34,5 +34,5 @@ module type S1_ignore = sig
3434
val size : _ t -> Dwarf_int.t
3535

3636
(** Emit assembler directives to describe the given entity. *)
37-
val emit : asm_directives:(module Asm_directives.S) -> _ t -> unit
37+
val emit : asm_directives:(Asm_directives_dwarf.t) -> _ t -> unit
3838
end

backend/debug/dwarf/dwarf_low/dwarf_int.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ val succ : t -> t
6868
val size : t -> t
6969

7070
val emit :
71-
asm_directives:(module Asm_directives.S) -> ?comment:string -> t -> unit
71+
asm_directives:(Asm_directives_dwarf.t) -> ?comment:string -> t -> unit

backend/debug/dwarf/dwarf_low/dwarf_operator.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ module Size = Make (struct
740740
end)
741741

742742
module Emit = Make (struct
743-
type param = (module Asm_directives.S)
743+
type param = (Asm_directives_dwarf.t)
744744

745745
type result = unit
746746

backend/debug/dwarf/dwarf_ocaml/dwarf.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module L = Linear
2424

2525
type t =
2626
{ state : DS.t;
27-
asm_directives : (module Asm_directives.S);
27+
asm_directives : Asm_directives_dwarf.t;
2828
get_file_id : string -> int;
2929
mutable emitted : bool;
3030
mutable emitted_delayed : bool

backend/debug/dwarf/dwarf_ocaml/dwarf.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type t
2626
val create :
2727
sourcefile:string ->
2828
unit_name:Ident.t ->
29-
asm_directives:(module Asm_directives.S) ->
29+
asm_directives:(Asm_directives_dwarf.t) ->
3030
get_file_id:(string -> int) ->
3131
code_begin:Asm_symbol.t ->
3232
code_end:Asm_symbol.t ->

backend/emitaux.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,11 @@ module Dwarf_helpers = struct
557557

558558
let sourcefile_for_dwarf = ref None
559559

560-
let begin_dwarf ~build_asm_directives ~code_begin ~code_end ~file_emitter =
560+
let begin_dwarf ~code_begin ~code_end ~file_emitter =
561561
match !sourcefile_for_dwarf with
562562
| None -> ()
563563
| Some sourcefile ->
564-
let asm_directives = build_asm_directives () in
564+
let asm_directives = Asm_targets.Asm_directives_dwarf.build_asm_directives () in
565565
let get_file_num = (get_file_num ~file_emitter) in
566566
Asm_targets.Asm_directives_new.debug_header ~get_file_num;
567567
let unit_name =

0 commit comments

Comments
 (0)