At 09:19 09/02/23, Charles Oliver Nutter wrote: >Yes, that would be desirable, if there's not a good reason they aren't immediates now. The main reason they are not immediates now is that they do not fit in four bytes. Once everybody uses 64-bit machines, the problem might go away :-). Regards, Martin. >It would allow caching literals, which was how I originally found this. The only tests that failed were two that froze and tainted a float; otherwise everything was fine. > >Brent Roman wrote: >> I'm pretty sure that it is a consequence of Floats not being immediate >> objects in MRI. >> I think what you are proposing is that the spec disallow any operations on >> Floats that >> would interfere with implementing them as immediate objects. >> If so, this sounds like a good idea to me. >> - brent >> >> Charles Oliver Nutter-2 wrote: >>> In adding an optimization for Float I realized that Float objects are both freezable and taintable. Is there a reason for this? It makes it impossible to, for example, cache literal float objects, make them immediate, make them pass-by-value (e.g. on stack), and so on. Is there a reason floats are freezable and taintable? >>> >>> - Charlie >>> >>> >>> >> > > #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst / it.aoyama.ac.jp