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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 Expression* ParseObjectLiteral(bool* ok); | 638 Expression* ParseObjectLiteral(bool* ok); |
639 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); | 639 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); |
640 | 640 |
641 // Initialize the components of a for-in / for-of statement. | 641 // Initialize the components of a for-in / for-of statement. |
642 void InitializeForEachStatement(ForEachStatement* stmt, | 642 void InitializeForEachStatement(ForEachStatement* stmt, |
643 Expression* each, | 643 Expression* each, |
644 Expression* subject, | 644 Expression* subject, |
645 Statement* body); | 645 Statement* body); |
646 | 646 |
647 ZoneList<Expression*>* ParseArguments(bool* ok); | 647 ZoneList<Expression*>* ParseArguments(bool* ok); |
648 FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name, | 648 FunctionLiteral* ParseFunctionLiteral( |
649 bool name_is_reserved, | 649 Handle<String> var_name, |
650 bool is_generator, | 650 Scanner::Location function_name_location, |
651 int function_token_position, | 651 bool name_is_reserved, |
652 FunctionLiteral::FunctionType type, | 652 bool is_generator, |
653 bool* ok); | 653 int function_token_position, |
654 | 654 FunctionLiteral::FunctionType type, |
| 655 bool* ok); |
655 | 656 |
656 // Magical syntax support. | 657 // Magical syntax support. |
657 Expression* ParseV8Intrinsic(bool* ok); | 658 Expression* ParseV8Intrinsic(bool* ok); |
658 | 659 |
659 bool is_generator() const { return current_function_state_->is_generator(); } | 660 bool is_generator() const { return current_function_state_->is_generator(); } |
660 | 661 |
661 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); | 662 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode); |
662 | 663 |
663 Handle<String> LiteralString(PretenureFlag tenured) { | 664 Handle<String> LiteralString(PretenureFlag tenured) { |
664 if (scanner().is_literal_ascii()) { | 665 if (scanner().is_literal_ascii()) { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 private: | 814 private: |
814 static const int kLiteralTypeSlot = 0; | 815 static const int kLiteralTypeSlot = 0; |
815 static const int kElementsSlot = 1; | 816 static const int kElementsSlot = 1; |
816 | 817 |
817 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 818 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
818 }; | 819 }; |
819 | 820 |
820 } } // namespace v8::internal | 821 } } // namespace v8::internal |
821 | 822 |
822 #endif // V8_PARSER_H_ | 823 #endif // V8_PARSER_H_ |
OLD | NEW |