Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Re: Constants immediatelly disappear from the Weak array. (PR#1925)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Aleksey Nogin <nogin@c...>
Subject: Re: [Caml-list] Re: Constants immediatelly disappear from the Weak array. (PR#1925)
On 12.11.2003 04:49, Damien Doligez wrote:

> Yes, but.  In 3.06, [] will never be removed from the weak array, and
> you will keep your helper data forever.

But that is reasonable semantically - since for all we know some 
reachable memory location can have [] in it, so we need to keep it 
forever. Note that for the same reason the helper data needs to stay 
around forever _anyway_, but now the implementation just got _much_ uglier.

Basically, we used to have a very nice and completely polymorphic 
weak_memo module (that solves the following problem - if you have an 
arbitrary mutually-recursive data type that you are converting into an 
"isomorphic" one, how do you set it up so that equal inputs are mapped 
to the same output, and the whole process takes linear time); and in 
3.07 this module needs to include various calls to Obj to be able to 
figure out whether the output happens to be an unboxed value.

In other words, 3.06 allowed things to stay completely polymorphic, 
while 3.07 requires Obj hacks. Very unfortunate...

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners