Skip to content

Commit 63be0b6

Browse files
authored
Merge pull request #4549 from BuckleScript/update_suptream
update upstream
2 parents 0799d1c + ca2c321 commit 63be0b6

File tree

4 files changed

+175
-22
lines changed

4 files changed

+175
-22
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21523,7 +21523,7 @@ let make_key e =
2152321523
(* make_key is used for normalizing let-bound variables *)
2152421524
let rec tr_rec env e =
2152521525
incr count ;
21526-
if !count > max_raw then raise Not_simple ; (* Too big ! *)
21526+
if !count > max_raw then raise_notrace Not_simple ; (* Too big ! *)
2152721527
match e with
2152821528
| Lvar id ->
2152921529
begin
@@ -21532,7 +21532,7 @@ let make_key e =
2153221532
end
2153321533
| Lconst (Const_base (Const_string _)) ->
2153421534
(* Mutable constants are not shared *)
21535-
raise Not_simple
21535+
raise_notrace Not_simple
2153621536
| Lconst _ -> e
2153721537
| Lapply ap ->
2153821538
Lapply {ap with ap_func = tr_rec env ap.ap_func;
@@ -21578,7 +21578,7 @@ let make_key e =
2157821578
(* Beware: (PR#6412) the event argument to Levent
2157921579
may include cyclic structure of type Type.typexpr *)
2158021580
| Levent _ ->
21581-
raise Not_simple
21581+
raise_notrace Not_simple
2158221582

2158321583
and tr_recs env es = List.map (tr_rec env) es
2158421584

@@ -65165,7 +65165,31 @@ module Matching : sig
6516565165
open Typedtree
6516665166
open Lambda
6516765167

65168+
val call_switcher_variant_constant :
65169+
(Location.t ->
65170+
Lambda.lambda option ->
65171+
Lambda.lambda ->
65172+
(int * Lambda.lambda) list ->
65173+
Lambda.switch_names option ->
65174+
Lambda.lambda)
65175+
ref
65176+
65177+
val call_switcher_variant_constr :
65178+
(Location.t ->
65179+
Lambda.lambda option ->
65180+
Lambda.lambda ->
65181+
(int * Lambda.lambda) list ->
65182+
Lambda.switch_names option ->
65183+
Lambda.lambda)
65184+
ref
6516865185

65186+
val make_test_sequence_variant_constant :
65187+
(Lambda.lambda option ->
65188+
Lambda.lambda ->
65189+
(int * Lambda.lambda) list ->
65190+
Lambda.lambda)
65191+
ref
65192+
6516965193
(* Entry points to match compiler *)
6517065194
val for_function:
6517165195
Location.t -> int ref option -> lambda -> (pattern * lambda) list ->
@@ -67657,6 +67681,33 @@ let call_switcher_variant_constr loc fail arg int_lambda_list names =
6765767681
call_switcher loc
6765867682
fail (Lvar v) min_int max_int int_lambda_list names)
6765967683

67684+
let call_switcher_variant_constant :
67685+
(Location.t ->
67686+
Lambda.lambda option ->
67687+
Lambda.lambda ->
67688+
(int * Lambda.lambda) list ->
67689+
Lambda.switch_names option ->
67690+
Lambda.lambda)
67691+
ref= ref call_switcher_variant_constant
67692+
67693+
let call_switcher_variant_constr :
67694+
(Location.t ->
67695+
Lambda.lambda option ->
67696+
Lambda.lambda ->
67697+
(int * Lambda.lambda) list ->
67698+
Lambda.switch_names option ->
67699+
Lambda.lambda)
67700+
ref
67701+
= ref call_switcher_variant_constr
67702+
67703+
let make_test_sequence_variant_constant :
67704+
(Lambda.lambda option ->
67705+
Lambda.lambda ->
67706+
(int * Lambda.lambda) list ->
67707+
Lambda.lambda)
67708+
ref
67709+
= ref make_test_sequence_variant_constant
67710+
6766067711
let combine_variant names loc row arg partial ctx def
6766167712
(tag_lambda_list, total1, _pats) =
6766267713
let row = Btype.row_repr row in
@@ -67689,9 +67740,9 @@ let combine_variant names loc row arg partial ctx def
6768967740
| ([_, act1], [_, act2]) when fail=None ->
6769067741
test_int_or_block arg act1 act2
6769167742
| (_, []) -> (* One can compare integers and pointers *)
67692-
make_test_sequence_variant_constant fail arg consts
67743+
!make_test_sequence_variant_constant fail arg consts
6769367744
| ([], _) ->
67694-
let lam = call_switcher_variant_constr loc
67745+
let lam = !call_switcher_variant_constr loc
6769567746
fail arg nonconsts names in
6769667747
(* One must not dereference integers *)
6769767748
begin match fail with
@@ -67700,10 +67751,10 @@ let combine_variant names loc row arg partial ctx def
6770067751
end
6770167752
| (_, _) ->
6770267753
let lam_const =
67703-
call_switcher_variant_constant loc
67754+
!call_switcher_variant_constant loc
6770467755
fail arg consts names
6770567756
and lam_nonconst =
67706-
call_switcher_variant_constr loc
67757+
!call_switcher_variant_constr loc
6770767758
fail arg nonconsts names in
6770867759
test_int_or_block arg lam_const lam_nonconst
6770967760
in

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21523,7 +21523,7 @@ let make_key e =
2152321523
(* make_key is used for normalizing let-bound variables *)
2152421524
let rec tr_rec env e =
2152521525
incr count ;
21526-
if !count > max_raw then raise Not_simple ; (* Too big ! *)
21526+
if !count > max_raw then raise_notrace Not_simple ; (* Too big ! *)
2152721527
match e with
2152821528
| Lvar id ->
2152921529
begin
@@ -21532,7 +21532,7 @@ let make_key e =
2153221532
end
2153321533
| Lconst (Const_base (Const_string _)) ->
2153421534
(* Mutable constants are not shared *)
21535-
raise Not_simple
21535+
raise_notrace Not_simple
2153621536
| Lconst _ -> e
2153721537
| Lapply ap ->
2153821538
Lapply {ap with ap_func = tr_rec env ap.ap_func;
@@ -21578,7 +21578,7 @@ let make_key e =
2157821578
(* Beware: (PR#6412) the event argument to Levent
2157921579
may include cyclic structure of type Type.typexpr *)
2158021580
| Levent _ ->
21581-
raise Not_simple
21581+
raise_notrace Not_simple
2158221582

2158321583
and tr_recs env es = List.map (tr_rec env) es
2158421584

@@ -65165,7 +65165,31 @@ module Matching : sig
6516565165
open Typedtree
6516665166
open Lambda
6516765167

65168+
val call_switcher_variant_constant :
65169+
(Location.t ->
65170+
Lambda.lambda option ->
65171+
Lambda.lambda ->
65172+
(int * Lambda.lambda) list ->
65173+
Lambda.switch_names option ->
65174+
Lambda.lambda)
65175+
ref
65176+
65177+
val call_switcher_variant_constr :
65178+
(Location.t ->
65179+
Lambda.lambda option ->
65180+
Lambda.lambda ->
65181+
(int * Lambda.lambda) list ->
65182+
Lambda.switch_names option ->
65183+
Lambda.lambda)
65184+
ref
6516865185

65186+
val make_test_sequence_variant_constant :
65187+
(Lambda.lambda option ->
65188+
Lambda.lambda ->
65189+
(int * Lambda.lambda) list ->
65190+
Lambda.lambda)
65191+
ref
65192+
6516965193
(* Entry points to match compiler *)
6517065194
val for_function:
6517165195
Location.t -> int ref option -> lambda -> (pattern * lambda) list ->
@@ -67657,6 +67681,33 @@ let call_switcher_variant_constr loc fail arg int_lambda_list names =
6765767681
call_switcher loc
6765867682
fail (Lvar v) min_int max_int int_lambda_list names)
6765967683

67684+
let call_switcher_variant_constant :
67685+
(Location.t ->
67686+
Lambda.lambda option ->
67687+
Lambda.lambda ->
67688+
(int * Lambda.lambda) list ->
67689+
Lambda.switch_names option ->
67690+
Lambda.lambda)
67691+
ref= ref call_switcher_variant_constant
67692+
67693+
let call_switcher_variant_constr :
67694+
(Location.t ->
67695+
Lambda.lambda option ->
67696+
Lambda.lambda ->
67697+
(int * Lambda.lambda) list ->
67698+
Lambda.switch_names option ->
67699+
Lambda.lambda)
67700+
ref
67701+
= ref call_switcher_variant_constr
67702+
67703+
let make_test_sequence_variant_constant :
67704+
(Lambda.lambda option ->
67705+
Lambda.lambda ->
67706+
(int * Lambda.lambda) list ->
67707+
Lambda.lambda)
67708+
ref
67709+
= ref make_test_sequence_variant_constant
67710+
6766067711
let combine_variant names loc row arg partial ctx def
6766167712
(tag_lambda_list, total1, _pats) =
6766267713
let row = Btype.row_repr row in
@@ -67689,9 +67740,9 @@ let combine_variant names loc row arg partial ctx def
6768967740
| ([_, act1], [_, act2]) when fail=None ->
6769067741
test_int_or_block arg act1 act2
6769167742
| (_, []) -> (* One can compare integers and pointers *)
67692-
make_test_sequence_variant_constant fail arg consts
67743+
!make_test_sequence_variant_constant fail arg consts
6769367744
| ([], _) ->
67694-
let lam = call_switcher_variant_constr loc
67745+
let lam = !call_switcher_variant_constr loc
6769567746
fail arg nonconsts names in
6769667747
(* One must not dereference integers *)
6769767748
begin match fail with
@@ -67700,10 +67751,10 @@ let combine_variant names loc row arg partial ctx def
6770067751
end
6770167752
| (_, _) ->
6770267753
let lam_const =
67703-
call_switcher_variant_constant loc
67754+
!call_switcher_variant_constant loc
6770467755
fail arg consts names
6770567756
and lam_nonconst =
67706-
call_switcher_variant_constr loc
67757+
!call_switcher_variant_constr loc
6770767758
fail arg nonconsts names in
6770867759
test_int_or_block arg lam_const lam_nonconst
6770967760
in

lib/4.06.1/whole_compiler.ml

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306800,7 +306800,7 @@ let make_key e =
306800306800
(* make_key is used for normalizing let-bound variables *)
306801306801
let rec tr_rec env e =
306802306802
incr count ;
306803-
if !count > max_raw then raise Not_simple ; (* Too big ! *)
306803+
if !count > max_raw then raise_notrace Not_simple ; (* Too big ! *)
306804306804
match e with
306805306805
| Lvar id ->
306806306806
begin
@@ -306809,7 +306809,7 @@ let make_key e =
306809306809
end
306810306810
| Lconst (Const_base (Const_string _)) ->
306811306811
(* Mutable constants are not shared *)
306812-
raise Not_simple
306812+
raise_notrace Not_simple
306813306813
| Lconst _ -> e
306814306814
| Lapply ap ->
306815306815
Lapply {ap with ap_func = tr_rec env ap.ap_func;
@@ -306855,7 +306855,7 @@ let make_key e =
306855306855
(* Beware: (PR#6412) the event argument to Levent
306856306856
may include cyclic structure of type Type.typexpr *)
306857306857
| Levent _ ->
306858-
raise Not_simple
306858+
raise_notrace Not_simple
306859306859

306860306860
and tr_recs env es = List.map (tr_rec env) es
306861306861

@@ -349757,7 +349757,31 @@ module Matching : sig
349757349757
open Typedtree
349758349758
open Lambda
349759349759

349760+
val call_switcher_variant_constant :
349761+
(Location.t ->
349762+
Lambda.lambda option ->
349763+
Lambda.lambda ->
349764+
(int * Lambda.lambda) list ->
349765+
Lambda.switch_names option ->
349766+
Lambda.lambda)
349767+
ref
349768+
349769+
val call_switcher_variant_constr :
349770+
(Location.t ->
349771+
Lambda.lambda option ->
349772+
Lambda.lambda ->
349773+
(int * Lambda.lambda) list ->
349774+
Lambda.switch_names option ->
349775+
Lambda.lambda)
349776+
ref
349760349777

349778+
val make_test_sequence_variant_constant :
349779+
(Lambda.lambda option ->
349780+
Lambda.lambda ->
349781+
(int * Lambda.lambda) list ->
349782+
Lambda.lambda)
349783+
ref
349784+
349761349785
(* Entry points to match compiler *)
349762349786
val for_function:
349763349787
Location.t -> int ref option -> lambda -> (pattern * lambda) list ->
@@ -352249,6 +352273,33 @@ let call_switcher_variant_constr loc fail arg int_lambda_list names =
352249352273
call_switcher loc
352250352274
fail (Lvar v) min_int max_int int_lambda_list names)
352251352275

352276+
let call_switcher_variant_constant :
352277+
(Location.t ->
352278+
Lambda.lambda option ->
352279+
Lambda.lambda ->
352280+
(int * Lambda.lambda) list ->
352281+
Lambda.switch_names option ->
352282+
Lambda.lambda)
352283+
ref= ref call_switcher_variant_constant
352284+
352285+
let call_switcher_variant_constr :
352286+
(Location.t ->
352287+
Lambda.lambda option ->
352288+
Lambda.lambda ->
352289+
(int * Lambda.lambda) list ->
352290+
Lambda.switch_names option ->
352291+
Lambda.lambda)
352292+
ref
352293+
= ref call_switcher_variant_constr
352294+
352295+
let make_test_sequence_variant_constant :
352296+
(Lambda.lambda option ->
352297+
Lambda.lambda ->
352298+
(int * Lambda.lambda) list ->
352299+
Lambda.lambda)
352300+
ref
352301+
= ref make_test_sequence_variant_constant
352302+
352252352303
let combine_variant names loc row arg partial ctx def
352253352304
(tag_lambda_list, total1, _pats) =
352254352305
let row = Btype.row_repr row in
@@ -352281,9 +352332,9 @@ let combine_variant names loc row arg partial ctx def
352281352332
| ([_, act1], [_, act2]) when fail=None ->
352282352333
test_int_or_block arg act1 act2
352283352334
| (_, []) -> (* One can compare integers and pointers *)
352284-
make_test_sequence_variant_constant fail arg consts
352335+
!make_test_sequence_variant_constant fail arg consts
352285352336
| ([], _) ->
352286-
let lam = call_switcher_variant_constr loc
352337+
let lam = !call_switcher_variant_constr loc
352287352338
fail arg nonconsts names in
352288352339
(* One must not dereference integers *)
352289352340
begin match fail with
@@ -352292,10 +352343,10 @@ let combine_variant names loc row arg partial ctx def
352292352343
end
352293352344
| (_, _) ->
352294352345
let lam_const =
352295-
call_switcher_variant_constant loc
352346+
!call_switcher_variant_constant loc
352296352347
fail arg consts names
352297352348
and lam_nonconst =
352298-
call_switcher_variant_constr loc
352349+
!call_switcher_variant_constr loc
352299352350
fail arg nonconsts names in
352300352351
test_int_or_block arg lam_const lam_nonconst
352301352352
in

ocaml

Submodule ocaml updated from 5b68c41 to 0855869

0 commit comments

Comments
 (0)