Skip to content

Commit 0c05ebd

Browse files
committed
Update V8 DEPS to bump ICU to 63
1 parent 71f4742 commit 0c05ebd

19 files changed

+405
-95
lines changed

deps/v8/DEPS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ vars = {
1313

1414
deps = {
1515
'v8/build':
16-
Var('chromium_url') + '/chromium/src/build.git' + '@' + '49671d3af749f02346a8fe246c56189e69e3b791',
16+
Var('chromium_url') + '/chromium/src/build.git' + '@' + '277ad4304168986653055957a3cf2c647cf10eb9',
1717
'v8/third_party/depot_tools':
18-
Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'cb629a482b3d3c13e46a66031ba4c0cc3679d200',
18+
Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'f170af48e4490633334a300bbcb65d50fab09537',
1919
'v8/third_party/icu':
20-
Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'b029971f1fc6b20d06887c47c7afebd5881f31ff',
20+
Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '42d5027992a0946942839b8821765e1512afbc21',
2121
'v8/third_party/instrumented_libraries':
22-
Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'a90cbf3b4216430a437991fb53ede8e048dea454',
22+
Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'a959e4f0cb643003f2d75d179cede449979e3e77',
2323
'v8/buildtools':
2424
Var('chromium_url') + '/chromium/buildtools.git' + '@' + '13a00f110ef910a25763346d6538b60f12845656',
2525
'v8/base/trace_event/common':
@@ -33,7 +33,7 @@ deps = {
3333
'condition': 'checkout_android',
3434
},
3535
'v8/third_party/catapult': {
36-
'url': Var('chromium_url') + '/catapult.git' + '@' + '36a23a7b2851af59ed8734145c92a2bb2eb243f2',
36+
'url': Var('chromium_url') + '/catapult.git' + '@' + '5e1c1c293b07ef04a247dd8dff50972d207663a4',
3737
'condition': 'checkout_android',
3838
},
3939
'v8/third_party/colorama/src': {

deps/v8/src/parsing/parser-base.h

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class SourceRangeScope final {
9898
// ----------------------------------------------------------------------------
9999
// The RETURN_IF_PARSE_ERROR macro is a convenient macro to enforce error
100100
// handling for functions that may fail (by returning if there was an parser
101-
// error scanner()->has_parser_error()).
101+
// error).
102102
//
103103
// Usage:
104104
// foo = ParseFoo(); // may fail
@@ -274,7 +274,7 @@ class ParserBase {
274274

275275
#undef ALLOW_ACCESSORS
276276

277-
bool has_error() const { return scanner()->has_parser_error(); }
277+
V8_INLINE bool has_error() const { return scanner()->has_parser_error(); }
278278
bool allow_harmony_numeric_separator() const {
279279
return scanner()->allow_harmony_numeric_separator();
280280
}
@@ -1667,7 +1667,6 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseBindingPattern() {
16671667

16681668
if (Token::IsAnyIdentifier(token)) {
16691669
IdentifierT name = ParseAndClassifyIdentifier();
1670-
RETURN_IF_PARSE_ERROR;
16711670
result = impl()->ExpressionFromIdentifier(name, beg_pos);
16721671
} else {
16731672
classifier()->RecordNonSimpleParameter();
@@ -1734,7 +1733,6 @@ ParserBase<Impl>::ParsePrimaryExpression() {
17341733
infer = InferName::kNo;
17351734
}
17361735
}
1737-
RETURN_IF_PARSE_ERROR;
17381736
return impl()->ExpressionFromIdentifier(name, beg_pos, infer);
17391737
}
17401738
DCHECK_IMPLIES(Token::IsAnyIdentifier(token), token == Token::ENUM);
@@ -2224,7 +2222,6 @@ ParserBase<Impl>::ParseClassPropertyDefinition(
22242222
ClassLiteralPropertyT result = factory()->NewClassLiteralProperty(
22252223
name_expression, initializer, *property_kind, *is_static,
22262224
*is_computed_name, *is_private);
2227-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
22282225
impl()->SetFunctionNameFromPropertyName(result, *name);
22292226
return result;
22302227

@@ -2245,7 +2242,6 @@ ParserBase<Impl>::ParseClassPropertyDefinition(
22452242
if (!*is_computed_name) {
22462243
checker->CheckClassMethodName(name_token, ParsePropertyKind::kMethod,
22472244
function_flags, *is_static);
2248-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty)
22492245
}
22502246

22512247
FunctionKind kind = MethodKindFor(function_flags);
@@ -2260,7 +2256,6 @@ ParserBase<Impl>::ParseClassPropertyDefinition(
22602256
*name, scanner()->location(), kSkipFunctionNameCheck, kind,
22612257
name_token_position, FunctionLiteral::kAccessorOrMethod,
22622258
language_mode(), nullptr);
2263-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
22642259

22652260
*property_kind = ClassLiteralProperty::METHOD;
22662261
ClassLiteralPropertyT result = factory()->NewClassLiteralProperty(
@@ -2293,7 +2288,6 @@ ParserBase<Impl>::ParseClassPropertyDefinition(
22932288
*name, scanner()->location(), kSkipFunctionNameCheck, kind,
22942289
name_token_position, FunctionLiteral::kAccessorOrMethod,
22952290
language_mode(), nullptr);
2296-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
22972291

22982292
*property_kind =
22992293
is_get ? ClassLiteralProperty::GETTER : ClassLiteralProperty::SETTER;
@@ -2378,7 +2372,6 @@ ParserBase<Impl>::ParseObjectPropertyDefinition(ObjectLiteralChecker* checker,
23782372
bool is_private = false;
23792373
ExpressionT name_expression = ParsePropertyName(
23802374
&name, &kind, &function_flags, is_computed_name, &is_private);
2381-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
23822375

23832376
if (is_private) {
23842377
// TODO(joyee): private names in object literals should be Syntax Errors
@@ -2464,7 +2457,6 @@ ParserBase<Impl>::ParseObjectPropertyDefinition(ObjectLiteralChecker* checker,
24642457
Scanner::Location(next_beg_pos, end_position()),
24652458
MessageTemplate::kInvalidCoverInitializedName);
24662459

2467-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
24682460
impl()->SetFunctionNameFromIdentifierRef(rhs, lhs);
24692461
} else {
24702462
value = lhs;
@@ -2495,7 +2487,6 @@ ParserBase<Impl>::ParseObjectPropertyDefinition(ObjectLiteralChecker* checker,
24952487
ObjectLiteralPropertyT result = factory()->NewObjectLiteralProperty(
24962488
name_expression, value, ObjectLiteralProperty::COMPUTED,
24972489
*is_computed_name);
2498-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
24992490
impl()->SetFunctionNameFromPropertyName(result, name);
25002491
return result;
25012492
}
@@ -2513,6 +2504,7 @@ ParserBase<Impl>::ParseObjectPropertyDefinition(ObjectLiteralChecker* checker,
25132504
// Make sure the name expression is a string since we need a Name for
25142505
// Runtime_DefineAccessorPropertyUnchecked and since we can determine
25152506
// this statically we can skip the extra runtime check.
2507+
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
25162508
name_expression =
25172509
factory()->NewStringLiteral(name, name_expression->position());
25182510
}
@@ -2533,7 +2525,6 @@ ParserBase<Impl>::ParseObjectPropertyDefinition(ObjectLiteralChecker* checker,
25332525
const AstRawString* prefix =
25342526
is_get ? ast_value_factory()->get_space_string()
25352527
: ast_value_factory()->set_space_string();
2536-
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
25372528
impl()->SetFunctionNameFromPropertyName(result, name, prefix);
25382529
return result;
25392530
}
@@ -3562,7 +3553,7 @@ void ParserBase<Impl>::ParseFormalParameter(FormalParametersT* parameters) {
35623553
FuncNameInferrerState fni_state(&fni_);
35633554
ExpressionT pattern = ParseBindingPattern();
35643555
// TODO(verwaest): Remove once we have FailureExpression.
3565-
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
3556+
RETURN_IF_PARSE_ERROR_VOID;
35663557
if (!impl()->IsIdentifier(pattern)) {
35673558
parameters->is_simple = false;
35683559
ValidateFormalParameterInitializer();
@@ -3582,8 +3573,6 @@ void ParserBase<Impl>::ParseFormalParameter(FormalParametersT* parameters) {
35823573
parameters->is_simple = false;
35833574
}
35843575
classifier()->RecordNonSimpleParameter();
3585-
// TODO(verwaest): Remove once we have FailureExpression.
3586-
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
35873576
impl()->SetFunctionNameFromIdentifierRef(initializer, pattern);
35883577
}
35893578

@@ -3633,7 +3622,6 @@ void ParserBase<Impl>::ParseFormalParameterList(FormalParametersT* parameters) {
36333622
}
36343623
}
36353624

3636-
RETURN_IF_PARSE_ERROR_CUSTOM(Void);
36373625
impl()->DeclareFormalParameters(parameters);
36383626
}
36393627

@@ -3699,7 +3687,6 @@ typename ParserBase<Impl>::BlockT ParserBase<Impl>::ParseVariableDeclarations(
36993687
Scanner::Location variable_loc = scanner()->location();
37003688

37013689
// TODO(verwaest): Remove once we have FailureExpression.
3702-
RETURN_IF_PARSE_ERROR_CUSTOM(NullStatement);
37033690
bool single_name = impl()->IsIdentifier(pattern);
37043691
if (single_name) {
37053692
impl()->PushVariableName(impl()->AsIdentifier(pattern));
@@ -3720,11 +3707,10 @@ typename ParserBase<Impl>::BlockT ParserBase<Impl>::ParseVariableDeclarations(
37203707
parsing_result->first_initializer_loc = variable_loc;
37213708
}
37223709

3723-
// TODO(verwaest): Remove once we have FailureExpression.
3724-
RETURN_IF_PARSE_ERROR_CUSTOM(NullStatement);
3725-
37263710
// Don't infer if it is "a = function(){...}();"-like expression.
37273711
if (single_name) {
3712+
// TODO(verwaest): Remove once we have FailureExpression.
3713+
RETURN_IF_PARSE_ERROR_CUSTOM(NullStatement);
37283714
if (!value->IsCall() && !value->IsCallNew()) {
37293715
fni_.Infer();
37303716
} else {
@@ -5470,7 +5456,6 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseForStatement(
54705456

54715457
Expect(Token::SEMICOLON);
54725458

5473-
RETURN_IF_PARSE_ERROR;
54745459
StatementT init = impl()->BuildInitializationBlock(&for_info.parsing_result,
54755460
&for_info.bound_names);
54765461

@@ -5493,7 +5478,6 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseForStatement(
54935478
own_labels, nullptr);
54945479
}
54955480

5496-
RETURN_IF_PARSE_ERROR;
54975481
init = impl()->BuildInitializationBlock(&for_info.parsing_result, nullptr);
54985482
} else if (peek() != Token::SEMICOLON) {
54995483
// The initializer does not contain declarations.
@@ -5647,7 +5631,6 @@ ParserBase<Impl>::ParseForEachStatementWithoutDeclarations(
56475631
expression = CheckAndRewriteReferenceExpression(
56485632
expression, lhs_beg_pos, lhs_end_pos, MessageTemplate::kInvalidLhsInFor,
56495633
kSyntaxError);
5650-
RETURN_IF_PARSE_ERROR;
56515634
}
56525635

56535636
auto loop = factory()->NewForEachStatement(for_info->mode, labels, own_labels,

deps/v8/src/parsing/parser.cc

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void Parser::GetUnexpectedTokenMessage(Token::Value token,
139139
// ----------------------------------------------------------------------------
140140
// The RETURN_IF_PARSE_ERROR macro is a convenient macro to enforce error
141141
// handling for functions that may fail (by returning if there was an parser
142-
// error scanner()->has_parser_error()).
142+
// error).
143143
//
144144
// Usage:
145145
// foo = ParseFoo(); // may fail
@@ -148,12 +148,11 @@ void Parser::GetUnexpectedTokenMessage(Token::Value token,
148148
// SAFE_USE(foo);
149149

150150
#define RETURN_IF_PARSE_ERROR_VALUE(x) \
151-
if (scanner()->has_parser_error()) { \
152-
return x; \
153-
}
151+
if (has_error()) return x;
154152

155153
#define RETURN_IF_PARSE_ERROR RETURN_IF_PARSE_ERROR_VALUE(nullptr)
156-
#define RETURN_IF_PARSE_ERROR_VOID RETURN_IF_PARSE_ERROR_VALUE(this->Void())
154+
#define RETURN_IF_PARSE_ERROR_VOID \
155+
if (has_error()) return;
157156

158157
// ----------------------------------------------------------------------------
159158
// Implementation of Parser
@@ -589,9 +588,8 @@ FunctionLiteral* Parser::DoParseProgram(Isolate* isolate, ParseInfo* info) {
589588
zone());
590589

591590
ParseModuleItemList(body);
592-
ok = !scanner_.has_parser_error() &&
593-
module()->Validate(this->scope()->AsModuleScope(),
594-
pending_error_handler(), zone());
591+
ok = !has_error() && module()->Validate(this->scope()->AsModuleScope(),
592+
pending_error_handler(), zone());
595593
} else if (info->is_wrapped_as_function()) {
596594
ParseWrapped(isolate, info, body, scope, zone(), &ok);
597595
} else {
@@ -600,15 +598,15 @@ FunctionLiteral* Parser::DoParseProgram(Isolate* isolate, ParseInfo* info) {
600598
this->scope()->SetLanguageMode(info->language_mode());
601599
ParseStatementList(body, Token::EOS);
602600
}
603-
ok = ok && !scanner_.has_parser_error();
601+
ok = ok && !has_error();
604602

605603
// The parser will peek but not consume EOS. Our scope logically goes all
606604
// the way to the EOS, though.
607605
scope->set_end_position(scanner()->peek_location().beg_pos);
608606

609607
if (ok && is_strict(language_mode())) {
610608
CheckStrictOctalLiteral(beg_pos, scanner()->location().end_pos);
611-
ok = !scanner_.has_parser_error();
609+
ok = !has_error();
612610
}
613611
if (ok && is_sloppy(language_mode())) {
614612
// TODO(littledan): Function bindings on the global object that modify
@@ -619,7 +617,7 @@ FunctionLiteral* Parser::DoParseProgram(Isolate* isolate, ParseInfo* info) {
619617
}
620618
if (ok) {
621619
CheckConflictingVarDeclarations(scope);
622-
ok = !scanner_.has_parser_error();
620+
ok = !has_error();
623621
}
624622

625623
if (ok && info->parse_restriction() == ONLY_SINGLE_FUNCTION_LITERAL) {
@@ -815,12 +813,12 @@ FunctionLiteral* Parser::DoParseFunction(Isolate* isolate, ParseInfo* info,
815813
if (Check(Token::LPAREN)) {
816814
// '(' StrictFormalParameters ')'
817815
ParseFormalParameterList(&formals);
818-
ok = !scanner_.has_parser_error();
816+
ok = !has_error();
819817
if (ok) ok = Check(Token::RPAREN);
820818
} else {
821819
// BindingIdentifier
822820
ParseFormalParameter(&formals);
823-
ok = !scanner_.has_parser_error();
821+
ok = !has_error();
824822
if (ok) {
825823
DeclareFormalParameters(&formals);
826824
}
@@ -853,7 +851,7 @@ FunctionLiteral* Parser::DoParseFunction(Isolate* isolate, ParseInfo* info,
853851
const int rewritable_length = 0;
854852
Expression* expression =
855853
ParseArrowFunctionLiteral(accept_IN, formals, rewritable_length);
856-
ok = !scanner_.has_parser_error();
854+
ok = !has_error();
857855
if (ok) {
858856
// Scanning must end at the same position that was recorded
859857
// previously. If not, parsing has been interrupted due to a stack
@@ -884,10 +882,10 @@ FunctionLiteral* Parser::DoParseFunction(Isolate* isolate, ParseInfo* info,
884882
raw_name, Scanner::Location::invalid(), kSkipFunctionNameCheck, kind,
885883
kNoSourcePosition, function_type, info->language_mode(),
886884
arguments_for_wrapped_function);
887-
ok = !scanner_.has_parser_error();
885+
ok = !has_error();
888886
}
889887

890-
DCHECK_EQ(ok, !scanner_.has_parser_error());
888+
DCHECK_EQ(ok, !has_error());
891889
if (ok) {
892890
result->set_requires_instance_fields_initializer(
893891
info->requires_instance_fields_initializer());
@@ -1734,7 +1732,7 @@ void Parser::ParseAndRewriteGeneratorFunctionBody(
17341732
Expression* initial_yield = BuildInitialYield(pos, kind);
17351733
body->Add(factory()->NewExpressionStatement(initial_yield, kNoSourcePosition),
17361734
zone());
1737-
ParseStatementList(body, Token::RBRACE, !scanner()->has_parser_error());
1735+
ParseStatementList(body, Token::RBRACE, !has_error());
17381736
}
17391737

17401738
void Parser::ParseAndRewriteAsyncGeneratorFunctionBody(
@@ -1766,8 +1764,7 @@ void Parser::ParseAndRewriteAsyncGeneratorFunctionBody(
17661764
try_block->statements()->Add(
17671765
factory()->NewExpressionStatement(initial_yield, kNoSourcePosition),
17681766
zone());
1769-
ParseStatementList(try_block->statements(), Token::RBRACE,
1770-
!scanner()->has_parser_error());
1767+
ParseStatementList(try_block->statements(), Token::RBRACE, !has_error());
17711768

17721769
// Don't create iterator result for async generators, as the resume methods
17731770
// will create it.
@@ -2779,7 +2776,7 @@ bool Parser::SkipFunction(
27792776
return false;
27802777
} else if (pending_error_handler()->has_pending_error()) {
27812778
DCHECK(!pending_error_handler()->stack_overflow());
2782-
DCHECK(scanner()->has_parser_error());
2779+
DCHECK(has_error());
27832780
} else {
27842781
DCHECK(!pending_error_handler()->stack_overflow());
27852782
set_allow_eval_cache(reusable_preparser()->allow_eval_cache());
@@ -2925,7 +2922,6 @@ Block* Parser::BuildParameterInitializationBlock(
29252922
param_scope = param_scope->FinalizeBlockScope();
29262923
if (param_scope != nullptr) {
29272924
CheckConflictingVarDeclarations(param_scope);
2928-
RETURN_IF_PARSE_ERROR;
29292925
}
29302926
init_block->statements()->Add(param_block, zone());
29312927
}
@@ -3031,7 +3027,6 @@ ZonePtrList<Statement>* Parser::ParseFunction(
30313027
// For a regular function, the function arguments are parsed from source.
30323028
DCHECK_NULL(arguments_for_wrapped_function);
30333029
ParseFormalParameterList(&formals);
3034-
RETURN_IF_PARSE_ERROR;
30353030
if (expected_parameters_end_pos != kNoSourcePosition) {
30363031
// Check for '(' or ')' shenanigans in the parameter string for dynamic
30373032
// functions.
@@ -3048,14 +3043,12 @@ ZonePtrList<Statement>* Parser::ParseFunction(
30483043
}
30493044
}
30503045
Expect(Token::RPAREN);
3051-
RETURN_IF_PARSE_ERROR;
30523046
int formals_end_position = scanner()->location().end_pos;
30533047

30543048
CheckArityRestrictions(formals.arity, kind, formals.has_rest,
30553049
function_scope->start_position(),
30563050
formals_end_position);
30573051
Expect(Token::LBRACE);
3058-
RETURN_IF_PARSE_ERROR;
30593052
}
30603053
*num_parameters = formals.num_parameters();
30613054
*function_length = formals.function_length;
@@ -3609,6 +3602,7 @@ void Parser::QueueDestructuringAssignmentForRewriting(
36093602
void Parser::SetFunctionNameFromPropertyName(LiteralProperty* property,
36103603
const AstRawString* name,
36113604
const AstRawString* prefix) {
3605+
if (has_error()) return;
36123606
// Ensure that the function we are going to create has shared name iff
36133607
// we are not going to set it later.
36143608
if (property->NeedsSetFunctionName()) {
@@ -3634,7 +3628,7 @@ void Parser::SetFunctionNameFromPropertyName(ObjectLiteralProperty* property,
36343628
// Ignore "__proto__" as a name when it's being used to set the [[Prototype]]
36353629
// of an object literal.
36363630
// See ES #sec-__proto__-property-names-in-object-initializers.
3637-
if (property->IsPrototype()) return;
3631+
if (property->IsPrototype() || has_error()) return;
36383632

36393633
DCHECK(!property->value()->IsAnonymousFunctionDefinition() ||
36403634
property->kind() == ObjectLiteralProperty::COMPUTED);
@@ -3645,7 +3639,7 @@ void Parser::SetFunctionNameFromPropertyName(ObjectLiteralProperty* property,
36453639

36463640
void Parser::SetFunctionNameFromIdentifierRef(Expression* value,
36473641
Expression* identifier) {
3648-
if (!identifier->IsVariableProxy()) return;
3642+
if (has_error() || !identifier->IsVariableProxy()) return;
36493643
SetFunctionName(value, identifier->AsVariableProxy()->raw_name());
36503644
}
36513645

0 commit comments

Comments
 (0)