Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jscomp/core/js_runtime_modules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ let format = "Caml_format"
let string = "Caml_string"
let bytes = "Caml_bytes"
let float = "Caml_float"
let hash_primitive = "Caml_hash_primitive"
let hash = "Caml_hash"
let oo = "Caml_oo"
let curry = "Curry"
Expand Down
2 changes: 1 addition & 1 deletion jscomp/core/lam_dispatch_primitive.ml
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ let translate loc (prim_name : string)
| "caml_hash_mix_string"
| "caml_hash_mix_int"
| "caml_hash_final_mix"

-> call Js_runtime_modules.hash_primitive
| "caml_hash"
-> call Js_runtime_modules.hash
| "caml_weak_set"
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashMap.ml
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ let fromArray (type a) (type identity) arr ~id:(id:(a,identity) id) =
done ;
v

let ofArray = fromArray

let mergeMany h arr =
let hash, eq = Belt_Id.getHashInternal ( C.hash h) , Belt_Id.getEqInternal (C.eq h) in
let len = A.length arr in
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashMap.mli
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,4 @@ val mergeMany: ('key, 'value, 'id ) t -> ('key * 'value) array -> unit
val getBucketHistogram: _ t -> int array
val logStats: _ t -> unit

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

2 changes: 0 additions & 2 deletions jscomp/others/belt_HashMapInt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ let fromArray arr =
done ;
v

let ofArray = fromArray

(* TOOD: optimize heuristics for resizing *)
let mergeMany h arr =
let len = A.length arr in
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashMapInt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ val mergeMany: 'a t -> (key * 'a) array -> unit
val getBucketHistogram: _ t -> int array
val logStats: _ t -> unit

val ofArray: (key * 'a) array -> 'a t
[@@ocaml.deprecated "Use fromArray instead"]
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashMapString.ml
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ let fromArray arr =
done ;
v

let ofArray = fromArray

(* TOOD: optimize heuristics for resizing *)
let mergeMany h arr =
let len = A.length arr in
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashMapString.mli
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ val mergeMany: 'a t -> (key * 'a) array -> unit
val getBucketHistogram: _ t -> int array
val logStats: _ t -> unit

val ofArray: (key * 'a) array -> 'a t
[@@ocaml.deprecated "Use fromArray instead"]
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashSet.ml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ let fromArray (type a) (type identity) arr ~(id:(a,identity) id) =
done ;
v

let ofArray = fromArray

let mergeMany h arr =
let eq, hash = C.eq h, C.hash h in
let len = A.length arr in
Expand Down
3 changes: 0 additions & 3 deletions jscomp/others/belt_HashSet.mli
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ val logStats: _ t -> unit

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

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

val fromArray: 'a array -> id:('a,'id) id -> ('a,'id) t

val mergeMany: ('a,'id) t -> 'a array -> unit
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashSetInt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ let fromArray arr =
done ;
v

let ofArray = fromArray

(* TOOD: optimize heuristics for resizing *)
let mergeMany h arr =
let len = A.length arr in
Expand Down
3 changes: 0 additions & 3 deletions jscomp/others/belt_HashSetInt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ val logStats: t -> unit

val toArray: t -> key array

val ofArray: key array -> t
[@@ocaml.deprecated "Use fromArray instead"]

val fromArray: key array -> t

val mergeMany: t -> key array -> unit
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_HashSetString.ml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ let fromArray arr =
done ;
v

let ofArray = fromArray

(* TOOD: optimize heuristics for resizing *)
let mergeMany h arr =
let len = A.length arr in
Expand Down
3 changes: 0 additions & 3 deletions jscomp/others/belt_HashSetString.mli
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ val logStats: t -> unit

val toArray: t -> key array

val ofArray: key array -> t
[@@ocaml.deprecated "Use fromArray instead"]

val fromArray: key array -> t

val mergeMany: t -> key array -> unit
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_List.ml
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ let rec fromArrayAux a i res =
let fromArray a =
fromArrayAux a (A.length a - 1) []

let ofArray = fromArray

let toArray ( x : _ t) =
let len = length x in
let arr = A.makeUninitializedUnsafe len in
Expand Down
3 changes: 1 addition & 2 deletions jscomp/others/belt_List.mli
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ val mapWithIndex: 'a t -> (int -> 'a -> 'b) -> 'b t
]}
*)

val ofArray: 'a array -> 'a t
[@@ocaml.deprecated "Use fromArray instead"]


val fromArray: 'a array -> 'a t
(** [fromArray arr] converts the given array to a list
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_Map.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ let fromArray (type k) (type idx) data ~(id : (k,idx) id) =
let cmp = M.cmp in
S.t ~cmp ~data:(Dict.fromArray ~cmp data)

let ofArray = fromArray

let remove m x =
let cmp, odata = m |. S.(cmp, data) in
let newData = Dict.remove odata x ~cmp in
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_Map.mli
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ val toList: ('k, 'v, 'id) t -> ('k * 'v) list
{b See} {!toArray}
*)

val ofArray: ('k * 'v) array -> id:('k,'id) id -> ('k,'v,'id) t
[@@ocaml.deprecated "Use fromArray instead"]

val fromArray: ('k * 'v) array -> id:('k,'id) id -> ('k,'v,'id) t
(** [fromArray kvs ~id]
Expand Down
1 change: 0 additions & 1 deletion jscomp/others/belt_MapDict.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type ('key, 'id) cmp = ('key, 'id) Belt_Id.cmp

let empty = N.empty
let fromArray = N.fromArray
let ofArray = N.fromArray
let isEmpty = N.isEmpty
let cmp = N.cmp
let cmpU = N.cmpU
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_MapDict.mli
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ val toList: ('k, 'a, 'id) t -> ('k * 'a) list

val toArray: ('k, 'a, 'id) t -> ('k * 'a) array

val ofArray: ('k * 'a) array -> cmp:('k,'id) cmp -> ('k,'a,'id) t
[@@ocaml.deprecated "Use fromArray instead"]

val fromArray: ('k * 'a) array -> cmp:('k,'id) cmp -> ('k,'a,'id) t

Expand Down
1 change: 0 additions & 1 deletion jscomp/others/belt_MapInt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,3 @@ let split = I.split
let mergeU = I.mergeU
let merge = I.merge
let fromArray = I.fromArray
let ofArray = I.fromArray
6 changes: 1 addition & 5 deletions jscomp/others/belt_MapInt.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 4 "map.cppo.mli"
type key = int
# 8
# 8 "map.cppo.mli"
type 'value t
(** The type of maps from type [key] to type ['value]. *)

Expand Down Expand Up @@ -49,8 +49,6 @@ val toList: 'v t -> (key * 'v) list

val toArray: 'v t -> (key * 'v) array

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

val fromArray: (key * 'v) array -> 'v t

Expand Down Expand Up @@ -121,8 +119,6 @@ val merge:

val mergeMany: 'v t -> (key * 'v) array -> 'v t

[@@ocaml.deprecated "Use mergeMany instead"]
val mergeArray: 'v t -> (key * 'v) array -> 'v t

val keepU:
'v t ->
Expand Down
1 change: 0 additions & 1 deletion jscomp/others/belt_MapString.ml
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,3 @@ let split = I.split
let mergeU = I.mergeU
let merge = I.merge
let fromArray = I.fromArray
let ofArray = I.fromArray
6 changes: 1 addition & 5 deletions jscomp/others/belt_MapString.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 2 "map.cppo.mli"
type key = string
# 8
# 8 "map.cppo.mli"
type 'value t
(** The type of maps from type [key] to type ['value]. *)

Expand Down Expand Up @@ -49,8 +49,6 @@ val toList: 'v t -> (key * 'v) list

val toArray: 'v t -> (key * 'v) array

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

val fromArray: (key * 'v) array -> 'v t

Expand Down Expand Up @@ -121,8 +119,6 @@ val merge:

val mergeMany: 'v t -> (key * 'v) array -> 'v t

[@@ocaml.deprecated "Use mergeMany instead"]
val mergeArray: 'v t -> (key * 'v) array -> 'v t

val keepU:
'v t ->
Expand Down
4 changes: 1 addition & 3 deletions jscomp/others/belt_MutableMap.ml
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ let fromArray (type k) (type identity) data ~(id : (k,identity) id)=
let module M = (val id ) in
let cmp = M.cmp in
S.t ~cmp ~data:(N.fromArray ~cmp data)

let ofArray = fromArray


let set m e v =
let oldRoot = S.data m in
let newRoot = N.updateMutate ~cmp:(S.cmp m) oldRoot e v in
Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_MutableMap.mli
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ val checkInvariantInternal: _ t -> unit
{b raise} when invariant is not held
*)

val ofArray: ('k * 'a) array -> id:('k,'id) id -> ('k,'a,'id) t
[@@ocaml.deprecated "Use fromArray instead"]

(****************************************************************************)

Expand Down
2 changes: 0 additions & 2 deletions jscomp/others/belt_MutableMapInt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ let removeMany (type key) (type id) (d : _ t) xs =
let fromArray xs =
t ~data:(I.fromArray xs)

let ofArray = fromArray

let cmpU d0 d1 f =
I.cmpU (data d0) (data d1) f
let cmp d0 d1 f = cmpU d0 d1 (fun[@bs] a b -> f a b)
Expand Down
6 changes: 2 additions & 4 deletions jscomp/others/belt_MutableMapInt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)

# 28
# 28 "mapm.cppo.mli"
type key = int
# 32
# 32 "mapm.cppo.mli"
type 'a t


Expand Down Expand Up @@ -81,8 +81,6 @@ val toList: 'a t -> (key * 'a) list
(** In increasing order *)
val toArray: 'a t -> (key * 'a) array

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

val fromArray: (key * 'a) array -> 'a t
val keysToArray: 'a t -> key array
Expand Down
4 changes: 1 addition & 3 deletions jscomp/others/belt_MutableMapString.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 5 "mapm.cppo.ml"
module I = Belt_internalMapString
type key = string
# 10
# 10 "mapm.cppo.ml"
module N = Belt_internalAVLtree
module A = Belt_Array

Expand Down Expand Up @@ -158,8 +158,6 @@ let removeMany (type key) (type id) (d : _ t) xs =
let fromArray xs =
t ~data:(I.fromArray xs)

let ofArray = fromArray

let cmpU d0 d1 f =
I.cmpU (data d0) (data d1) f
let cmp d0 d1 f = cmpU d0 d1 (fun[@bs] a b -> f a b)
Expand Down
6 changes: 2 additions & 4 deletions jscomp/others/belt_MutableMapString.mli
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)

# 26
# 26 "mapm.cppo.mli"
type key = string
# 32
# 32 "mapm.cppo.mli"
type 'a t


Expand Down Expand Up @@ -81,8 +81,6 @@ val toList: 'a t -> (key * 'a) list
(** In increasing order *)
val toArray: 'a t -> (key * 'a) array

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

val fromArray: (key * 'a) array -> 'a t
val keysToArray: 'a t -> key array
Expand Down
1 change: 0 additions & 1 deletion jscomp/others/belt_MutableQueue.ml
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,3 @@ let fromArray arr =
done ;
q

let ofArray = fromArray
3 changes: 0 additions & 3 deletions jscomp/others/belt_MutableQueue.mli
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ val clear: 'a t -> unit
val isEmpty: 'a t -> bool
(** @return [true] if the given queue is empty, [false] otherwise. *)

val ofArray: 'a array -> 'a t
[@@ocaml.deprecated "Use fromArray instead"]

val fromArray: 'a array -> 'a t
(** [fromArray a] is equivalent to [Array.forEach a (add q a)] *)

Expand Down
5 changes: 1 addition & 4 deletions jscomp/others/belt_MutableSet.ml
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ let fromSortedArrayUnsafe (type value) (type identity) xs ~(id : (value,identity
let module M = (val id) in
S.t ~data:(N.fromSortedArrayUnsafe xs) ~cmp:M.cmp

let ofSortedArrayUnsafe = fromSortedArrayUnsafe

let checkInvariantInternal d =
N.checkInvariantInternal (S.data d)

Expand All @@ -235,8 +233,7 @@ let fromArray (type value) (type identity) data ~(id : (value,identity) id) =
let cmp = M.cmp in
S.t ~cmp ~data:(N.fromArray ~cmp data)

let ofArray = fromArray


let cmp d0 d1 =
N.cmp ~cmp:(S.cmp d0) (S.data d0) (S.data d1)

Expand Down
4 changes: 0 additions & 4 deletions jscomp/others/belt_MutableSet.mli
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,4 @@ val checkInvariantInternal: _ t -> unit
2. It is not really significantly more *)


val ofArray: 'k array -> id:('k, 'id) id -> ('k, 'id) t
[@@ocaml.deprecated "Use fromArray instead"]

val ofSortedArrayUnsafe: 'value array -> id:('value, 'id) id -> ('value,'id) t
[@@ocaml.deprecated "Use fromSortedArrayUnsafe instead"]
4 changes: 0 additions & 4 deletions jscomp/others/belt_MutableSetInt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ let toArray d =
let fromSortedArrayUnsafe xs =
t ~data:(N.fromSortedArrayUnsafe xs)

let ofSortedArrayUnsafe = fromSortedArrayUnsafe

let checkInvariantInternal d =
N.checkInvariantInternal (data d)

Expand All @@ -230,8 +228,6 @@ let checkInvariantInternal d =
let fromArray xs =
t ~data:(I.fromArray xs)

let ofArray = fromArray

let cmp d0 d1 =
I.cmp (data d0) (data d1)
let eq d0 d1 =
Expand Down
5 changes: 0 additions & 5 deletions jscomp/others/belt_MutableSetInt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ val make: unit -> t
val fromArray: value array -> t
val fromSortedArrayUnsafe: value array -> t

val ofArray: value array -> t
[@@ocaml.deprecated "Use fromArray instead"]
val ofSortedArrayUnsafe: value array -> t
[@@ocaml.deprecated "Use fromSortedArrayUnsafe instead"]

val copy: t -> t
val isEmpty: t -> bool
val has: t -> value -> bool
Expand Down
Loading