In addition to addressing the comments I have added support for strings
(which
have a special case - see ECMAScript 5 15.5.5.2).
http://codereview.chromium.org/2278002/diff/7001/8001
File src/runtime.cc (right):
http://codereview.chromium.org/2278002/diff/7001/8001#newcode589
src/runtime.cc:589: GetOwnPropertyImplementation(obj, name, &result);
On 2010/05/26 11:23:18, Mads Ager wrote:
Maybe do the split before? Start out checking if the name is really an
array
index and avoid this call if it is?
Done.
http://codereview.chromium.org/2278002/diff/7001/8001#newcode594
src/runtime.cc:594: if (!name->AsArrayIndex(&index) ||
!obj->HasElement(index)) {
On 2010/05/26 11:23:18, Mads Ager wrote:
Does HasElement do the right thing? Shouldn't you use HasLocalElement?
Done.
http://codereview.chromium.org/2278002/diff/7001/8001#newcode603
src/runtime.cc:603: // Since we already did a check earlier on that we
actually have the
On 2010/05/26 11:23:18, Mads Ager wrote:
Since we already checked that we have an element there is no need to
check if
the entry is valid.
Removed since the changed order makes this clear from the code.
http://codereview.chromium.org/2278002/diff/7001/8001#newcode606
src/runtime.cc:606: elms->set(0, Heap::false_value());
On 2010/05/26 11:23:18, Mads Ager wrote:
Maybe we should define named constants for 0-4. Would make it easier
to read the
code for property descriptors.
They problem is that they represent different things depending on if it
is a data property or an accessor as described by the method comment. I
could make two enums or one with mixed names (i.e.,
GET_FUNCTION_OR_VALUE and SET_FUNCTION_OR_WRITABLE). We would still,
however, have magic numbers in v8natives.js.
http://codereview.chromium.org/2278002/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev