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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 | 681 |
682 // Decide if a property should be in the object boilerplate. | 682 // Decide if a property should be in the object boilerplate. |
683 bool IsBoilerplateProperty(ObjectLiteral::Property* property); | 683 bool IsBoilerplateProperty(ObjectLiteral::Property* property); |
684 // If the expression is a literal, return the literal value; | 684 // If the expression is a literal, return the literal value; |
685 // if the expression is a materialized literal and is simple return a | 685 // if the expression is a materialized literal and is simple return a |
686 // compile time value as encoded by CompileTimeValue::GetValue(). | 686 // compile time value as encoded by CompileTimeValue::GetValue(). |
687 // Otherwise, return undefined literal as the placeholder | 687 // Otherwise, return undefined literal as the placeholder |
688 // in the object literal boilerplate. | 688 // in the object literal boilerplate. |
689 Handle<Object> GetBoilerplateValue(Expression* expression); | 689 Handle<Object> GetBoilerplateValue(Expression* expression); |
690 | 690 |
| 691 // Initialize the components of a for-in / for-of statement. |
| 692 void InitializeForEachStatement(ForEachStatement* stmt, |
| 693 Expression* each, |
| 694 Expression* subject, |
| 695 Statement* body); |
| 696 |
691 ZoneList<Expression*>* ParseArguments(bool* ok); | 697 ZoneList<Expression*>* ParseArguments(bool* ok); |
692 FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name, | 698 FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name, |
693 bool name_is_reserved, | 699 bool name_is_reserved, |
694 bool is_generator, | 700 bool is_generator, |
695 int function_token_position, | 701 int function_token_position, |
696 FunctionLiteral::FunctionType type, | 702 FunctionLiteral::FunctionType type, |
697 bool* ok); | 703 bool* ok); |
698 | 704 |
699 | 705 |
700 // Magical syntax support. | 706 // Magical syntax support. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 private: | 902 private: |
897 static const int kLiteralTypeSlot = 0; | 903 static const int kLiteralTypeSlot = 0; |
898 static const int kElementsSlot = 1; | 904 static const int kElementsSlot = 1; |
899 | 905 |
900 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 906 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
901 }; | 907 }; |
902 | 908 |
903 } } // namespace v8::internal | 909 } } // namespace v8::internal |
904 | 910 |
905 #endif // V8_PARSER_H_ | 911 #endif // V8_PARSER_H_ |
OLD | NEW |