@@ -393775,8 +393775,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
393775
393775
Lam.for_ id (convert_aux from_) (convert_aux to_) dir (convert_aux loop)
393776
393776
| Lassign (id, body) ->
393777
393777
Lam.assign id (convert_aux body)
393778
- | Lsend (Public(Some name), _, obj, _, loc) ->
393779
- (* Format.fprintf Format.err_formatter "%a@." Printlambda.lambda b ; *)
393778
+ | Lsend (Public(Some name), _, obj, meth_args, loc) ->
393780
393779
let obj = convert_aux obj in
393781
393780
let args = [obj] in
393782
393781
let setter = Ext_string.ends_with name Literals.setter_suffix in
@@ -393786,8 +393785,11 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
393786
393785
(String.sub name 0
393787
393786
(String.length name - Literals.setter_suffix_len))
393788
393787
else Lam_methname.translate name in
393789
- prim ~primitive:(Pjs_unsafe_downgrade {name = property; setter})
393790
- ~args loc
393788
+ let new_obj = prim ~primitive:(Pjs_unsafe_downgrade {name = property; setter})
393789
+ ~args loc in
393790
+ if meth_args = [] then new_obj
393791
+ else Lam.apply new_obj
393792
+ (Ext_list.map meth_args convert_aux) {ap_loc = loc; ap_inlined = Default_inline; ap_status = App_na}
393791
393793
393792
393794
| Lsend _ -> assert false
393793
393795
| Levent _ ->
@@ -393961,8 +393963,8 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
393961
393963
393962
393964
393963
393965
we should not remove it immediately, since we have to be careful
393964
- where it is used, it can be [exported], [Lvar] or [Lassign] etc
393965
- The other common mistake is that
393966
+ where it is used, it can be [exported], [Lvar] or [Lassign] etc
393967
+ The other common mistake is that
393966
393968
{[
393967
393969
let x = y (* elimiated x/y*)
393968
393970
let u = x (* eliminated u/x *)
@@ -393974,13 +393976,13 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
393974
393976
let x = y (* x/y *)
393975
393977
let u = x (* u/y *)
393976
393978
]}
393977
- This looks more correct, but lets be conservative here
393979
+ This looks more correct, but lets be conservative here
393978
393980
393979
- global module inclusion {[ include List ]}
393980
- will cause code like {[ let include =a Lglobal_module (list)]}
393981
+ global module inclusion {[ include List ]}
393982
+ will cause code like {[ let include =a Lglobal_module (list)]}
393981
393983
393982
- when [u] is global, it can not be bound again,
393983
- it should always be the leaf
393984
+ when [u] is global, it can not be bound again,
393985
+ it should always be the leaf
393984
393986
*)
393985
393987
end
393986
393988
module Lam_pass_alpha_conversion : sig
0 commit comments