@@ -280,10 +280,7 @@ let select i32 i64 f32 f64 op =
280280 | F32 x -> f32 " 32" x
281281 | F64 x -> f64 " 64" x
282282
283- type ctx =
284- { mutable function_refs : Code.Var.Set .t
285- ; debug : Parse_bytecode.Debug .t
286- }
283+ type ctx = { mutable function_refs : Code.Var.Set .t }
287284
288285let reference_function ctx f = ctx.function_refs < - Code.Var.Set. add f ctx.function_refs
289286
@@ -523,11 +520,10 @@ let expression_or_instructions ctx st in_function =
523520 :: List. concat (List. map ~f: expression (l @ [ e ])))
524521 ]
525522 | Location (loc , i ) -> (
526- let loc = Generate. source_location ctx.debug loc in
527523 match loc with
528- | Javascript. N | U | Pi Parse_info. { src = None ; _ } ->
524+ | None | Some Parse_info. { src = None | Some "" ; _ } ->
529525 Comment " @" :: instruction i
530- | Pi Parse_info. { src = Some src ; col; line; _ } ->
526+ | Some Parse_info. { src = Some src ; col; line; _ } ->
531527 let loc = Format. sprintf " %s:%d:%d" src line col in
532528 Comment (" @ " ^ loc) :: instruction i)
533529 and instructions l = List. concat (List. map ~f: instruction l) in
@@ -630,9 +626,9 @@ let field ctx st f =
630626 | Type [ t ] -> [ type_field st t ]
631627 | Type l -> [ List (Atom " rec" :: List. map ~f: (type_field st) l) ]
632628
633- let f ~ debug ch fields =
629+ let f ch fields =
634630 let st = build_name_tables fields in
635- let ctx = { function_refs = Code.Var.Set. empty; debug } in
631+ let ctx = { function_refs = Code.Var.Set. empty } in
636632 let other_fields = List. concat (List. map ~f: (fun f -> field ctx st f) fields) in
637633 let funct_decl =
638634 let functions = Code.Var.Set. elements ctx.function_refs in
0 commit comments