[webkit-reviews] review granted: [Bug 206972] Parser needs to restore unary stack state when backtracking : [Attachment 389200] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 29 16:50:20 PST 2020
Saam Barati <sbarati at apple.com> has granted Keith Miller
<keith_miller at apple.com>'s request for review:
Bug 206972: Parser needs to restore unary stack state when backtracking
https://bugs.webkit.org/show_bug.cgi?id=206972
Attachment 389200: Patch
https://bugs.webkit.org/attachment.cgi?id=389200&action=review
--- Comment #2 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 389200
--> https://bugs.webkit.org/attachment.cgi?id=389200
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=389200&action=review
nice
Maybe add some more tests. like test both strict and non strict. And maybe some
of the other tests we were dealing with yesterday. Might also be good to try
different unary ops, etc.
> Source/JavaScriptCore/ChangeLog:8
> + Previously we would try to parse possibly stale stack entries
"stack entries" => "unary operator. stack entries"
> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:177
> + static constexpr unsigned thisLength = sizeof("this") - 1; // don't
count \0
why?
why not strlen?
> Source/JavaScriptCore/parser/SyntaxChecker.h:340
> + void assignmentStackAppend(int& hasAssignements, int, int, int, int,
Operator) { hasAssignements = 1; }
hasAssignments => assignmentStackDepth
> Source/JavaScriptCore/parser/SyntaxChecker.h:341
> + int createAssignment(const JSTokenLocation&, int& hasAssignements, int,
int, int, int) { hasAssignements = 0; return AssignmentExpr; }
hasAssignments => assignmentStackDepth
More information about the webkit-reviews
mailing list