| 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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 | 946 |
| 947 | 947 |
| 948 void PreParser::ParseLazyFunctionLiteralBody(bool* ok) { | 948 void PreParser::ParseLazyFunctionLiteralBody(bool* ok) { |
| 949 int body_start = position(); | 949 int body_start = position(); |
| 950 ParseStatementList(Token::RBRACE, ok); | 950 ParseStatementList(Token::RBRACE, ok); |
| 951 if (!*ok) return; | 951 if (!*ok) return; |
| 952 | 952 |
| 953 // Position right after terminal '}'. | 953 // Position right after terminal '}'. |
| 954 DCHECK_EQ(Token::RBRACE, scanner()->peek()); | 954 DCHECK_EQ(Token::RBRACE, scanner()->peek()); |
| 955 int body_end = scanner()->peek_location().end_pos; | 955 int body_end = scanner()->peek_location().end_pos; |
| 956 log_->LogFunction( | 956 log_->LogFunction(body_start, body_end, |
| 957 body_start, body_end, function_state_->materialized_literal_count(), | 957 function_state_->materialized_literal_count(), |
| 958 function_state_->expected_property_count(), language_mode()); | 958 function_state_->expected_property_count(), language_mode(), |
| 959 scope_->uses_super_property()); |
| 959 } | 960 } |
| 960 | 961 |
| 961 | 962 |
| 962 PreParserExpression PreParser::ParseClassLiteral( | 963 PreParserExpression PreParser::ParseClassLiteral( |
| 963 PreParserIdentifier name, Scanner::Location class_name_location, | 964 PreParserIdentifier name, Scanner::Location class_name_location, |
| 964 bool name_is_strict_reserved, int pos, bool* ok) { | 965 bool name_is_strict_reserved, int pos, bool* ok) { |
| 965 // All parts of a ClassDeclaration and ClassExpression are strict code. | 966 // All parts of a ClassDeclaration and ClassExpression are strict code. |
| 966 if (name_is_strict_reserved) { | 967 if (name_is_strict_reserved) { |
| 967 ReportMessageAt(class_name_location, "unexpected_strict_reserved"); | 968 ReportMessageAt(class_name_location, "unexpected_strict_reserved"); |
| 968 *ok = false; | 969 *ok = false; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); | 1019 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); |
| 1019 ParseArguments(ok); | 1020 ParseArguments(ok); |
| 1020 | 1021 |
| 1021 return Expression::Default(); | 1022 return Expression::Default(); |
| 1022 } | 1023 } |
| 1023 | 1024 |
| 1024 #undef CHECK_OK | 1025 #undef CHECK_OK |
| 1025 | 1026 |
| 1026 | 1027 |
| 1027 } } // v8::internal | 1028 } } // v8::internal |
| OLD | NEW |