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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // "null" return type creators. | 482 // "null" return type creators. |
483 static Handle<String> EmptyIdentifier() { | 483 static Handle<String> EmptyIdentifier() { |
484 return Handle<String>(); | 484 return Handle<String>(); |
485 } | 485 } |
486 static Expression* EmptyExpression() { | 486 static Expression* EmptyExpression() { |
487 return NULL; | 487 return NULL; |
488 } | 488 } |
489 static Literal* EmptyLiteral() { | 489 static Literal* EmptyLiteral() { |
490 return NULL; | 490 return NULL; |
491 } | 491 } |
| 492 static ZoneList<Expression*>* NullExpressionList() { |
| 493 return NULL; |
| 494 } |
492 | 495 |
493 // Odd-ball literal creators. | 496 // Odd-ball literal creators. |
494 Literal* GetLiteralTheHole(int position, | 497 Literal* GetLiteralTheHole(int position, |
495 AstNodeFactory<AstConstructionVisitor>* factory); | 498 AstNodeFactory<AstConstructionVisitor>* factory); |
496 | 499 |
497 // Producing data during the recursive descent. | 500 // Producing data during the recursive descent. |
498 Handle<String> GetSymbol(Scanner* scanner = NULL); | 501 Handle<String> GetSymbol(Scanner* scanner = NULL); |
499 Handle<String> NextLiteralString(Scanner* scanner, | 502 Handle<String> NextLiteralString(Scanner* scanner, |
500 PretenureFlag tenured); | 503 PretenureFlag tenured); |
501 Expression* ThisExpression(Scope* scope, | 504 Expression* ThisExpression(Scope* scope, |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 Expression* ParseMemberExpressionContinuation(Expression* expression, | 688 Expression* ParseMemberExpressionContinuation(Expression* expression, |
686 bool* ok); | 689 bool* ok); |
687 Expression* ParseObjectLiteral(bool* ok); | 690 Expression* ParseObjectLiteral(bool* ok); |
688 | 691 |
689 // Initialize the components of a for-in / for-of statement. | 692 // Initialize the components of a for-in / for-of statement. |
690 void InitializeForEachStatement(ForEachStatement* stmt, | 693 void InitializeForEachStatement(ForEachStatement* stmt, |
691 Expression* each, | 694 Expression* each, |
692 Expression* subject, | 695 Expression* subject, |
693 Statement* body); | 696 Statement* body); |
694 | 697 |
695 ZoneList<Expression*>* ParseArguments(bool* ok); | |
696 FunctionLiteral* ParseFunctionLiteral( | 698 FunctionLiteral* ParseFunctionLiteral( |
697 Handle<String> name, | 699 Handle<String> name, |
698 Scanner::Location function_name_location, | 700 Scanner::Location function_name_location, |
699 bool name_is_strict_reserved, | 701 bool name_is_strict_reserved, |
700 bool is_generator, | 702 bool is_generator, |
701 int function_token_position, | 703 int function_token_position, |
702 FunctionLiteral::FunctionType type, | 704 FunctionLiteral::FunctionType type, |
703 bool* ok); | 705 bool* ok); |
704 | 706 |
705 // Magical syntax support. | 707 // Magical syntax support. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 private: | 824 private: |
823 static const int kLiteralTypeSlot = 0; | 825 static const int kLiteralTypeSlot = 0; |
824 static const int kElementsSlot = 1; | 826 static const int kElementsSlot = 1; |
825 | 827 |
826 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 828 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
827 }; | 829 }; |
828 | 830 |
829 } } // namespace v8::internal | 831 } } // namespace v8::internal |
830 | 832 |
831 #endif // V8_PARSER_H_ | 833 #endif // V8_PARSER_H_ |
OLD | NEW |