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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 *ok = false; | 261 *ok = false; |
262 return EmptyExpression(); | 262 return EmptyExpression(); |
263 } | 263 } |
264 if (IsEvalOrArguments(name)) { | 264 if (IsEvalOrArguments(name)) { |
265 ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments); | 265 ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments); |
266 *ok = false; | 266 *ok = false; |
267 return EmptyExpression(); | 267 return EmptyExpression(); |
268 } | 268 } |
269 | 269 |
270 LanguageMode class_language_mode = language_mode(); | 270 LanguageMode class_language_mode = language_mode(); |
271 BlockState block_state(&scope_state_); | 271 BlockState block_state(zone(), &scope_state_); |
272 scope()->SetLanguageMode( | 272 scope()->SetLanguageMode( |
273 static_cast<LanguageMode>(class_language_mode | STRICT)); | 273 static_cast<LanguageMode>(class_language_mode | STRICT)); |
274 // TODO(marja): Make PreParser use scope names too. | 274 // TODO(marja): Make PreParser use scope names too. |
275 // this->scope()->SetScopeName(name); | 275 // this->scope()->SetScopeName(name); |
276 | 276 |
277 bool has_extends = Check(Token::EXTENDS); | 277 bool has_extends = Check(Token::EXTENDS); |
278 if (has_extends) { | 278 if (has_extends) { |
279 ExpressionClassifier extends_classifier(this); | 279 ExpressionClassifier extends_classifier(this); |
280 ParseLeftHandSideExpression(CHECK_OK); | 280 ParseLeftHandSideExpression(CHECK_OK); |
281 ValidateExpression(CHECK_OK); | 281 ValidateExpression(CHECK_OK); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 } | 316 } |
317 return PreParserExpression::FromIdentifier(name); | 317 return PreParserExpression::FromIdentifier(name); |
318 } | 318 } |
319 | 319 |
320 #undef CHECK_OK | 320 #undef CHECK_OK |
321 #undef CHECK_OK_CUSTOM | 321 #undef CHECK_OK_CUSTOM |
322 | 322 |
323 | 323 |
324 } // namespace internal | 324 } // namespace internal |
325 } // namespace v8 | 325 } // namespace v8 |
OLD | NEW |