I considered putting the check into EmitRegExpExec, but a type check there
would be a lot more expensive since the instance type would have to be
loaded. In the stub however we have to fetch the instance type anyways, so
it is a lot cheaper there.

Yang

On Thu, Nov 24, 2011 at 6:08 PM, <[email protected]> wrote:

> The previous checks indeed, subtly, include the kNotStringTag bit in the
> comparison, and should be safe. If doing it this way, at least put a
> comment
> explaining that the lt(r1, ...) comparison can't succeed if the object is a
> non-string.
>
> Apart from that, the optimal (IMO) place to check for the input being a
> string
> is in the code for %_RegExpExec, not in the stub that it happens to call.
>
> In either case, LGTM.
>
>
> http://codereview.chromium.**org/8554004/<http://codereview.chromium.org/8554004/>
>

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

Reply via email to