Skip to content

Commit d8f9f50

Browse files
committed
rename Record_float into object
1 parent 5a8ff5e commit d8f9f50

File tree

9 files changed

+14
-15
lines changed

9 files changed

+14
-15
lines changed

jscomp/core/lam_convert.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ let convert_record_repr ( x : Types.record_representation)
194194
: Lam_primitive.record_representation =
195195
match x with
196196
| Record_regular
197-
| Record_float -> Record_regular
197+
| Record_object -> Record_regular (* FIX later*)
198198
| Record_extension -> Record_extension
199199
| Record_unboxed _ -> assert false
200200
(* see patches in {!Typedecl.get_unboxed_from_attributes}*)

jscomp/ml/includecore.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ let report_type_mismatch0 first second decl ppf err =
170170
| Record_representation b ->
171171
pr "Their internal representations differ:@ %s %s %s"
172172
(if b then second else first) decl
173-
"uses unboxed float representation"
173+
"uses @@obj representation"
174174
| Unboxed_representation b ->
175175
pr "Their internal representations differ:@ %s %s %s"
176176
(if b then second else first) decl
@@ -320,7 +320,7 @@ let type_declarations ?(equality = false) ~loc env name decl1 id decl2 =
320320
let err = compare_records ~loc env decl1.type_params decl2.type_params
321321
1 labels1 labels2 in
322322
if err <> [] || rep1 = rep2 then err else
323-
[Record_representation (rep2 = Record_float)]
323+
[Record_representation (rep2 = Record_object)]
324324
| (Type_open, Type_open) -> []
325325
| (_, _) -> [Kind]
326326
in

jscomp/ml/matching.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ let make_record_matching loc all_labels def = function
15931593
let lbl = all_labels.(pos) in
15941594
let access =
15951595
match lbl.lbl_repres with
1596-
| Record_regular | Record_float ->
1596+
| Record_regular | Record_object ->
15971597
Lprim (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [arg], loc)
15981598
| Record_inlined _ ->
15991599
Lprim (Pfield (lbl.lbl_pos, Fld_record_inline {name = lbl.lbl_name}), [arg], loc)

jscomp/ml/printlambda.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ let record_rep ppf r =
7777
| Record_inlined {tag = i} -> fprintf ppf "inlined(%i)" i
7878
| Record_unboxed false -> fprintf ppf "unboxed"
7979
| Record_unboxed true -> fprintf ppf "inlined(unboxed)"
80-
| Record_float -> fprintf ppf "float"
80+
| Record_object -> fprintf ppf "object"
8181
| Record_extension -> fprintf ppf "ext"
8282
;;
8383

jscomp/ml/printtyped.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ let arg_label i ppf = function
151151

152152
let record_representation i ppf = let open Types in function
153153
| Record_regular -> line i ppf "Record_regular\n"
154-
| Record_float -> line i ppf "Record_float\n"
154+
| Record_object -> line i ppf "Record_object\n"
155155
| Record_unboxed b -> line i ppf "Record_unboxed %b\n" b
156156
| Record_inlined {tag = i} -> line i ppf "Record_inlined %d\n" i
157157
| Record_extension -> line i ppf "Record_extension\n"

jscomp/ml/translcore.ml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ and transl_exp0 e =
748748
| Texp_field(arg, _, lbl) ->
749749
let targ = transl_exp arg in
750750
begin match lbl.lbl_repres with
751-
Record_regular | Record_float ->
751+
Record_regular | Record_object ->
752752
Lprim (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [targ], e.exp_loc)
753753
| Record_inlined _ ->
754754
Lprim (Pfield (lbl.lbl_pos, Fld_record_inline {name = lbl.lbl_name}), [targ], e.exp_loc)
@@ -759,12 +759,11 @@ and transl_exp0 e =
759759
| Texp_setfield(arg, _, lbl, newval) ->
760760
let access =
761761
match lbl.lbl_repres with
762-
Record_regular ->
762+
Record_regular | Record_object ->
763763
Psetfield(lbl.lbl_pos, !Lambda.fld_record_set lbl)
764764
| Record_inlined _ ->
765765
Psetfield(lbl.lbl_pos, Fld_record_inline_set lbl.lbl_name)
766766
| Record_unboxed _ -> assert false
767-
| Record_float -> Psetfield (lbl.lbl_pos, !Lambda.fld_record_set lbl)
768767
| Record_extension ->
769768
Psetfield (lbl.lbl_pos + 1, Fld_record_extension_set lbl.lbl_name)
770769
in
@@ -1011,7 +1010,7 @@ and transl_record loc env fields repres opt_init_expr =
10111010
| Kept _ ->
10121011
let access =
10131012
match repres with
1014-
Record_regular | Record_float -> Pfield (i, !Lambda.fld_record lbl)
1013+
Record_regular | Record_object -> Pfield (i, !Lambda.fld_record lbl)
10151014
| Record_inlined _ -> Pfield (i, Fld_record_inline {name = lbl.lbl_name})
10161015
| Record_unboxed _ -> assert false
10171016
| Record_extension -> Pfield (i + 1, Fld_record_extension {name = lbl.lbl_name})in
@@ -1071,12 +1070,12 @@ and transl_record loc env fields repres opt_init_expr =
10711070
| Overridden (_lid, expr) ->
10721071
let upd =
10731072
match repres with
1074-
Record_regular ->
1073+
| Record_object
1074+
| Record_regular ->
10751075
Psetfield(lbl.lbl_pos, !Lambda.fld_record_set lbl)
10761076
| Record_inlined _ ->
10771077
Psetfield(lbl.lbl_pos, Fld_record_inline_set lbl.lbl_name)
10781078
| Record_unboxed _ -> assert false
1079-
| Record_float -> Psetfield (lbl.lbl_pos, !Lambda.fld_record_set lbl)
10801079
| Record_extension ->
10811080
Psetfield(lbl.lbl_pos + 1, Fld_record_extension_set lbl.lbl_name)
10821081
in

jscomp/ml/typecore.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ module Label = NameChoice (struct
783783
let unbound_name_error = Typetexp.unbound_label_error
784784
let in_env lbl =
785785
match lbl.lbl_repres with
786-
| Record_regular | Record_float | Record_unboxed false -> true
786+
| Record_regular | Record_object | Record_unboxed false -> true
787787
| Record_unboxed true | Record_inlined _ | Record_extension -> false
788788
end)
789789

jscomp/ml/types.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ and type_kind =
151151

152152
and record_representation =
153153
Record_regular (* All fields are boxed / tagged *)
154-
| Record_float (* All fields are floats *)
154+
| Record_object (* None fileds can be omitted *)
155155
| Record_unboxed of bool (* Unboxed single-field record, inlined or not *)
156156
| Record_inlined of {tag : int; name : string; num_nonconsts : int} (* Inlined record *)
157157
| Record_extension (* Inlined record under extension *)

jscomp/ml/types.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ and type_kind =
298298

299299
and record_representation =
300300
Record_regular (* All fields are boxed / tagged *)
301-
| Record_float (* All fields are floats *)
301+
| Record_object (* All fields are floats *)
302302
| Record_unboxed of bool (* Unboxed single-field record, inlined or not *)
303303
| Record_inlined of { tag : int ; name : string; num_nonconsts : int} (* Inlined record *)
304304
| Record_extension (* Inlined record under extension *)

0 commit comments

Comments
 (0)