| Index: src/preparser.cc
|
| diff --git a/src/preparser.cc b/src/preparser.cc
|
| index fd180427db4f8b6d461556622a7426cf32cf5c7b..1336857593f621de7f3349c0be30ed86a12cdb7c 100644
|
| --- a/src/preparser.cc
|
| +++ b/src/preparser.cc
|
| @@ -117,7 +117,7 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
|
| FunctionState function_state(&function_state_, &scope_, &function_scope, NULL,
|
| this->ast_value_factory());
|
| function_state.set_is_generator(is_generator);
|
| - ASSERT_EQ(Token::LBRACE, scanner()->current_token());
|
| + DCHECK_EQ(Token::LBRACE, scanner()->current_token());
|
| bool ok = true;
|
| int start_position = peek_position();
|
| ParseLazyFunctionLiteralBody(&ok);
|
| @@ -125,7 +125,7 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
|
| if (!ok) {
|
| ReportUnexpectedToken(scanner()->current_token());
|
| } else {
|
| - ASSERT_EQ(Token::RBRACE, scanner()->peek());
|
| + DCHECK_EQ(Token::RBRACE, scanner()->peek());
|
| if (scope_->strict_mode() == STRICT) {
|
| int end_pos = scanner()->location().end_pos;
|
| CheckOctalLiteral(start_position, end_pos, &ok);
|
| @@ -174,7 +174,7 @@ PreParser::Statement PreParser::ParseSourceElement(bool* ok) {
|
| case Token::CONST:
|
| return ParseVariableStatement(kSourceElement, ok);
|
| case Token::LET:
|
| - ASSERT(allow_harmony_scoping());
|
| + DCHECK(allow_harmony_scoping());
|
| if (strict_mode() == STRICT) {
|
| return ParseVariableStatement(kSourceElement, ok);
|
| }
|
| @@ -306,7 +306,7 @@ PreParser::Statement PreParser::ParseStatement(bool* ok) {
|
| return ParseVariableStatement(kStatement, ok);
|
|
|
| case Token::LET:
|
| - ASSERT(allow_harmony_scoping());
|
| + DCHECK(allow_harmony_scoping());
|
| if (strict_mode() == STRICT) {
|
| return ParseVariableStatement(kStatement, ok);
|
| }
|
| @@ -476,8 +476,8 @@ PreParser::Statement PreParser::ParseExpressionOrLabelledStatement(bool* ok) {
|
| if (starts_with_identifier && expr.IsIdentifier() && peek() == Token::COLON) {
|
| // Expression is a single identifier, and not, e.g., a parenthesized
|
| // identifier.
|
| - ASSERT(!expr.AsIdentifier().IsFutureReserved());
|
| - ASSERT(strict_mode() == SLOPPY ||
|
| + DCHECK(!expr.AsIdentifier().IsFutureReserved());
|
| + DCHECK(strict_mode() == SLOPPY ||
|
| (!expr.AsIdentifier().IsFutureStrictReserved() &&
|
| !expr.AsIdentifier().IsYield()));
|
| Consume(Token::COLON);
|
| @@ -907,7 +907,7 @@ void PreParser::ParseLazyFunctionLiteralBody(bool* ok) {
|
| if (!*ok) return;
|
|
|
| // Position right after terminal '}'.
|
| - ASSERT_EQ(Token::RBRACE, scanner()->peek());
|
| + DCHECK_EQ(Token::RBRACE, scanner()->peek());
|
| int body_end = scanner()->peek_location().end_pos;
|
| log_->LogFunction(body_start, body_end,
|
| function_state_->materialized_literal_count(),
|
|
|