@@ -66574,7 +66574,7 @@ type primitive =
6657466574 | Pglobal_exception of ident
6657566575 | Pmakeblock of int * Lambda.tag_info * Asttypes.mutable_flag
6657666576 | Pfield of int * Lambda.field_dbg_info
66577- | Psetfield of int * bool * Lambda.set_field_dbg_info
66577+ | Psetfield of int * Lambda.set_field_dbg_info
6657866578 | Pfloatfield of int * Lambda.field_dbg_info
6657966579 | Psetfloatfield of int * Lambda.set_field_dbg_info
6658066580 | Pduprecord of Types.record_representation * int
@@ -66932,7 +66932,7 @@ type primitive =
6693266932 (* Operations on heap blocks *)
6693366933 | Pmakeblock of int * tag_info * mutable_flag
6693466934 | Pfield of int * field_dbg_info
66935- | Psetfield of int * bool * set_field_dbg_info
66935+ | Psetfield of int * set_field_dbg_info
6693666936 (* could have field info at least for record *)
6693766937 | Pfloatfield of int * field_dbg_info
6693866938 | Psetfloatfield of int * set_field_dbg_info
@@ -68409,7 +68409,7 @@ let lam_prim ~primitive:( p : Lambda.primitive) ~args loc : t =
6840968409 -> prim ~primitive:(Pfield (id,info)) ~args loc
6841068410
6841168411 | Psetfield (id,b,info)
68412- -> prim ~primitive:(Psetfield (id,b, info)) ~args loc
68412+ -> prim ~primitive:(Psetfield (id,info)) ~args loc
6841368413
6841468414 | Pfloatfield (id,info)
6841568415 -> prim ~primitive:(Pfloatfield (id,info)) ~args loc
@@ -68711,7 +68711,7 @@ let convert exports lam : _ * _ =
6871168711 | "#makemutablelist" ->
6871268712 Pmakeblock(0,Lambda.Blk_constructor("::",1),Mutable)
6871368713 | "#setfield1" ->
68714- Psetfield(1, true, Fld_set_na)
68714+ Psetfield(1, Fld_set_na)
6871568715 | "#undefined_to_opt" -> Pundefined_to_opt
6871668716 | "#null_undefined_to_opt" -> Pnull_undefined_to_opt
6871768717 | "#null_to_opt" -> Pnull_to_opt
@@ -72492,8 +72492,8 @@ let primitive ppf (prim : Lam.primitive) = match prim with
7249272492 | Pmakeblock(tag, _, Immutable) -> fprintf ppf "makeblock %i" tag
7249372493 | Pmakeblock(tag, _, Mutable) -> fprintf ppf "makemutable %i" tag
7249472494 | Pfield (n,_) -> fprintf ppf "field %i" n
72495- | Psetfield(n, ptr, _) ->
72496- let instr = if ptr then "setfield_ptr " else "setfield_imm " in
72495+ | Psetfield(n, _) ->
72496+ let instr = "setfield " in
7249772497 fprintf ppf "%s%i" instr n
7249872498 | Pfloatfield (n,_) -> fprintf ppf "floatfield %i" n
7249972499 | Psetfloatfield (n,_) -> fprintf ppf "setfloatfield %i" n
@@ -72771,7 +72771,7 @@ let lambda use_env env ppf v =
7277172771 fprintf ppf "%s.%s/%d" id.name (get_string (id,n) env) n
7277272772
7277372773 | Lprim {
72774- primitive = Psetfield (n,_,_ );
72774+ primitive = Psetfield (n,_);
7277572775 args = [ Lglobal_module id ;
7277672776 e ]
7277772777 ; _} when use_env ->
@@ -86863,7 +86863,7 @@ and eq_primitive ( lhs : Lam.primitive) (rhs : Lam.primitive) =
8686386863 | Pcaml_obj_set_length -> rhs = Pcaml_obj_set_length
8686486864 | Pccall {prim_name = n0 ; prim_native_name = nn0} -> (match rhs with Pccall {prim_name = n1; prim_native_name = nn1} -> n0 = n1 && nn0 = nn1 | _ -> false )
8686586865 | Pfield (n0, _dbg_info0) -> (match rhs with Pfield (n1, _dbg_info1) -> n0 = n1 | _ -> false )
86866- | Psetfield(i0, b0, _dbg_info0) -> (match rhs with Psetfield(i1, b1, _dbg_info1) -> i0 = i1 && b0 = b1 | _ -> false)
86866+ | Psetfield(i0, _dbg_info0) -> (match rhs with Psetfield(i1, _dbg_info1) -> i0 = i1 | _ -> false)
8686786867 | Pglobal_exception ident -> (match rhs with Pglobal_exception ident2 -> Ident.same ident ident2 | _ -> false )
8686886868 | Pmakeblock (i, _tag_info, mutable_flag) -> (match rhs with Pmakeblock(i1,_,mutable_flag1) -> i = i1 && mutable_flag = mutable_flag1 | _ -> false)
8686986869 | Pfloatfield (i0,_dbg_info) -> (match rhs with Pfloatfield (i1,_) -> i0 = i1 | _ -> false)
@@ -96173,7 +96173,7 @@ let translate loc
9617396173 | [e] -> E.array_length e
9617496174 | _ -> assert false
9617596175 end
96176- | Psetfield (i, _, field_info) ->
96176+ | Psetfield (i, field_info) ->
9617796177 begin match args with
9617896178 | [e0;e1] -> (** RUNTIME *)
9617996179 decorate_side_effect cxt
@@ -100504,7 +100504,7 @@ let rec eliminate_ref id (lam : Lam.t) =
100504100504 TODO: we can refine analysis in later
100505100505 *)
100506100506 (* Lfunction(kind, params, eliminate_ref id body) *)
100507- | Lprim {primitive = Psetfield(0, _, _);
100507+ | Lprim {primitive = Psetfield(0,_);
100508100508 args = [Lvar v; e]} when Ident.same v id ->
100509100509 Lam.assign id (eliminate_ref id e)
100510100510 | Lprim {primitive = Poffsetref delta ;
0 commit comments