I have not read ES5 section 15.2.3.4, but recycling the %Debug functions if getOwnPropertyNames have the same semantic is the right way to go.
Also consider adding a cctest with objects having accessors, callbacks, hidden
properties etc. 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. sections -> section http://codereview.chromium.org/549050/diff/1/2#newcode29 test/mjsunit/object-get-own-property-names.js:29: 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. http://codereview.chromium.org/549050/diff/1/2#newcode54 test/mjsunit/object-get-own-property-names.js:54: print(2); Remove? http://codereview.chromium.org/549050/diff/1/2#newcode65 test/mjsunit/object-get-own-property-names.js:65: assertEquals("length", propertyNames[2]); I have not read ES5 section 15.2.3.4 but is the order of the getOwnPropertyNames defined? http://codereview.chromium.org/549050
-- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
