My high level comment is that I'm skeptical that this is the right approach.
You will need to convince me.
This treats function-valued object properties, when called as constructors,
as
methods of the object holding them. I don't think that's quite right and I
can
see problems down the line.
It misses the common use of constructors which are not properties of any
object.
We will want to optimize that case, and I don't think we want two different
mechanisms.
Another downside of this approach is that we only know the function identity
from the map for CONSTANT_FUNCTION, not FIELD. I think we'll want to
optimize
the field case, too.
Maybe a better approach is to record monomorphic constructor function
identity
at the call site, like we do with the CallFunctionStub.
(As an aside, we will have to change our handling of CallIC sometime in
order to
support the ES5 semantics. When we do that, and with this change, we will
either end up with the wrong semantics for these constructors, or else two
modes
of CallICs, or else a new infrastructure for method calls and keeping all
the
old CallIC code around just to support this case.)
http://codereview.chromium.org/8883011/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev