You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1927 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general)
Bug description
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...
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.
If I understand correctly, you are describing the hash-consing problem.
I don't see why you need helper data to solve it. Two unboxed values
are (==) if and only if they are (=), so you don't need any sharing
information for unboxed values.
Original bug ID: 1927
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
On 12.11.2003 04:49, Damien Doligez wrote:
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
The text was updated successfully, but these errors were encountered: