OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cmath> | 5 #include <cmath> |
6 | 6 |
7 #include "src/allocation.h" | 7 #include "src/allocation.h" |
8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
9 #include "src/conversions-inl.h" | 9 #include "src/conversions-inl.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
592 switch (peek()) { | 592 switch (peek()) { |
593 case Token::FUNCTION: | 593 case Token::FUNCTION: |
594 case Token::LBRACE: | 594 case Token::LBRACE: |
595 UNREACHABLE(); // Always handled by the callers. | 595 UNREACHABLE(); // Always handled by the callers. |
596 case Token::CLASS: | 596 case Token::CLASS: |
597 ReportUnexpectedToken(Next()); | 597 ReportUnexpectedToken(Next()); |
598 *ok = false; | 598 *ok = false; |
599 return Statement::Default(); | 599 return Statement::Default(); |
600 | 600 |
601 case Token::THIS: | 601 case Token::THIS: |
602 if (!FLAG_strong_this) break; | |
Dmitry Lomov (no reviews)
2015/06/15 11:52:52
Please add:
// Fall through.
| |
602 case Token::SUPER: | 603 case Token::SUPER: |
603 if (is_strong(language_mode()) && | 604 if (is_strong(language_mode()) && |
604 i::IsConstructor(function_state_->kind())) { | 605 i::IsConstructor(function_state_->kind())) { |
605 bool is_this = peek() == Token::THIS; | 606 bool is_this = peek() == Token::THIS; |
606 Expression expr = Expression::Default(); | 607 Expression expr = Expression::Default(); |
607 ExpressionClassifier classifier; | 608 ExpressionClassifier classifier; |
608 if (is_this) { | 609 if (is_this) { |
609 expr = ParseStrongInitializationExpression(&classifier, CHECK_OK); | 610 expr = ParseStrongInitializationExpression(&classifier, CHECK_OK); |
610 } else { | 611 } else { |
611 expr = ParseStrongSuperCallExpression(&classifier, CHECK_OK); | 612 expr = ParseStrongSuperCallExpression(&classifier, CHECK_OK); |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1184 | 1185 |
1185 DCHECK(!spread_pos.IsValid()); | 1186 DCHECK(!spread_pos.IsValid()); |
1186 | 1187 |
1187 return Expression::Default(); | 1188 return Expression::Default(); |
1188 } | 1189 } |
1189 | 1190 |
1190 #undef CHECK_OK | 1191 #undef CHECK_OK |
1191 | 1192 |
1192 | 1193 |
1193 } } // v8::internal | 1194 } } // v8::internal |
OLD | NEW |