> > >> Also what about defaulting to shallow const on all objects which would >> then freeze and thaw as needed. >> > > Unfortunately that creates a race condition. Suppose I forward an > immutable object. I don't force a read barrier, because they're both > equally good. If somebody "upgrades" the object to mutable, I retroactively > need a read barrier. Depending on the mechanism used to implement the read > barrier, I may or may not be able to put one in place that flexibly. >
In that scenario i was thinking of no user setting / freezing but all setting being done by the compiler.. you could use a count ( too expensive this needs to be ultra cheap) but there may be a better way as you only care if its the last setter of the object and in does not need to be precise if a few objects stay mutable thats fine ( as this mutable is not language ) ., it will be reset when they exit the next mutable function .. ( the reverse would be an issue) .. Its a bit late to nut this out but i think there is a good chance an effective solution can be found . Actually as many mutations have locks this may work fine. Ben
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
