On Fri, Oct 18, 2013 at 2:08 AM, Jonathan S. Shapiro <[email protected]>wrote:
> On Thu, Oct 17, 2013 at 10:31 AM, Bennie Kloosteman <[email protected]>wrote: > >> On Thu, Oct 17, 2013 at 11:21 PM, Jonathan S. Shapiro >> <[email protected]>wrote: >> >>> For objects that are immutable by virtue of their static type, the bit >>> can be tucked in the vtable. Those bits are a lot cheaper. >>> >> >> If its only 20 objects at a time you dont need this at all just lookup >> the type .. Obviosuly for URC when you do a whole nursery its a diffirent >> story.. >> > > That was my first thought as well, but it doesn't work. The problem is > that statically frozen objects aren't frozen until their constructor is > done running. If the constructor allocates it can trigger a GC while the > object is still mutable. If the object gets forwarded during that phase, > things can get messed up, and it's a rare enough case that you'd spend the > rest of your adult life hunting it down. > Yes i thought there was no reference until the constructor is finished but the issue is other objects moving which it references while its mutating them. Also what about defaulting to shallow const on all objects which would then freeze and thaw as needed . Ben
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
