make fun shims inline

This commit is contained in:
Simon Cruanes 2021-12-22 11:00:23 -05:00
parent ab0673a688
commit 4e0f35c078
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -40,10 +40,10 @@ let cc_update_funs funs f1 f2 =
let shims_fun_pre_408 = "
external id : 'a -> 'a = \"%identity\"
let flip f x y = f y x
let const x _ = x
let negate f x = not (f x)
let protect ~finally f =
let[@inline] flip f x y = f y x
let[@inline] const x _ = x
let[@inline] negate f x = not (f x)
let[@inline] protect ~finally f =
try
let x= f() in
finally();