Removed the elements-related code. Also removed the ASSERT from DetailsAtPut since it should not trigger for elements. Since we do not have the key in DetailsAtPut we can't distinguish between elements and properties.
https://chromiumcodereview.appspot.com/10908216/diff/1/src/objects.cc File src/objects.cc (right): https://chromiumcodereview.appspot.com/10908216/diff/1/src/objects.cc#newcode9405 src/objects.cc:9405: if (details.dictionary_index() == 0 && !(attributes & DONT_ENUM)) { You are right, this code is unnecessary for elements. It just invalidly triggered the ASSERT in DetailsAtPut, which is now removed. We only have to ensure enumeration indices for properties. On 2012/09/12 17:06:55, Michael Starzinger wrote:
Why do we check for DONT_ENUM here? Do we do that anywhere else in the
code? If
not I would just allocate enumeration indices. If we change the
DONT_ENUM
attribute after the fact, the enumeration order will be screwed up
because we
didn't hand out an index when the property was defined.
However I am not sure if my comment even applies to elements as
opposed to
properties.
Also I don't understand why we check for dictionary_index == 0 instead
of
IsDeleted() here. Shouldn't the invariant be that every non-deleted
property has
a valid enumeration index?
https://chromiumcodereview.appspot.com/10908216/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
