Comment #106 on issue 164 by [email protected]: Wrong order in Object properties interation
http://code.google.com/p/v8/issues/detail?id=164

Hmm, would it be possible to check data type upon insertion?
As I understand, fast and slow system works internally in parallel (thus getting the numerical keys first in key value order and after that string keys in defined order).

So when doing obj[1] = 123; (typeof 1 == 'number') it would go to the fast system, and when doing obj['1'] = 123; (typeof '1' == 'string') it would go to slower system that stores ordering?

But since for(var i in obj)alert(typeof i); always shows string, then looping would still be broken, unless the key returned would retain it's original type (number). I did not find in ECMAScript specs if such a behaviour would be allowed or not plus it would again be different from the other browsers... Anyone else got any ideas?

Would it be possible to separate JSArrays and JSObjects code into two separate codeflows so that arrays would still be fast and small, but objects would still act as they were before?

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

Reply via email to