Sep 27 meeting notes
allen at wirfs-brock.com
Thu Sep 29 11:46:26 PDT 2011
On Sep 29, 2011, at 10:10 AM, Brendan Eich wrote:
> On Sep 29, 2011, at 6:06 PM, Oliver Hunt wrote:
>> I'm not too concerned about the read barrier -- in terms of runtime cost i a) don't believe it would be something that people actually use :D, b) even if they did use it would be sufficiently uncommon to make the perf cost of a read barrier inconsequential and c) if somehow the read barrier did become expensive there are a large number of optimisations that could reasonably trivially get rid of the cost in hot code.
> I agree with you, we shouldn't prematurely optimize.
But we should be thinking about the potential implementation impact of everything we specify.
Just pointing out that not using const properties doesn't mean that the need for a const read barrier on every property access. Without doing closed world whole program analysis every property [[Get]] has to account for the possibility that it may be accessing an uninitialized const property. It may be that an implementation can find a way to fold this check into an initial fast-path guard. By introducing such a semantics we are adding to the complexity of every [[Get]].
This is different form the read barrier for lexical const declaration which can be lexical name specific within a lexically bounded scope.
More information about the es-discuss