[parser] Remove RETURN_IF* from ParseFormalParameter
Bug: v8:8363, v8:7926 Change-Id: I956bdd92688d4dddedca4a6ca844344072bad3f7 Reviewed-on: https://chromium-review.googlesource.com/c/1299085 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#56987}
This commit is contained in:
parent
5d1b7c37e1
commit
d5370d150d
@ -3594,11 +3594,11 @@ void ParserBase<Impl>::ParseFormalParameter(FormalParametersT* parameters) {
|
||||
|
||||
FuncNameInferrerState fni_state(&fni_);
|
||||
ExpressionT pattern = ParseBindingPattern();
|
||||
// TODO(verwaest): Remove once we have FailureExpression.
|
||||
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
|
||||
if (!impl()->IsIdentifier(pattern)) {
|
||||
parameters->is_simple = false;
|
||||
ValidateFormalParameterInitializer();
|
||||
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
|
||||
}
|
||||
|
||||
ExpressionT initializer = impl()->NullExpression();
|
||||
@ -3610,14 +3610,13 @@ void ParserBase<Impl>::ParseFormalParameter(FormalParametersT* parameters) {
|
||||
{
|
||||
ExpressionClassifier init_classifier(this);
|
||||
initializer = ParseAssignmentExpression(true);
|
||||
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
|
||||
ValidateExpression();
|
||||
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
|
||||
ValidateFormalParameterInitializer();
|
||||
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
|
||||
parameters->is_simple = false;
|
||||
}
|
||||
classifier()->RecordNonSimpleParameter();
|
||||
// TODO(verwaest): Remove once we have FailureExpression.
|
||||
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
|
||||
impl()->SetFunctionNameFromIdentifierRef(initializer, pattern);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user