[parser] Simplify CheckAndRewriteReferenceExpression
Use the parser's IsValidReferenceExpression as a likely-succeeding precheck. Slightly optimizes IsEvalOrArguments in the preparser and IsIdentifier for the parser (we now have FailureExpression everywhere); and replaces IsObjectLiteral||IsArrayLiteral by IsValidPattern. Change-Id: I7e9684485c0ce454e640800566eb4b0a24c6bfc8 Reviewed-on: https://chromium-review.googlesource.com/c/1345995 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57682}
Showing
Please
register
or
sign in
to comment