On 2015/01/17 23:17:13, caitp wrote:
On 2015/01/17 19:45:49, caitp wrote:
> PTAL --- I realized today ArrayFrom was doing "the wrong thing" by not
> supporting bound functions. In particular, it should only care about the
> presence of a [[Construct]] internal slot.
>
> Unfortunately, construct_stub doesn't offer a great way to check this, but
> should_have_prototype seems to be a rough way of doing this.
>
> It would be nice to inline this, and maybe make heuristics for checking if a
> function is a constructor better.

Mozilla's version of this is more elegant, since they can just test a single
bitfield of the JSFunction object
https://dxr.mozilla.org/mozilla-central/source/js/src/jsfun.h#31-60 --- then
there are a few flag check heuristics for figuring out constructor-status.
Something like that could be ported in, and would probably be more trustworthy
than `should_have_prototype`

Maybe we should add a bit for has_constructor (is_constructable).

https://codereview.chromium.org/851163007/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to