Skip to content

Commit a4a79a1

Browse files
authored
Merge 5.2.0minus-16 (#172)
* Import ocaml sources for oxcaml/oxcaml@00e9f22e7c5 * Automatic (non-conflicty) merges * Commit merge conflicts * Resolve conflicts (with type errors outstanding) * Fix some type errors * Fix more errors * Fix remaining type errors * Bump magic numbers for 5.2.0minus-16 * Promote some tests * Promote jkind formatting change * Resolve crs * Add ignored flags * Comment out assertion that was causing tests to fail * Bump dune version in CI * Prevent short paths from inserting duplicates into the graph
1 parent c537a55 commit a4a79a1

File tree

212 files changed

+34597
-25027
lines changed

Some content is hidden

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

212 files changed

+34597
-25027
lines changed

.github/workflows/flambda-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
run: |
7575
opam switch create 4.14.0 --yes
7676
opam switch link 4.14.0 --yes
77-
opam install --yes dune.3.10.0 menhir.20231231
77+
opam install --yes dune.3.19.1 menhir.20231231
7878
7979
- name: Configure, build, and install flambda-backend
8080
if: steps.cache.outputs.cache-hit != 'true'

src/analysis/browse_misc.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ let summary_prev = function
5454
| Env.Env_value (s, _, _, _)
5555
| Env.Env_type (s, _, _)
5656
| Env.Env_extension (s, _, _)
57-
| Env.Env_module (s, _, _, _)
57+
| Env.Env_module (s, _, _, _, _, _)
5858
| Env.Env_modtype (s, _, _)
5959
| Env.Env_class (s, _, _)
6060
| Env.Env_cltype (s, _, _)
@@ -82,7 +82,7 @@ let signature_of_env ?(ignore_extensions = true) env =
8282
Some (Sig_typext (i, e, Text_exception, Exported))
8383
| _ -> Some (Sig_typext (i, e, Text_first, Exported))
8484
end
85-
| Env_module (_, i, pr, m) ->
85+
| Env_module (_, i, pr, m, _, _) ->
8686
Some (Sig_module (i, pr, m, Trec_not, Exported))
8787
| Env_modtype (_, i, m) -> Some (Sig_modtype (i, m, Exported))
8888
| Env_class (_, i, c) -> Some (Sig_class (i, c, Trec_not, Exported))
@@ -97,7 +97,7 @@ let signature_of_env ?(ignore_extensions = true) env =
9797
| Env_module_unbound _ -> None
9898
in
9999
let summary_module_ident_opt = function
100-
| Env.Env_module (_, i, _, _) -> Some i
100+
| Env.Env_module (_, i, _, _, _, _) -> Some i
101101
| _ -> None
102102
in
103103
let sg = ref [] in

src/analysis/destruct.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,7 @@ module Conv = struct
647647
let lst = List.map ~f:loop lst in
648648
let mut : Asttypes.mutable_flag =
649649
match mut with
650-
| Mutable mode ->
651-
assert (
652-
Mode.Alloc.Comonadic.Const.equal mode
653-
Mode.Alloc.Comonadic.Const.legacy);
654-
Mutable
650+
| Mutable _mode -> Mutable
655651
| Immutable -> Immutable
656652
in
657653
mkpat (Ppat_array (mut, lst))

src/analysis/tail_analysis.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,15 @@ let expr_tail_positions = function
8787
| Texp_probe_is_enabled _
8888
| Texp_src_pos
8989
| Texp_overwrite _
90+
| Texp_mutvar _
91+
| Texp_setmutvar _
9092
| Texp_hole _ -> []
9193
| Texp_match (_, _, cs, _) -> List.map cs ~f:(fun c -> Case c)
9294
| Texp_try (_, cs) -> List.map cs ~f:(fun c -> Case c)
9395
| Texp_letmodule (_, _, _, _, e)
9496
| Texp_letexception (_, e)
9597
| Texp_let (_, _, e)
98+
| Texp_letmutable (_, e)
9699
| Texp_sequence (_, _, e)
97100
| Texp_ifthenelse (_, e, None)
98101
| Texp_open (_, e) -> [ Expression e ]

src/frontend/query_commands.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ let dispatch pipeline (type a) : a Query_protocol.t -> a = function
256256
| Stack_or_heap_enclosing.Alloc_mode alloc_mode, true ->
257257
let locality =
258258
alloc_mode
259-
|> Mode.Alloc.proj (Comonadic Areality)
259+
|> Mode.Alloc.proj_comonadic Areality
260260
|> Mode.Locality.Guts.check_const_conservative
261261
in
262262
let str =

src/kernel/mconfig.ml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ let ocaml_ignored_flags =
521521
"-flambda2-expert-phantom-lets";
522522
"-flambda2-inlining-report-bin";
523523
"-flambda2-join-points";
524-
"-flambda2-result-types";
524+
"-no-flambda2-result-types";
525525
"-flambda2-result-types-all-functions";
526526
"-flambda2-result-types-functors-only";
527527
"-flambda2-speculative-inlining-only-if-arguments-useful";
@@ -554,6 +554,7 @@ let ocaml_ignored_flags =
554554
"-flambda2-advanced-meet";
555555
"-directory";
556556
(* Jane Street specific *)
557+
"-disable-builtin-check";
557558
"-disable-poll-insertion";
558559
"-gdwarf-may-alter-codegen";
559560
"-gno-dwarf-may-alter-codegen";
@@ -614,7 +615,18 @@ let ocaml_ignored_flags =
614615
"-dflambda-heavy-invariants";
615616
"-cfg-eliminate-dead-trap-handlers";
616617
"-no-cfg-eliminate-dead-trap-handlers";
617-
"-module-entry-functions-section"
618+
"-module-entry-functions-section";
619+
"-zero-alloc-checker-details-extra";
620+
"-no-zero-alloc-checker-details-extra";
621+
"-favx512f";
622+
"-fno-avx512f";
623+
"-favx2";
624+
"-fno-avx2";
625+
"-favx";
626+
"-fno-avx";
627+
"-dllvmir";
628+
"-keep-llvmir";
629+
"-llvm-path"
618630
]
619631

620632
let ocaml_ignored_parametrized_flags =

src/ocaml-index/tests/tests-dirs/local-shape-and-include.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
uid: Main.3; locs: "g": File "main.ml", line 9, characters 6-7
3434
uid: Main.4; locs: "g": File "main.ml", line 3, characters 6-7
3535
uid: Main.5; locs: "B": File "main.ml", line 2, characters 7-8
36-
uid: Stdlib__String.173; locs:
36+
uid: Stdlib__String.171; locs:
3737
"String.equal": File "main.ml", line 1, characters 8-20
3838
}, 0 approx shapes: {}, and shapes for CUS .
3939
and related uids:{(Main.3 Main.4)}
@@ -51,7 +51,7 @@
5151
uid: Main.3; locs: "g": File "main.ml", line 9, characters 6-7
5252
uid: Main.4; locs: "g": File "main.ml", line 3, characters 6-7
5353
uid: Main.5; locs: "B": File "main.ml", line 2, characters 7-8
54-
uid: Stdlib__String.173; locs:
54+
uid: Stdlib__String.171; locs:
5555
"String.equal": File "main.ml", line 1, characters 8-20
5656
}, 0 approx shapes: {}, and shapes for CUS .
5757
and related uids:{(Main.3 Main.4)}

src/ocaml/merlin_specific/browse_raw.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,11 @@ let of_method_call obj meth loc env (f : _ f0) acc =
372372
app (Method_call (obj, meth, loc)) env f acc
373373

374374
let rec of_expression_desc loc = function
375-
| Texp_ident _ | Texp_constant _ | Texp_instvar _
375+
| Texp_ident _ | Texp_constant _ | Texp_instvar _ | Texp_mutvar _
376376
| Texp_variant (_, None)
377377
| Texp_new _ | Texp_src_pos | Texp_typed_hole -> id_fold
378378
| Texp_let (_, vbs, e) -> of_expression e ** list_fold of_value_binding vbs
379+
| Texp_letmutable (vb, e) -> of_expression e ** of_value_binding vb
379380
| Texp_function { params; body; _ } ->
380381
list_fold of_function_param params ** of_function_body body
381382
| Texp_apply (e, ls, _, _, _) ->
@@ -396,6 +397,7 @@ let rec of_expression_desc loc = function
396397
| Texp_assert (e, _)
397398
| Texp_lazy e
398399
| Texp_setinstvar (_, _, _, e) -> of_expression e
400+
| Texp_setmutvar (_, _, e) -> of_expression e
399401
| Texp_record { fields; extended_expression } ->
400402
option_fold (fun (e, _, _) -> of_expression e) extended_expression
401403
**

src/ocaml/parsing/ast_helper.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ module Exp = struct
220220

221221
let ident ?loc ?attrs a = mk ?loc ?attrs (Pexp_ident a)
222222
let constant ?loc ?attrs a = mk ?loc ?attrs (Pexp_constant a)
223-
let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_let (a, b, c))
223+
let let_ ?loc ?attrs a b c d = mk ?loc ?attrs (Pexp_let (a, b, c, d))
224224
let function_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_function (a, b, c))
225225
let apply ?loc ?attrs a b = mk ?loc ?attrs (Pexp_apply (a, b))
226226
let match_ ?loc ?attrs a b = mk ?loc ?attrs (Pexp_match (a, b))
@@ -244,7 +244,7 @@ module Exp = struct
244244
let coerce ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_coerce (a, b, c))
245245
let send ?loc ?attrs a b = mk ?loc ?attrs (Pexp_send (a, b))
246246
let new_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_new a)
247-
let setinstvar ?loc ?attrs a b = mk ?loc ?attrs (Pexp_setinstvar (a, b))
247+
let setinstvar ?loc ?attrs a b = mk ?loc ?attrs (Pexp_setvar (a, b))
248248
let override ?loc ?attrs a = mk ?loc ?attrs (Pexp_override a)
249249
let letmodule ?loc ?attrs a b c= mk ?loc ?attrs (Pexp_letmodule (a, b, c))
250250
let letmodule_no_opt ?loc ?attrs s b c=

src/ocaml/parsing/ast_helper.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ module Exp:
154154

155155
val ident: ?loc:loc -> ?attrs:attrs -> lid -> expression
156156
val constant: ?loc:loc -> ?attrs:attrs -> constant -> expression
157-
val let_: ?loc:loc -> ?attrs:attrs -> rec_flag -> value_binding list
158-
-> expression -> expression
157+
val let_: ?loc:loc -> ?attrs:attrs -> mutable_flag -> rec_flag ->
158+
value_binding list -> expression -> expression
159159
val function_ : ?loc:loc -> ?attrs:attrs -> function_param list
160160
-> function_constraint -> function_body
161161
-> expression

0 commit comments

Comments
 (0)