From: Charles Oliver Nutter Date: 2009-02-23T09:19:16+09:00 Subject: [ruby-core:22340] Re: Floats are freezeable and taintable? Yes, that would be desirable, if there's not a good reason they aren't immediates now. 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 >> >> >> >