Skip to content

Commit 62a6d24

Browse files
committed
clean up - keep runtime exposure minimal
1 parent f72f00d commit 62a6d24

25 files changed

+114
-130
lines changed

jscomp/main/builtin_cmi_datasets.ml

Lines changed: 7 additions & 9 deletions
Large diffs are not rendered by default.

jscomp/main/builtin_cmj_datasets.ml

Lines changed: 5 additions & 7 deletions
Large diffs are not rendered by default.

jscomp/runtime/block.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929

30-
type obj = Caml_obj_extern.t
30+
type obj = Obj.t
3131

3232
(* Note that when we introduce it in {!Js_dump}
3333
we need introduce dependency properly *)

jscomp/runtime/block.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
(** *)
30-
type obj = Caml_obj_extern.t
30+
type obj = Obj.t
3131

3232
val __ : int -> obj -> obj
3333

jscomp/runtime/caml_chrome_debugger.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

2525

26-
type obj = Caml_obj_extern.t
26+
type obj = Obj.t
2727

2828
let setupChromeDebugger : unit -> unit [@bs]= [%raw{|
2929
function () {

jscomp/runtime/caml_chrome_debugger.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

25-
type obj = Caml_obj_extern.t
25+
type obj = Obj.t
2626

2727
val __ : int -> obj -> obj
2828

jscomp/runtime/caml_hash.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ external ( +~ ) : nativeint -> nativeint -> nativeint =
8080
"caml_int32_add"
8181

8282
(*ATTENTION: refer {!Oo.id} *)
83-
external oo_id : Caml_obj_extern.t -> int = "%field1"
83+
external oo_id : Obj.t -> int = "%field1"
8484

8585
open Caml_hash_primitive
8686

8787
let caml_hash (count : int) _limit (seed : nativeint)
88-
(obj : Caml_obj_extern.t) : nativeint =
88+
(obj : Obj.t) : nativeint =
8989
let hash = ref seed in
9090
if Js.typeof obj = "number" then
9191
begin

jscomp/runtime/caml_hash.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626

2727

2828
(** *)
29-
val caml_hash : int -> 'a -> nativeint -> Caml_obj_extern.t -> nativeint
29+
val caml_hash : int -> 'a -> nativeint -> Obj.t -> nativeint

jscomp/runtime/caml_js_exceptions.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exception Error of t
1616
This function has to be in this module Since
1717
[Error] is defined here
1818
*)
19-
let internalToOCamlException (e : Caml_obj_extern.t) =
19+
let internalToOCamlException (e : Obj.t) =
2020
if Caml_exceptions.caml_is_extension e then
2121
(Obj.magic e : exn)
2222
else Error (Any e)

jscomp/runtime/caml_module.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ type shape =
3333
| Lazy
3434
| Class
3535
| Module of (shape * string) array
36-
| Value of Caml_obj_extern.t
36+
| Value of Obj.t
3737
(* ATTENTION: check across versions *)
3838
module Array = Caml_array_extern
3939

40-
external set_field : Caml_obj_extern.t -> string -> Caml_obj_extern.t -> unit = ""
40+
external set_field : Obj.t -> string -> Obj.t -> unit = ""
4141
[@@bs.set_index]
4242

43-
external get_field : Caml_obj_extern.t -> string -> Caml_obj_extern.t = ""
43+
external get_field : Obj.t -> string -> Obj.t = ""
4444
[@@bs.get_index]
4545

4646
module type Empty = sig end
@@ -51,7 +51,7 @@ module type Empty = sig end
5151
*)
5252
let init_mod (loc : string * int * int) (shape : shape) =
5353
let undef_module _ = raise (Undefined_recursive_module loc) in
54-
let rec loop (shape : shape) (struct_ : Caml_obj_extern.t) idx =
54+
let rec loop (shape : shape) (struct_ : Obj.t) idx =
5555
match shape with
5656
| Function ->
5757
set_field struct_ idx (Obj.magic undef_module)
@@ -82,7 +82,7 @@ let init_mod (loc : string * int * int) (shape : shape) =
8282
(* Note the [shape] passed between [init_mod] and [update_mod] is always the same
8383
and we assume [module] is encoded as an array
8484
*)
85-
let update_mod (shape : shape) (o : Caml_obj_extern.t) (n : Caml_obj_extern.t) : unit =
85+
let update_mod (shape : shape) (o : Obj.t) (n : Obj.t) : unit =
8686
let rec aux (shape : shape) o n parent i =
8787
match shape with
8888
| Function

0 commit comments

Comments
 (0)