Commit e4dc2756 authored by Kim Nguyễn's avatar Kim Nguyễn Committed by Pietro Abate

Prevent the compiler from statically allocating an persistent variant (that is...

Prevent the compiler from statically allocating an persistent variant (that is mutated by the OCaml runtime)

Conflicts:
	runtime/value.ml
parent c2259c44
......@@ -212,7 +212,9 @@ let rec flatten = function
| q -> q
let eval_lazy_concat v =
let accu = Obj.magic (Pair (nil,Absent,Mono)) in
(* prevent the ocamlopt from statically allocating the
value Pair(nil, Absent) *)
let accu = Obj.(magic (dup (repr (Pair (nil, Absent))))) in
let rec aux accu = function
| Concat (x,y, _) -> aux (append_cdr accu x) y
| v -> set_cdr accu v
......
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