Mill Computing, Inc. › Forums › The Mill › Architecture › Memory › Reply To: Memory
> Are you thinking about closures created by a JIT, where the code could be anywhere and the code and data may be moved by the GC? Or compiled closures like lambdas in C++?
I mean compiled closures.
But since we’re getting more specific now I went and looked up this old Peyton Jones paper again, which you are most likely familiar with.
In chapter 7 he describes how haskell core language closures could/should be implemented in stock hardware of the time. It’s very possible that most of that information very much obsolete today, but as you have said so nicely yourself, the architectures of stock hardware haven’t changed/improved much since then.
In particular the optimization in 7.6 cannot really be done when constant data and code are in different memory protection turfs. In that case it would be beneficial to have implicit bases handy for both cases, so that one offset works for both, although the info table itself is far less referenced than the actual code.
- This reply was modified 9 years, 5 months ago by imbecile.