Commit 01f61eac authored by POTTIER Francois's avatar POTTIER Francois

Renaming.

parent e868963a
......@@ -5,14 +5,14 @@ open Hashcons
type hexpr =
H of hexpr oexpr hash_consed [@@unboxed]
let table : hexpr oexpr Hashcons.t =
let table =
create 128
let make : hexpr oexpr -> hexpr =
fun e -> H (hashcons table e)
let h (e : hexpr oexpr) : hexpr =
H (hashcons table e)
class ['self] map = object(self : 'self)
inherit [_] omap
method visit_'expr env (H { node = e; _ }) =
make (self#visit_oexpr env e)
h (self#visit_oexpr env e)
end
open Expr12
open Expr08
let econst e = make (EConst e)
let eadd e1 e2 = make (EAdd (e1, e2))
let econst e = h (EConst e)
let eadd e1 e2 = h (EAdd (e1, e2))
let increment (e : hexpr) : hexpr =
let v = object
......
......@@ -7,7 +7,7 @@ let import (e : expr) : hexpr =
let v = object (self)
inherit [_] omap
method visit_'expr _env (E e) =
make (self#visit_oexpr _env e)
h (self#visit_oexpr _env e)
end in
v # visit_'expr () e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment