Skip to content

Commit f74b090

Browse files
authored
flambda-backend: Rename layouts.ml to jkind.ml (#1886)
1 parent cf32778 commit f74b090

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+132
-191
lines changed

.depend

+32-93
Large diffs are not rendered by default.

boot/ocamlc

992 Bytes
Binary file not shown.

compilerlibs/Makefile.compilerlibs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ PARSING_CMI = \
8282

8383
TYPING = \
8484
typing/path.cmo \
85-
typing/layouts.cmo \
85+
typing/jkind.cmo \
8686
typing/primitive.cmo \
8787
typing/shape.cmo \
8888
typing/mode.cmo \

debugger/.depend

-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ loadprinter.cmo : \
284284
../utils/misc.cmi \
285285
../parsing/longident.cmi \
286286
../utils/load_path.cmi \
287-
../typing/layouts.cmi \
288287
../typing/ident.cmi \
289288
../typing/env.cmi \
290289
../otherlibs/dynlink/dynlink.cmi \
@@ -301,7 +300,6 @@ loadprinter.cmx : \
301300
../utils/misc.cmx \
302301
../parsing/longident.cmx \
303302
../utils/load_path.cmx \
304-
../typing/layouts.cmx \
305303
../typing/ident.cmx \
306304
../typing/env.cmx \
307305
../otherlibs/dynlink/dynlink.cmx \

debugger/loadprinter.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
open Misc
1919
open Longident
20-
open Layouts
2120
open Types
21+
open Layouts
2222

2323
(* Error report *)
2424

dune

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
jane_syntax ; manual update: mli only files asttypes jane_asttypes parsetree
6969

7070
;; TYPING
71-
ident path layouts primitive shape types btype oprint subst predef datarepr
71+
ident path jkind primitive shape types btype oprint subst predef datarepr
7272
cmi_format persistent_env env errortrace mode
7373
typedtree printtyped ctype printtyp includeclass mtype envaux includecore
7474
tast_iterator tast_mapper signature_group cmt_format cms_format untypeast
@@ -264,7 +264,7 @@
264264
(parsetree.mli as compiler-libs/parsetree.mli)
265265
(ident.mli as compiler-libs/ident.mli)
266266
(path.mli as compiler-libs/path.mli)
267-
(layouts.mli as compiler-libs/layouts.mli)
267+
(jkind.mli as compiler-libs/jkind.mli)
268268
(primitive.mli as compiler-libs/primitive.mli)
269269
(types.mli as compiler-libs/types.mli)
270270
(btype.mli as compiler-libs/btype.mli)

lambda/matching.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989

9090
open Misc
9191
open Asttypes
92-
open Layouts
9392
open Types
93+
open Layouts
9494
open Typedtree
9595
open Lambda
9696
open Parmatch

lambda/matching.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ open Debuginfo.Scoped_location
2222
(* Entry points to match compiler *)
2323
val for_function:
2424
scopes:scopes ->
25-
arg_sort:Layouts.sort -> arg_layout:layout -> return_layout:layout ->
25+
arg_sort:Jkind.sort -> arg_layout:layout -> return_layout:layout ->
2626
Location.t -> int ref option -> lambda -> (pattern * lambda) list ->
2727
partial ->
2828
lambda
@@ -31,12 +31,12 @@ val for_trywith:
3131
lambda -> (pattern * lambda) list ->
3232
lambda
3333
val for_let:
34-
scopes:scopes -> arg_sort:Layouts.sort -> return_layout:layout ->
34+
scopes:scopes -> arg_sort:Jkind.sort -> return_layout:layout ->
3535
Location.t -> lambda -> pattern -> lambda ->
3636
lambda
3737
val for_multiple_match:
3838
scopes:scopes -> return_layout:layout -> Location.t ->
39-
(lambda * Layouts.sort * layout) list -> alloc_mode ->
39+
(lambda * Jkind.sort * layout) list -> alloc_mode ->
4040
(pattern * lambda) list -> partial ->
4141
lambda
4242

lambda/transl_array_comprehension.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
open Layouts
1+
open Jkind
22
open Lambda
33
open Typedtree
44
open Asttypes

lambda/transl_array_comprehension.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ open Debuginfo.Scoped_location
2222
so is parameterized by [Translcore.transl_exp], its [scopes] argument, and
2323
the [loc]ation. *)
2424
val comprehension
25-
: transl_exp:(scopes:scopes -> Layouts.sort -> expression -> lambda)
25+
: transl_exp:(scopes:scopes -> Jkind.sort -> expression -> lambda)
2626
-> scopes:scopes
2727
-> loc:scoped_location
2828
-> array_kind:array_kind

lambda/transl_list_comprehension.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
open Layouts
1+
open Jkind
22
open Lambda
33
open Typedtree
44
open Asttypes
@@ -197,7 +197,7 @@ let iterator ~transl_exp ~scopes = function
197197
; element
198198
; element_kind =
199199
Typeopt.layout pattern.pat_env pattern.pat_loc
200-
Layouts.Sort.for_list_element pattern.pat_type
200+
Sort.for_list_element pattern.pat_type
201201
; add_bindings =
202202
(* CR layouts: to change when we allow non-values in sequences *)
203203
Matching.for_let

lambda/transl_list_comprehension.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ open Debuginfo.Scoped_location
1515
so is parameterized by [Translcore.transl_exp], its [scopes] argument, and
1616
the [loc]ation. *)
1717
val comprehension
18-
: transl_exp:(scopes:scopes -> Layouts.sort -> expression -> lambda)
18+
: transl_exp:(scopes:scopes -> Jkind.sort -> expression -> lambda)
1919
-> scopes:scopes
2020
-> loc:scoped_location
2121
-> comprehension

lambda/translclass.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
(**************************************************************************)
1515

1616
open Asttypes
17-
open Layouts
1817
open Types
18+
open Layouts
1919
open Typedtree
2020
open Lambda
2121
open Translobj

lambda/translcore.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
open Misc
2020
open Asttypes
2121
open Primitive
22-
open Layouts
2322
open Types
23+
open Layouts
2424
open Typedtree
2525
open Typeopt
2626
open Lambda

lambda/translcore.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ open Debuginfo.Scoped_location
2424
val pure_module : module_expr -> let_kind
2525

2626
(* Used for translating Alloc_heap values in classes and modules. *)
27-
val transl_exp: scopes:scopes -> Layouts.sort -> expression -> lambda
27+
val transl_exp: scopes:scopes -> Jkind.sort -> expression -> lambda
2828
val transl_apply: scopes:scopes
2929
-> ?tailcall:tailcall_attribute
3030
-> ?inlined:inlined_attribute
@@ -42,13 +42,13 @@ val transl_extension_constructor: scopes:scopes ->
4242
Env.t -> Longident.t option ->
4343
extension_constructor -> lambda
4444

45-
val transl_scoped_exp : scopes:scopes -> Layouts.sort -> expression -> lambda
45+
val transl_scoped_exp : scopes:scopes -> Jkind.sort -> expression -> lambda
4646

4747
type error =
4848
Free_super_var
4949
| Unreachable_reached
5050
| Bad_probe_layout of Ident.t
51-
| Illegal_record_field of Layouts.Sort.const
51+
| Illegal_record_field of Jkind.Sort.const
5252
| Void_sort of Types.type_expr
5353

5454
exception Error of Location.t * error

lambda/translmod.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
open Misc
2020
open Asttypes
21-
open Layouts
2221
open Types
22+
open Layouts
2323
open Typedtree
2424
open Lambda
2525
open Translobj

lambda/translmod.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type unsafe_info =
5353
type error =
5454
Circular_dependency of (Ident.t * unsafe_info) list
5555
| Conflicting_inline_attributes
56-
| Non_value_layout of Types.type_expr * Layouts.Layout.Violation.t
56+
| Non_value_layout of Types.type_expr * Jkind.Layout.Violation.t
5757

5858
exception Error of Location.t * error
5959

middle_end/convert_primitives.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ let convert (prim : Lambda.primitive) : Clambda_primitives.primitive =
159159
~effects:Only_generative_effects
160160
~coeffects:Has_coeffects
161161
~native_name:"caml_obj_dup"
162-
~native_repr_args:[P.Prim_global, P.Same_as_ocaml_repr Layouts.Sort.Value]
163-
~native_repr_res:(P.Prim_global, P.Same_as_ocaml_repr Layouts.Sort.Value))
162+
~native_repr_args:[P.Prim_global, P.Same_as_ocaml_repr Jkind.Sort.Value]
163+
~native_repr_res:(P.Prim_global, P.Same_as_ocaml_repr Jkind.Sort.Value))
164164
| Punbox_float -> Punbox_float
165165
| Pbox_float m -> Pbox_float m
166166
| Punbox_int bi -> Punbox_int bi

ocamldoc/.depend

-2
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ odoc_sig.cmo : \
665665
odoc_class.cmo \
666666
../parsing/longident.cmi \
667667
../parsing/location.cmi \
668-
../typing/layouts.cmi \
669668
../parsing/jane_syntax.cmi \
670669
../typing/ident.cmi \
671670
../typing/ctype.cmi \
@@ -691,7 +690,6 @@ odoc_sig.cmx : \
691690
odoc_class.cmx \
692691
../parsing/longident.cmx \
693692
../parsing/location.cmx \
694-
../typing/layouts.cmx \
695693
../parsing/jane_syntax.cmx \
696694
../typing/ident.cmx \
697695
../typing/ctype.cmx \

ocamldoc/odoc_sig.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
(** Analysis of interface files. *)
1717

1818
open Asttypes
19-
open Layouts
2019
open Types
20+
open Layouts
2121
open Odoc_parameter
2222
open Odoc_value
2323
open Odoc_type

otherlibs/dynlink/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ COMPILERLIBS_SOURCES=\
112112
typing/mode.ml \
113113
typing/path.ml \
114114
typing/shape.ml \
115-
typing/layouts.ml \
115+
typing/jkind.ml \
116116
typing/primitive.ml \
117117
typing/types.ml \
118118
typing/btype.ml \

otherlibs/dynlink/dune

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
ident
5656
path
5757
shape
58-
layouts
58+
jkind
5959
primitive
6060
mode
6161
types
@@ -143,7 +143,7 @@
143143
(copy_files ../../parsing/builtin_attributes.ml)
144144
(copy_files ../../typing/ident.ml)
145145
(copy_files ../../typing/path.ml)
146-
(copy_files ../../typing/layouts.ml)
146+
(copy_files ../../typing/jkind.ml)
147147
(copy_files ../../typing/primitive.ml)
148148
(copy_files ../../typing/shape.ml)
149149
(copy_files ../../typing/mode.ml)
@@ -203,7 +203,7 @@
203203
(copy_files ../../parsing/builtin_attributes.mli)
204204
(copy_files ../../typing/ident.mli)
205205
(copy_files ../../typing/path.mli)
206-
(copy_files ../../typing/layouts.mli)
206+
(copy_files ../../typing/jkind.mli)
207207
(copy_files ../../typing/primitive.mli)
208208
(copy_files ../../typing/shape.mli)
209209
(copy_files ../../typing/mode.mli)
@@ -301,7 +301,7 @@
301301
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Builtin_attributes.cmo
302302
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Load_path.cmo
303303
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Ast_mapper.cmo
304-
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Layouts.cmo
304+
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Jkind.cmo
305305
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Mode.cmo
306306
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Types.cmo
307307
.dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Btype.cmo
@@ -376,7 +376,7 @@
376376
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Ast_iterator.cmx
377377
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Builtin_attributes.cmx
378378
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Ast_mapper.cmx
379-
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Layouts.cmx
379+
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Jkind.cmx
380380
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Mode.cmx
381381
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Types.cmx
382382
.dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Btype.cmx

stdlib/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ stdlib.cmx: stdlib.ml
221221

222222

223223
# special cases to add the extension flag when compiling float_u
224-
# CR layouts: eventually these can be just [-extension layouts]
224+
# CR jkind: eventually these can be just [-extension layouts]
225225
stdlib__Float_u.cmi:
226226
$(CAMLC) $(COMPFLAGS) -extension layouts_alpha \
227227
-o $@ -c $(filter %.mli, $^)

tools/.depend

-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ cvt_emit.cmx :
3333
debug_printers.cmo : \
3434
../typing/printtyp.cmi \
3535
../typing/path.cmi \
36-
../typing/layouts.cmi \
3736
../typing/ident.cmi \
3837
../typing/ctype.cmi
3938
debug_printers.cmx : \
4039
../typing/printtyp.cmx \
4140
../typing/path.cmx \
42-
../typing/layouts.cmx \
4341
../typing/ident.cmx \
4442
../typing/ctype.cmx
4543
dumpobj.cmo : \

toplevel/genprintval.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ open Misc
1919
open Format
2020
open Longident
2121
open Path
22-
open Layouts
2322
open Types
23+
open Layouts
2424
open Outcometree
2525
module Out_name = Printtyp.Out_name
2626

toplevel/topcommon.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ val record_backtrace : unit -> unit
4949

5050
val find_eval_phrase :
5151
Typedtree.structure ->
52-
(Typedtree.expression * Layouts.sort * Typedtree.attributes * Location.t) option
52+
(Typedtree.expression * Jkind.sort * Typedtree.attributes * Location.t) option
5353

5454
val max_printer_depth: int ref
5555
val max_printer_steps: int ref

toplevel/topdirs.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
open Format
1919
open Misc
2020
open Longident
21-
open Layouts
2221
open Types
22+
open Layouts
2323
open Toploop
2424

2525
let error_fmt () =

typing/btype.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
(* Basic operations on core types *)
1717

1818
open Asttypes
19-
open Layouts
2019
open Types
20+
open Layouts
2121

2222
(**** Sets, maps and hashtables of types ****)
2323

typing/ctype.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
open Misc
1919
open Asttypes
20-
open Layouts
2120
open Types
21+
open Layouts
2222
open Btype
2323
open Errortrace
2424

typing/ctype.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
(* Operations on core types *)
1717

1818
open Asttypes
19-
open Layouts
2019
open Types
20+
open Layouts
2121

2222
exception Unify of Errortrace.unification_error
2323
exception Equality of Errortrace.equality_error

typing/datarepr.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
determining their representation. *)
1818

1919
open Asttypes
20-
open Layouts
2120
open Types
21+
open Layouts
2222
open Btype
2323

2424
(* Simplified version of Ctype.free_vars *)

typing/errortrace.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
(* *)
1616
(**************************************************************************)
1717

18-
open Layouts
1918
open Types
19+
open Layouts
2020
open Format
2121

2222
type position = First | Second

typing/errortrace.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
(* *)
1616
(**************************************************************************)
1717

18-
open Layouts
1918
open Types
19+
open Layouts
2020

2121
type position = First | Second
2222

0 commit comments

Comments
 (0)