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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 ParseStatementList(Token::RBRACE, ok, bookmark); | 1099 ParseStatementList(Token::RBRACE, ok, bookmark); |
1100 if (!*ok) return; | 1100 if (!*ok) return; |
1101 if (bookmark && bookmark->HasBeenReset()) return; | 1101 if (bookmark && bookmark->HasBeenReset()) return; |
1102 | 1102 |
1103 // Position right after terminal '}'. | 1103 // Position right after terminal '}'. |
1104 DCHECK_EQ(Token::RBRACE, scanner()->peek()); | 1104 DCHECK_EQ(Token::RBRACE, scanner()->peek()); |
1105 int body_end = scanner()->peek_location().end_pos; | 1105 int body_end = scanner()->peek_location().end_pos; |
1106 log_->LogFunction(body_start, body_end, | 1106 log_->LogFunction(body_start, body_end, |
1107 function_state_->materialized_literal_count(), | 1107 function_state_->materialized_literal_count(), |
1108 function_state_->expected_property_count(), language_mode(), | 1108 function_state_->expected_property_count(), language_mode(), |
1109 scope_->uses_super_property()); | 1109 scope_->uses_super_property(), scope_->calls_eval()); |
1110 } | 1110 } |
1111 | 1111 |
1112 | 1112 |
1113 PreParserExpression PreParser::ParseClassLiteral( | 1113 PreParserExpression PreParser::ParseClassLiteral( |
1114 PreParserIdentifier name, Scanner::Location class_name_location, | 1114 PreParserIdentifier name, Scanner::Location class_name_location, |
1115 bool name_is_strict_reserved, int pos, bool* ok) { | 1115 bool name_is_strict_reserved, int pos, bool* ok) { |
1116 // All parts of a ClassDeclaration and ClassExpression are strict code. | 1116 // All parts of a ClassDeclaration and ClassExpression are strict code. |
1117 if (name_is_strict_reserved) { | 1117 if (name_is_strict_reserved) { |
1118 ReportMessageAt(class_name_location, | 1118 ReportMessageAt(class_name_location, |
1119 MessageTemplate::kUnexpectedStrictReserved); | 1119 MessageTemplate::kUnexpectedStrictReserved); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 | 1186 |
1187 DCHECK(!spread_pos.IsValid()); | 1187 DCHECK(!spread_pos.IsValid()); |
1188 | 1188 |
1189 return Expression::Default(); | 1189 return Expression::Default(); |
1190 } | 1190 } |
1191 | 1191 |
1192 #undef CHECK_OK | 1192 #undef CHECK_OK |
1193 | 1193 |
1194 | 1194 |
1195 } } // v8::internal | 1195 } } // v8::internal |
OLD | NEW |