>From the right address.

On Fri, Apr 16, 2010 at 5:24 PM, Anton Muhin <[email protected]> wrote:
> Details are rather tricky overall, but roughly, yes, they cached: the
> property is read or a function is called several times V8 looks for
> its holder (object which owns the property) and compiles a stub that
> first checks if any objects from receiver to holder has been changed
> and if it's not the case, performs fast (sometimes really fast)
> lookup.
>
> If you really look for all the details, take a look at src/ic.cc and
> looks into {Load,Store,Call}IC_Miss functions---they eventual call
> UpdateCaches which could patch the code.
>
> yours,
> anton.
>
> On Fri, Apr 16, 2010 at 3:42 PM, Fredrik Holmström
> <[email protected]> wrote:
>> I've been searching the V8 source code for how the [[Prototype]] chain
>> is handled together with the hidden classes concept, I'm fully on
>> terms with how the  hidden classes works for properties that exist
>> directly on the current object, but if I do this:
>>
>> x = { y: "hello world" };
>> x.hasOwnProperty("y");
>>
>> Then the property access to retrieve the hasOwnProperty function needs
>> to traverse the [[Property]] chain of the 'x'-object, until it hits
>> the Object.prototype object which contains the hasOwnProperty
>> function. Is this done dynamically each time if the property doesn't
>> exist on the object or is this also cached/inlined in some way?
>>
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>>
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to