summaryrefslogtreecommitdiff
path: root/bytecomp/translprim.ml
diff options
context:
space:
mode:
authorThomas Refis <thomas.refis@gmail.com>2018-08-28 17:06:45 +0100
committerThomas Refis <thomas.refis@gmail.com>2018-09-21 11:47:42 -0400
commit67f29d1a18723654ad82a4907baee288567fc25f (patch)
treea63ff5112b1d7cd2f9916e2c440e980a6b0e27c2 /bytecomp/translprim.ml
parent7f3567a63f19775e1d3eb264c5ae1bce820afe34 (diff)
downloadocaml-67f29d1a18723654ad82a4907baee288567fc25f.tar.gz
ident: add an explicit scope field
- Ident.create now takes a scope as argument - added Ident.create_var to use when the scope doesn't matter - the current_time and the current_level are unrelated as of this commit. But one has to remember to bump the level when creating new scopes.
Diffstat (limited to 'bytecomp/translprim.ml')
-rw-r--r--bytecomp/translprim.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/bytecomp/translprim.ml b/bytecomp/translprim.ml
index 02adbe8b8e..c727f63be0 100644
--- a/bytecomp/translprim.ml
+++ b/bytecomp/translprim.ml
@@ -668,7 +668,7 @@ let lambda_of_prim prim_name prim loc args arg_exps =
in
Lprim(Praise kind, [arg], loc)
| Raise_with_backtrace, [exn; bt] ->
- let vexn = Ident.create "exn" in
+ let vexn = Ident.create_var "exn" in
let raise_arg =
match arg_exps with
| None -> Lvar vexn
@@ -725,7 +725,7 @@ let transl_primitive loc p env ty path =
| Some prim -> prim
in
let rec make_params n =
- if n <= 0 then [] else Ident.create "prim" :: make_params (n-1)
+ if n <= 0 then [] else Ident.create_var "prim" :: make_params (n-1)
in
let params = make_params p.prim_arity in
let args = List.map (fun id -> Lvar id) params in