Skip to content

Commit d08373a

Browse files
committed
tweak
1 parent e3326fe commit d08373a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jscomp/runtime/caml_oo.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ let caml_methods_cache =
4646
Caml_array_extern.make 1000 0
4747

4848
(* refer to {!CamlinternalOO.create_obj_opt}*)
49-
external get_methods : obj -> closure array =
50-
"%field0"
49+
50+
5151

5252
(* see #251
5353
{[
@@ -71,7 +71,7 @@ let caml_get_public_method
7171
(obj : obj)
7272
(tag : int) (cacheid : int) : closure =
7373
let module Array = Caml_array_extern in
74-
let meths = get_methods obj in (* the first field of object is mehods *)
74+
let meths : closure array = Obj.obj (Obj.field (Obj.repr obj) 0) in (* the first field of object is mehods *)
7575
let offs = caml_methods_cache.(cacheid) in
7676
if (Obj.magic meths.(offs) : int) = tag then meths.(offs - 1)
7777
else

0 commit comments

Comments
 (0)