OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_PARSING_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
7 | 7 |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 } | 447 } |
448 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, | 448 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, |
449 PreParserExpression value, | 449 PreParserExpression value, |
450 bool is_static, | 450 bool is_static, |
451 bool is_computed_name) { | 451 bool is_computed_name) { |
452 return PreParserExpression::Default(); | 452 return PreParserExpression::Default(); |
453 } | 453 } |
454 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, | 454 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, |
455 int literal_index, | 455 int literal_index, |
456 int boilerplate_properties, | 456 int boilerplate_properties, |
457 bool has_function, | |
458 int pos) { | 457 int pos) { |
459 return PreParserExpression::ObjectLiteral(); | 458 return PreParserExpression::ObjectLiteral(); |
460 } | 459 } |
461 PreParserExpression NewVariableProxy(void* variable) { | 460 PreParserExpression NewVariableProxy(void* variable) { |
462 return PreParserExpression::Default(); | 461 return PreParserExpression::Default(); |
463 } | 462 } |
464 PreParserExpression NewProperty(PreParserExpression obj, | 463 PreParserExpression NewProperty(PreParserExpression obj, |
465 PreParserExpression key, | 464 PreParserExpression key, |
466 int pos) { | 465 int pos) { |
467 if (obj.IsThis()) { | 466 if (obj.IsThis()) { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 UNREACHABLE(); | 674 UNREACHABLE(); |
676 } | 675 } |
677 | 676 |
678 static void InferFunctionName(FuncNameInferrer* fni, | 677 static void InferFunctionName(FuncNameInferrer* fni, |
679 PreParserExpression expression) { | 678 PreParserExpression expression) { |
680 // PreParser should not use FuncNameInferrer. | 679 // PreParser should not use FuncNameInferrer. |
681 UNREACHABLE(); | 680 UNREACHABLE(); |
682 } | 681 } |
683 | 682 |
684 static void CheckFunctionLiteralInsideTopLevelObjectLiteral( | 683 static void CheckFunctionLiteralInsideTopLevelObjectLiteral( |
685 Scope* scope, PreParserExpression property, bool* has_function) {} | 684 Scope* scope, PreParserExpression property) {} |
686 | 685 |
687 static void CheckAssigningFunctionLiteralToProperty( | 686 static void CheckAssigningFunctionLiteralToProperty( |
688 PreParserExpression left, PreParserExpression right) {} | 687 PreParserExpression left, PreParserExpression right) {} |
689 | 688 |
690 static PreParserExpression MarkExpressionAsAssigned( | 689 static PreParserExpression MarkExpressionAsAssigned( |
691 PreParserExpression expression) { | 690 PreParserExpression expression) { |
692 // TODO(marja): To be able to produce the same errors, the preparser needs | 691 // TODO(marja): To be able to produce the same errors, the preparser needs |
693 // to start tracking which expressions are variables and which are assigned. | 692 // to start tracking which expressions are variables and which are assigned. |
694 return expression; | 693 return expression; |
695 } | 694 } |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 const PreParserFormalParameters& parameters, FunctionKind kind, | 1170 const PreParserFormalParameters& parameters, FunctionKind kind, |
1172 FunctionLiteral::FunctionType function_type, bool* ok) { | 1171 FunctionLiteral::FunctionType function_type, bool* ok) { |
1173 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1172 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
1174 kind, function_type, ok); | 1173 kind, function_type, ok); |
1175 } | 1174 } |
1176 | 1175 |
1177 } // namespace internal | 1176 } // namespace internal |
1178 } // namespace v8 | 1177 } // namespace v8 |
1179 | 1178 |
1180 #endif // V8_PARSING_PREPARSER_H | 1179 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |