On 2014/10/01 21:12:46, caitp wrote:
On 2014/10/01 21:00:35, arv wrote:
> This seems worth doing.
>
> https://codereview.chromium.org/615813004/diff/1/src/preparser.cc
> File src/preparser.cc (right):
>
>
https://codereview.chromium.org/615813004/diff/1/src/preparser.cc#newcode75
> src/preparser.cc:75: if (scanner->LiteralMatches("eval", 4)) {
> On 2014/10/01 20:52:18, caitp wrote:
> > I'm not sure if this should be used for "eval" and "arguments"
>
> eval and arguments should be the unescaped one.
>
> https://codereview.chromium.org/615813004/diff/1/src/scanner.h
> File src/scanner.h (right):
>
>
https://codereview.chromium.org/615813004/diff/1/src/scanner.h#newcode406
> src/scanner.h:406: return UnescapedLiteralMatches(data, length);
> On 2014/10/01 20:52:18, caitp wrote:
> > But if it does turn out to be necessary, I want to use the
> > unescapedliteralmatches to verify non-string-literals.
>
> Is the only difference here is the literal_contains_escapes? If so,
maybe
> refactor to share the code?
I think it's easier to understand if they have different names
"UnescapedLiteralMatches" vs "LiteralMatches" --- a boolean flag would
make
the
code a lot harder to read. Can do it, but I'm not sure it's that great
I agree that the functions should have those names. You can still share the
code
though.
https://codereview.chromium.org/615813004/
--
--
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.