@@ -35636,13 +35636,13 @@ val ref_tag_info : tag_info
35636
35636
type field_dbg_info =
35637
35637
| Fld_na
35638
35638
| Fld_record of {name : string; mutable_flag : Asttypes.mutable_flag}
35639
- | Fld_module of string
35640
- | Fld_record_inline of string
35641
- | Fld_record_extension of string
35639
+ | Fld_module of {name : string}
35640
+ | Fld_record_inline of {name : string}
35641
+ | Fld_record_extension of {name : string}
35642
35642
| Fld_tuple
35643
35643
| Fld_poly_var_tag
35644
35644
| Fld_poly_var_content
35645
-
35645
+ | Fld_extension_slot
35646
35646
val fld_record :
35647
35647
(Types.label_description ->
35648
35648
field_dbg_info) ref
@@ -36098,13 +36098,13 @@ let ref_tag_info : tag_info = Blk_record [| "contents" |]
36098
36098
type field_dbg_info =
36099
36099
| Fld_na
36100
36100
| Fld_record of {name : string; mutable_flag : Asttypes.mutable_flag}
36101
- | Fld_module of string
36102
- | Fld_record_inline of string
36103
- | Fld_record_extension of string
36101
+ | Fld_module of {name : string }
36102
+ | Fld_record_inline of { name : string}
36103
+ | Fld_record_extension of {name : string}
36104
36104
| Fld_tuple
36105
36105
| Fld_poly_var_tag
36106
36106
| Fld_poly_var_content
36107
-
36107
+ | Fld_extension_slot
36108
36108
let fld_record = ref (fun (lbl : Types.label_description) ->
36109
36109
Fld_record {name = lbl.lbl_name; mutable_flag = Mutable})
36110
36110
@@ -36637,7 +36637,7 @@ let rec transl_normal_path = function
36637
36637
then Lprim(Pgetglobal id, [], Location.none)
36638
36638
else Lvar id
36639
36639
| Pdot(p, s, pos) ->
36640
- Lprim(Pfield (pos, Fld_module s ), [transl_normal_path p], Location.none)
36640
+ Lprim(Pfield (pos, Fld_module {name = s} ), [transl_normal_path p], Location.none)
36641
36641
| Papply _ ->
36642
36642
fatal_error "Lambda.transl_path"
36643
36643
@@ -101029,6 +101029,16 @@ let block_shape ppf shape = match shape with
101029
101029
t;
101030
101030
Format.fprintf ppf ")"
101031
101031
101032
+
101033
+ let str_of_field_info (fld_info : Lambda.field_dbg_info)=
101034
+ match fld_info with
101035
+ | (Fld_module {name } | Fld_record {name} | Fld_record_inline {name} | Fld_record_extension {name})
101036
+ -> name
101037
+ | Fld_na -> "na"
101038
+ | Fld_tuple -> "[]"
101039
+ | Fld_poly_var_tag->"`"
101040
+ | Fld_poly_var_content -> "#"
101041
+ | Fld_extension_slot -> "ext"
101032
101042
let primitive ppf = function
101033
101043
| Pidentity -> fprintf ppf "id"
101034
101044
| Pbytes_to_string -> fprintf ppf "bytes_to_string"
@@ -101043,8 +101053,7 @@ let primitive ppf = function
101043
101053
fprintf ppf "makeblock %i%a" tag block_shape shape
101044
101054
| Pmakeblock(tag, _, Mutable, shape) ->
101045
101055
fprintf ppf "makemutable %i%a" tag block_shape shape
101046
- | Pfield (n, (Fld_module s | Fld_record {name=s})) -> fprintf ppf "field:%s/%i" s n
101047
- | Pfield (n,_) -> fprintf ppf "field %i" n
101056
+ | Pfield (n, fld) -> fprintf ppf "field:%s/%i" (str_of_field_info fld) n
101048
101057
| Pfield_computed -> fprintf ppf "field_computed"
101049
101058
| Psetfield(n, ptr, init, _) ->
101050
101059
let instr =
@@ -104056,7 +104065,7 @@ let get_mod_field modname field =
104056
104065
with Not_found ->
104057
104066
fatal_error ("Primitive "^modname^"."^field^" not found.")
104058
104067
in
104059
- Lprim(Pfield (p, Fld_module field),
104068
+ Lprim(Pfield (p, Fld_module {name = field} ),
104060
104069
[Lprim(Pgetglobal mod_ident, [], Location.none)],
104061
104070
Location.none)
104062
104071
with Not_found -> fatal_error ("Module "^modname^" unavailable.")
@@ -104227,10 +104236,10 @@ let make_record_matching loc all_labels def = function
104227
104236
| Record_regular ->
104228
104237
Lprim (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [arg], loc)
104229
104238
| Record_inlined _ ->
104230
- Lprim (Pfield (lbl.lbl_pos, Fld_record_inline lbl.lbl_name), [arg], loc)
104239
+ Lprim (Pfield (lbl.lbl_pos, Fld_record_inline {name = lbl.lbl_name} ), [arg], loc)
104231
104240
| Record_unboxed _ -> arg
104232
104241
| Record_float -> Lprim (Pfloatfield (lbl.lbl_pos, !Lambda.fld_record lbl), [arg], loc)
104233
- | Record_extension -> Lprim (Pfield (lbl.lbl_pos + 1, Fld_record_extension lbl.lbl_name), [arg], loc)
104242
+ | Record_extension -> Lprim (Pfield (lbl.lbl_pos + 1, Fld_record_extension {name = lbl.lbl_name} ), [arg], loc)
104234
104243
in
104235
104244
let str =
104236
104245
match lbl.lbl_mut with
@@ -104929,7 +104938,7 @@ let combine_constructor sw_names loc arg ex_pat cstr partial ctx def
104929
104938
nonconsts
104930
104939
default
104931
104940
in
104932
- Llet(Alias, Pgenval,tag, Lprim(Pfield (0, Fld_na ), [arg], loc), tests)
104941
+ Llet(Alias, Pgenval,tag, Lprim(Pfield (0, Fld_extension_slot ), [arg], loc), tests)
104933
104942
in
104934
104943
List.fold_right
104935
104944
(fun (path, act) rem ->
@@ -105532,9 +105541,9 @@ let partial_function loc () =
105532
105541
Filename.basename fname
105533
105542
in
105534
105543
105535
- Lprim(Praise Raise_regular, [Lprim(Pmakeblock(0, Lambda. Blk_extension, Immutable, None),
105544
+ Lprim(Praise Raise_regular, [Lprim(Pmakeblock(0, Blk_extension, Immutable, None),
105536
105545
[transl_normal_path Predef.path_match_failure;
105537
- Lconst(Const_block(0, Lambda. Blk_tuple,
105546
+ Lconst(Const_block(0, Blk_tuple,
105538
105547
[Const_base(Const_string (fname, None));
105539
105548
Const_base(Const_int line);
105540
105549
Const_base(Const_int char)]))], loc)], loc)
@@ -106923,9 +106932,9 @@ let assert_failed exp =
106923
106932
in
106924
106933
106925
106934
Lprim(Praise Raise_regular, [event_after exp
106926
- (Lprim(Pmakeblock(0, Lambda. Blk_extension, Immutable, None),
106935
+ (Lprim(Pmakeblock(0, Blk_extension, Immutable, None),
106927
106936
[transl_normal_path Predef.path_assert_failure;
106928
- Lconst(Const_block(0, Lambda. Blk_tuple,
106937
+ Lconst(Const_block(0, Blk_tuple,
106929
106938
[Const_base(Const_string (fname, None));
106930
106939
Const_base(Const_int line);
106931
106940
Const_base(Const_int char)]))], exp.exp_loc))], exp.exp_loc)
@@ -107181,11 +107190,11 @@ and transl_exp0 e =
107181
107190
Record_regular ->
107182
107191
Lprim (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [targ], e.exp_loc)
107183
107192
| Record_inlined _ ->
107184
- Lprim (Pfield (lbl.lbl_pos, Fld_record_inline lbl.lbl_name), [targ], e.exp_loc)
107193
+ Lprim (Pfield (lbl.lbl_pos, Fld_record_inline {name = lbl.lbl_name} ), [targ], e.exp_loc)
107185
107194
| Record_unboxed _ -> targ
107186
107195
| Record_float -> Lprim (Pfloatfield (lbl.lbl_pos, !Lambda.fld_record lbl), [targ], e.exp_loc)
107187
107196
| Record_extension ->
107188
- Lprim (Pfield (lbl.lbl_pos + 1, Fld_record_extension lbl.lbl_name), [targ], e.exp_loc)
107197
+ Lprim (Pfield (lbl.lbl_pos + 1, Fld_record_extension {name = lbl.lbl_name} ), [targ], e.exp_loc)
107189
107198
end
107190
107199
| Texp_setfield(arg, _, lbl, newval) ->
107191
107200
let access =
@@ -107586,9 +107595,9 @@ and transl_record loc env fields repres opt_init_expr =
107586
107595
let access =
107587
107596
match repres with
107588
107597
Record_regular -> Pfield (i, !Lambda.fld_record lbl)
107589
- | Record_inlined _ -> Pfield (i, Fld_record_inline lbl.lbl_name)
107598
+ | Record_inlined _ -> Pfield (i, Fld_record_inline {name = lbl.lbl_name} )
107590
107599
| Record_unboxed _ -> assert false
107591
- | Record_extension -> Pfield (i + 1, Fld_record_extension lbl.lbl_name)
107600
+ | Record_extension -> Pfield (i + 1, Fld_record_extension {name = lbl.lbl_name} )
107592
107601
| Record_float -> Pfloatfield (i, !Lambda.fld_record lbl) in
107593
107602
Lprim(access, [Lvar init_id], loc), field_kind
107594
107603
| Overridden (_lid, expr) ->
@@ -108814,9 +108823,9 @@ let rec apply_coercion loc strict restr arg =
108814
108823
assert (List.length runtime_fields = List.length pos_cc_list);
108815
108824
let names = Array.of_list runtime_fields in
108816
108825
name_lambda strict arg (fun id ->
108817
- let get_field_i i pos = Lprim(Pfield (pos, Fld_module names.(i)),[Lvar id], loc) in
108826
+ let get_field_i i pos = Lprim(Pfield (pos, Fld_module {name = names.(i)} ),[Lvar id], loc) in
108818
108827
let get_field_name name pos =
108819
- Lprim (Pfield (pos, Fld_module name), [Lvar id], loc) in
108828
+ Lprim (Pfield (pos, Fld_module { name} ), [Lvar id], loc) in
108820
108829
let lam =
108821
108830
Lprim(Pmakeblock(0, Lambda.Blk_module runtime_fields, Immutable, None),
108822
108831
List.mapi (fun i x -> apply_coercion_field loc (get_field_i i) x) pos_cc_list,
@@ -109407,7 +109416,7 @@ and transl_structure loc fields cc rootpath final_env = function
109407
109416
rebind_idents (pos + 1) (id :: newfields) ids
109408
109417
in
109409
109418
Llet(Alias, Pgenval, id,
109410
- Lprim(Pfield (pos, Fld_module ( Ident.name id) ) , [Lvar mid], incl.incl_loc), body),
109419
+ Lprim(Pfield (pos, Fld_module {name = Ident.name id} ) , [Lvar mid], incl.incl_loc), body),
109411
109420
size
109412
109421
in
109413
109422
let body, size = rebind_idents 0 fields ids in
0 commit comments