The answer is no for each case.

V8 does not track types of values assigned to a named properties.

Vyacheslav Egorov


On Tue, Nov 6, 2012 at 12:27 PM, Wyatt <[email protected]> wrote:
> With the follow code one hidden class is created:
>
> function Point(x, y) {
>     this.x = x;
>     this.y = y;
> }
> var p1 = new Point(11, 22);
> var p2 = new Point(33, 44);
>
> Will p2.x="aString"; change its hidden class?
>
> Will p2.x=undefined; change its hidden class?
>
> Will p3= new Point(42,"theAnswer"); create a new hidden class?
>
> I'm inclined to think that the answer is yes for each case..?
> Or at least each of these cases seems as if it could not be fully optimized.
>
> Any help is much appreciated!
>
> --
> 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