OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 // "null" return type creators. | 481 // "null" return type creators. |
482 static Handle<String> EmptyIdentifier() { | 482 static Handle<String> EmptyIdentifier() { |
483 return Handle<String>(); | 483 return Handle<String>(); |
484 } | 484 } |
485 static Expression* EmptyExpression() { | 485 static Expression* EmptyExpression() { |
486 return NULL; | 486 return NULL; |
487 } | 487 } |
488 static Literal* EmptyLiteral() { | 488 static Literal* EmptyLiteral() { |
489 return NULL; | 489 return NULL; |
490 } | 490 } |
| 491 static ZoneList<Expression*>* NullExpressionList() { |
| 492 return NULL; |
| 493 } |
491 | 494 |
492 // Odd-ball literal creators. | 495 // Odd-ball literal creators. |
493 Literal* GetLiteralTheHole(int position, | 496 Literal* GetLiteralTheHole(int position, |
494 AstNodeFactory<AstConstructionVisitor>* factory); | 497 AstNodeFactory<AstConstructionVisitor>* factory); |
495 | 498 |
496 // Producing data during the recursive descent. | 499 // Producing data during the recursive descent. |
497 Handle<String> GetSymbol(Scanner* scanner = NULL); | 500 Handle<String> GetSymbol(Scanner* scanner = NULL); |
498 Handle<String> NextLiteralString(Scanner* scanner, | 501 Handle<String> NextLiteralString(Scanner* scanner, |
499 PretenureFlag tenured); | 502 PretenureFlag tenured); |
500 Expression* ThisExpression(Scope* scope, | 503 Expression* ThisExpression(Scope* scope, |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 Expression* ParseMemberExpressionContinuation(Expression* expression, | 683 Expression* ParseMemberExpressionContinuation(Expression* expression, |
681 bool* ok); | 684 bool* ok); |
682 Expression* ParseObjectLiteral(bool* ok); | 685 Expression* ParseObjectLiteral(bool* ok); |
683 | 686 |
684 // Initialize the components of a for-in / for-of statement. | 687 // Initialize the components of a for-in / for-of statement. |
685 void InitializeForEachStatement(ForEachStatement* stmt, | 688 void InitializeForEachStatement(ForEachStatement* stmt, |
686 Expression* each, | 689 Expression* each, |
687 Expression* subject, | 690 Expression* subject, |
688 Statement* body); | 691 Statement* body); |
689 | 692 |
690 ZoneList<Expression*>* ParseArguments(bool* ok); | |
691 FunctionLiteral* ParseFunctionLiteral( | 693 FunctionLiteral* ParseFunctionLiteral( |
692 Handle<String> name, | 694 Handle<String> name, |
693 Scanner::Location function_name_location, | 695 Scanner::Location function_name_location, |
694 bool name_is_strict_reserved, | 696 bool name_is_strict_reserved, |
695 bool is_generator, | 697 bool is_generator, |
696 int function_token_position, | 698 int function_token_position, |
697 FunctionLiteral::FunctionType type, | 699 FunctionLiteral::FunctionType type, |
698 bool* ok); | 700 bool* ok); |
699 | 701 |
700 // Magical syntax support. | 702 // Magical syntax support. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 private: | 819 private: |
818 static const int kLiteralTypeSlot = 0; | 820 static const int kLiteralTypeSlot = 0; |
819 static const int kElementsSlot = 1; | 821 static const int kElementsSlot = 1; |
820 | 822 |
821 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 823 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
822 }; | 824 }; |
823 | 825 |
824 } } // namespace v8::internal | 826 } } // namespace v8::internal |
825 | 827 |
826 #endif // V8_PARSER_H_ | 828 #endif // V8_PARSER_H_ |
OLD | NEW |