Skip to content

Commit 6619da4

Browse files
authored
Merge pull request #2804 from BuckleScript/remove_deprecated_api
remove deprecated API
2 parents f5a25e5 + 8bb7043 commit 6619da4

File tree

112 files changed

+333
-514
lines changed

Some content is hidden

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

112 files changed

+333
-514
lines changed

jscomp/core/js_runtime_modules.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ let format = "Caml_format"
3434
let string = "Caml_string"
3535
let bytes = "Caml_bytes"
3636
let float = "Caml_float"
37+
let hash_primitive = "Caml_hash_primitive"
3738
let hash = "Caml_hash"
3839
let oo = "Caml_oo"
3940
let curry = "Curry"

jscomp/core/lam_dispatch_primitive.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ let translate loc (prim_name : string)
796796
| "caml_hash_mix_string"
797797
| "caml_hash_mix_int"
798798
| "caml_hash_final_mix"
799-
799+
-> call Js_runtime_modules.hash_primitive
800800
| "caml_hash"
801801
-> call Js_runtime_modules.hash
802802
| "caml_weak_set"

jscomp/others/belt_HashMap.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ let fromArray (type a) (type identity) arr ~id:(id:(a,identity) id) =
213213
done ;
214214
v
215215

216-
let ofArray = fromArray
217-
218216
let mergeMany h arr =
219217
let hash, eq = Belt_Id.getHashInternal ( C.hash h) , Belt_Id.getEqInternal (C.eq h) in
220218
let len = A.length arr in

jscomp/others/belt_HashMap.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,4 @@ val mergeMany: ('key, 'value, 'id ) t -> ('key * 'value) array -> unit
154154
val getBucketHistogram: _ t -> int array
155155
val logStats: _ t -> unit
156156

157-
val ofArray: ('key * 'value) array -> id:('key,'id) id -> ('key, 'value, 'id ) t
158-
[@@ocaml.deprecated "Use fromArray instead"]
159157

jscomp/others/belt_HashMapInt.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ let fromArray arr =
196196
done ;
197197
v
198198

199-
let ofArray = fromArray
200-
201199
(* TOOD: optimize heuristics for resizing *)
202200
let mergeMany h arr =
203201
let len = A.length arr in

jscomp/others/belt_HashMapInt.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,3 @@ val mergeMany: 'a t -> (key * 'a) array -> unit
4747
val getBucketHistogram: _ t -> int array
4848
val logStats: _ t -> unit
4949

50-
val ofArray: (key * 'a) array -> 'a t
51-
[@@ocaml.deprecated "Use fromArray instead"]

jscomp/others/belt_HashMapString.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ let fromArray arr =
196196
done ;
197197
v
198198

199-
let ofArray = fromArray
200-
201199
(* TOOD: optimize heuristics for resizing *)
202200
let mergeMany h arr =
203201
let len = A.length arr in

jscomp/others/belt_HashMapString.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,3 @@ val mergeMany: 'a t -> (key * 'a) array -> unit
4747
val getBucketHistogram: _ t -> int array
4848
val logStats: _ t -> unit
4949

50-
val ofArray: (key * 'a) array -> 'a t
51-
[@@ocaml.deprecated "Use fromArray instead"]

jscomp/others/belt_HashSet.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ let fromArray (type a) (type identity) arr ~(id:(a,identity) id) =
186186
done ;
187187
v
188188

189-
let ofArray = fromArray
190-
191189
let mergeMany h arr =
192190
let eq, hash = C.eq h, C.hash h in
193191
let len = A.length arr in

jscomp/others/belt_HashSet.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ val logStats: _ t -> unit
116116

117117
val toArray: ('a,'id) t -> 'a array
118118

119-
val ofArray: 'a array -> id:('a,'id) id -> ('a,'id) t
120-
[@@ocaml.deprecated "Use fromArray instead"]
121-
122119
val fromArray: 'a array -> id:('a,'id) id -> ('a,'id) t
123120

124121
val mergeMany: ('a,'id) t -> 'a array -> unit

0 commit comments

Comments
 (0)