As far as I can tell this should work. When you have removed the TODOs this
LGTM. Then you can double check if all the keyed call cases are covered.


http://codereview.chromium.org/6523052/diff/2001/src/ic.cc
File src/ic.cc (right):

http://codereview.chromium.org/6523052/diff/2001/src/ic.cc#newcode464
src/ic.cc:464: // TODO(mmaly): One cannot hang number-indexed functions
off of values, right?
On 2011/02/16 04:56:17, Martin Maly wrote:
I couldn't come up with a way where value could actually be valid
here. I may be
wrong though...

I think that is because we have a bug here. I think you should leave
this code as is. GetElement should deal with prototypes for value
objects the same way that GetProperty does.

The case that we should hit here is:

Number.prototype[0] = function() { print('asdf'); }
(0)["0"]()

We do not hit this and we throw an error. This is inconsistent and we
should change it. Let's file a bug report and deal with that in a
separate change.

http://codereview.chromium.org/6523052/diff/2001/src/ic.cc#newcode490
src/ic.cc:490: // TODO(mmaly): Should we do ToObject here?
Nope, there is no change to this code and it makes sense to use the
value object for error reporting. That is what you attempted to call
something on.

The ReceiverToObject call only changes the receiver on the stack I
believe, so you have not made any change to behavior here.

http://codereview.chromium.org/6523052/

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

Reply via email to