On Wed, Sep 11, 2013 at 9:08 AM, Tom Van Cutsem <[email protected]> wrote:
> Currently the pattern for this is [[Get]]+[[Call]]. We cannot refactor to
> [[Has]] + [[Invoke]] in general, because [[Has]] will return true also for
> non-callable values.
>
> If we believe these are call-sites where it is worth avoiding the allocation
> of a function, then having an additional internal method like [[GetMethod]]
> or [[InvokeConditional]] makes sense, but I doubt it's worth the added
> complexity.

But as Allen said, [[Invoke]] is not a performance hack. It's a
correctness hack.

It permits proxies to customize their behavior around `this`, and even
naive .invoke trap users would definitely want those customizations to
apply for implicit .toString() and .then().

-j
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to