Sorry, messed up with git cl.  Moving to
http://codereview.chromium.org/606017


On 2010/02/12 14:05:55, antonm wrote:
http://codereview.chromium.org/604033/diff/1/3
File src/builtins.cc (right):

http://codereview.chromium.org/604033/diff/1/3#newcode341
src/builtins.cc:341: Object* undefined = Heap::undefined_value();
On 2010/02/12 13:27:51, Mads Ager wrote:
> Get rid of the local variable and just put in Heap::undefined_value at the
only
> use site?

Done.

http://codereview.chromium.org/604033/diff/1/3#newcode358
src/builtins.cc:358: if (first->IsTheHole())
On 2010/02/12 13:27:51, Mads Ager wrote:
> Please use braces around the body.

Done.

http://codereview.chromium.org/604033/diff/1/3#newcode363
src/builtins.cc:363: if (e->IsTheHole())
On 2010/02/12 13:27:51, Mads Ager wrote:
> Please use braces around the body.

Done.

http://codereview.chromium.org/604033/diff/1/3#newcode365
src/builtins.cc:365: elms->set(i, e);
On 2010/02/12 13:27:51, Mads Ager wrote:
> Will this preserve array holes? Won't GetElement return undefined for holes
in
> the array? Then set will introduce an element that wasn't there before with
an
> undefined value?

Nice catch, thanks a lot. Regression test added. Fixed in not most optimal
way
for sparsed arrays (doing HasElement call). If it'd prove to be a bottleneck,
I'd adjust.

The problem is I didn't find an API to get element which would distinguish
between hole and undefined.  It's easy to add (if indeed missing).



http://codereview.chromium.org/604033

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

Reply via email to