| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 300     *ok = false; | 300     *ok = false; | 
| 301     return EmptyExpression(); | 301     return EmptyExpression(); | 
| 302   } | 302   } | 
| 303   if (IsEvalOrArguments(name)) { | 303   if (IsEvalOrArguments(name)) { | 
| 304     ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments); | 304     ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments); | 
| 305     *ok = false; | 305     *ok = false; | 
| 306     return EmptyExpression(); | 306     return EmptyExpression(); | 
| 307   } | 307   } | 
| 308 | 308 | 
| 309   LanguageMode class_language_mode = language_mode(); | 309   LanguageMode class_language_mode = language_mode(); | 
| 310   BlockState block_state(zone(), &scope_state_); | 310   BlockState block_state(&scope_state_); | 
| 311   scope()->SetLanguageMode( | 311   scope()->SetLanguageMode( | 
| 312       static_cast<LanguageMode>(class_language_mode | STRICT)); | 312       static_cast<LanguageMode>(class_language_mode | STRICT)); | 
| 313   // TODO(marja): Make PreParser use scope names too. | 313   // TODO(marja): Make PreParser use scope names too. | 
| 314   // this->scope()->SetScopeName(name); | 314   // this->scope()->SetScopeName(name); | 
| 315 | 315 | 
| 316   bool has_extends = Check(Token::EXTENDS); | 316   bool has_extends = Check(Token::EXTENDS); | 
| 317   if (has_extends) { | 317   if (has_extends) { | 
| 318     ExpressionClassifier extends_classifier(this); | 318     ExpressionClassifier extends_classifier(this); | 
| 319     ParseLeftHandSideExpression(CHECK_OK); | 319     ParseLeftHandSideExpression(CHECK_OK); | 
| 320     CheckNoTailCallExpressions(CHECK_OK); | 320     CheckNoTailCallExpressions(CHECK_OK); | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 367   } | 367   } | 
| 368   return PreParserExpression::FromIdentifier(name); | 368   return PreParserExpression::FromIdentifier(name); | 
| 369 } | 369 } | 
| 370 | 370 | 
| 371 #undef CHECK_OK | 371 #undef CHECK_OK | 
| 372 #undef CHECK_OK_CUSTOM | 372 #undef CHECK_OK_CUSTOM | 
| 373 | 373 | 
| 374 | 374 | 
| 375 }  // namespace internal | 375 }  // namespace internal | 
| 376 }  // namespace v8 | 376 }  // namespace v8 | 
| OLD | NEW | 
|---|