summaryrefslogtreecommitdiff
path: root/lambda
diff options
context:
space:
mode:
authorTom Kelly <ctk21@cl.cam.ac.uk>2021-12-21 10:13:48 +0000
committerTom Kelly <ctk21@cl.cam.ac.uk>2021-12-21 10:13:48 +0000
commit11ac2ac70499fcaf84f779d223ad6717db1c43e9 (patch)
tree0e1829791a2b459b4b2a0b237af5df9fdd6d4f05 /lambda
parent0b105a2111c44c1af7a4268c1b4f5586c3de4643 (diff)
parentb4c5d7a55d9ec25693ba741a613d81f2c3ef66bc (diff)
downloadocaml-11ac2ac70499fcaf84f779d223ad6717db1c43e9.tar.gz
Merge commit 'b4c5d7a55d9ec25693ba741a613d81f2c3ef66bc' into 5.00_rebase_to_pr
Diffstat (limited to 'lambda')
-rw-r--r--lambda/translclass.ml9
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