diff options
Diffstat (limited to 'lambda')
-rw-r--r-- | lambda/translclass.ml | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lambda/translclass.ml b/lambda/translclass.ml index e516f3a841..b4b682a1d7 100644 --- a/lambda/translclass.ml +++ b/lambda/translclass.ml @@ -532,20 +532,13 @@ let transl_class_rebind ~scopes cl vf = (* Rewrite a closure using builtins. Improves native code size. *) -let rec module_path = function - Lvar id -> - let s = Ident.name id in s <> "" && s.[0] >= 'A' && s.[0] <= 'Z' - | Lprim(Pfield _, [p], _) -> module_path p - | Lprim(Pgetglobal _, [], _) -> true - | _ -> false - let const_path local = function Lvar id -> not (List.mem id local) | Lconst _ -> true | Lfunction {kind = Curried; body} -> let fv = free_variables body in List.for_all (fun x -> not (Ident.Set.mem x fv)) local - | p -> module_path p + | _ -> false let rec builtin_meths self env env2 body = let const_path = const_path (env::self) in |