There are couple of drive-by fixes for preconditions on Object constructor
property functions as well.
I looked into the order issue a bit, but then decided that we already have
enough problems with for-in. Spec does not say anything about the order.
http://codereview.chromium.org/549050/diff/1/2
File test/mjsunit/object-get-own-property-names.js (right):
http://codereview.chromium.org/549050/diff/1/2#newcode28
test/mjsunit/object-get-own-property-names.js:28: // Test ES5 sections
15.2.3.4 Object.getOwnPropertyNames.
On 2010/01/14 22:05:13, Søren Gjesse wrote:
sections -> section
Done.
http://codereview.chromium.org/549050/diff/1/2#newcode29
test/mjsunit/object-get-own-property-names.js:29:
On 2010/01/14 22:05:13, Søren Gjesse wrote:
I think this test should start with some straight forward examples,
e.g
{a:1,b:2}
{a:function(){},b:function(){}}
and an object which is known to be in slow-case.
a={a:1,b:2,c:3}
delete a.c
a.getOwnPropertyNames()
This is to cover some of the internal states/representations used by
V8.
Done.
http://codereview.chromium.org/549050/diff/1/2#newcode54
test/mjsunit/object-get-own-property-names.js:54: print(2);
On 2010/01/14 22:05:13, Søren Gjesse wrote:
Remove?
Done.
http://codereview.chromium.org/549050/diff/1/2#newcode65
test/mjsunit/object-get-own-property-names.js:65: assertEquals("length",
propertyNames[2]);
On 2010/01/14 22:05:13, Søren Gjesse wrote:
I have not read ES5 section 15.2.3.4 but is the order of the
getOwnPropertyNames
defined?
It is not. WebKit returns everything in the order it was added. No one
else has it implemented. In our case it is not defined.
http://codereview.chromium.org/549050
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev