@@ -1926,22 +1926,7 @@ let trans_visitor
1926
1926
and get_drop_glue
1927
1927
(ty :Ast.ty )
1928
1928
: fixup =
1929
-
1930
- (* obj and fn glue delegates to the body, so is always 'generic'. *)
1931
- let ty =
1932
- match ty with
1933
- Ast. TY_obj _ -> Ast. TY_obj (Ast. LAYER_value , Hashtbl. create 0 )
1934
- | Ast. TY_fn _ ->
1935
- Ast. TY_fn ({ Ast. sig_input_slots = [| |];
1936
- Ast. sig_input_constrs = [| |];
1937
- Ast. sig_output_slot =
1938
- { Ast. slot_mode = Ast. MODE_local ;
1939
- Ast. slot_ty = Some Ast. TY_nil }; },
1940
- { Ast. fn_is_iter = false ;
1941
- Ast. fn_effect = Ast. EFF_pure })
1942
- | _ -> ty
1943
- in
1944
-
1929
+ let ty = get_genericized_ty ty in
1945
1930
let g = GLUE_drop ty in
1946
1931
let inner _ (args :Il.cell ) =
1947
1932
let ty_params = deref (get_element_ptr args 0 ) in
@@ -1960,6 +1945,7 @@ let trans_visitor
1960
1945
(ty :Ast.ty )
1961
1946
(is_gc :bool )
1962
1947
: fixup =
1948
+ let ty = get_genericized_ty ty in
1963
1949
let g = GLUE_free ty in
1964
1950
let inner _ (args :Il.cell ) =
1965
1951
(* Free-glue assumes it's called with a pointer to a box allocation with
@@ -1978,6 +1964,7 @@ let trans_visitor
1978
1964
and get_sever_glue
1979
1965
(ty :Ast.ty )
1980
1966
: fixup =
1967
+ let ty = get_genericized_ty ty in
1981
1968
let g = GLUE_sever ty in
1982
1969
let inner _ (args :Il.cell ) =
1983
1970
let ty_params = deref (get_element_ptr args 0 ) in
@@ -1994,6 +1981,7 @@ let trans_visitor
1994
1981
and get_mark_glue
1995
1982
(ty :Ast.ty )
1996
1983
: fixup =
1984
+ let ty = get_genericized_ty ty in
1997
1985
let g = GLUE_mark ty in
1998
1986
let inner _ (args :Il.cell ) =
1999
1987
let ty_params = deref (get_element_ptr args 0 ) in
@@ -2010,6 +1998,7 @@ let trans_visitor
2010
1998
and get_clone_glue
2011
1999
(ty :Ast.ty )
2012
2000
: fixup =
2001
+ let ty = get_genericized_ty ty in
2013
2002
let g = GLUE_clone ty in
2014
2003
let inner (out_ptr :Il.cell ) (args :Il.cell ) =
2015
2004
let dst = deref out_ptr in
@@ -2034,6 +2023,7 @@ let trans_visitor
2034
2023
and get_copy_glue
2035
2024
(ty :Ast.ty )
2036
2025
: fixup =
2026
+ let ty = get_genericized_ty ty in
2037
2027
let arg_ty_params_alias = 0 in
2038
2028
let arg_src_alias = 1 in
2039
2029
let arg_initflag = 2 in
@@ -2068,6 +2058,7 @@ let trans_visitor
2068
2058
get_typed_mem_glue g fty inner
2069
2059
2070
2060
and get_cmp_glue ty =
2061
+ let ty = get_genericized_ty ty in
2071
2062
let arg_ty_params_alias = 0 in
2072
2063
let arg_lhs_alias = 1 in
2073
2064
let arg_rhs_alias = 2 in
0 commit comments