Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2003-11-12 (23:22)
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:
E-Mail: (office), (personal)
Office: Jorgensen 70, tel: (626) 395-2907

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: