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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 ObjectLiteral::Property* ParseObjectLiteralGetSet(bool is_getter, bool* ok); | 685 ObjectLiteral::Property* ParseObjectLiteralGetSet(bool is_getter, bool* ok); |
686 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); | 686 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); |
687 | 687 |
688 // Populate the constant properties fixed array for a materialized object | 688 // Populate the constant properties fixed array for a materialized object |
689 // literal. | 689 // literal. |
690 void BuildObjectLiteralConstantProperties( | 690 void BuildObjectLiteralConstantProperties( |
691 ZoneList<ObjectLiteral::Property*>* properties, | 691 ZoneList<ObjectLiteral::Property*>* properties, |
692 Handle<FixedArray> constants, | 692 Handle<FixedArray> constants, |
693 bool* is_simple, | 693 bool* is_simple, |
694 bool* fast_elements, | 694 bool* fast_elements, |
695 int* depth); | 695 int* depth, |
696 | 696 bool* may_store_doubles); |
697 // Populate the literals fixed array for a materialized array literal. | |
698 void BuildArrayLiteralBoilerplateLiterals(ZoneList<Expression*>* properties, | |
699 Handle<FixedArray> constants, | |
700 bool* is_simple, | |
701 int* depth); | |
702 | 697 |
703 // Decide if a property should be in the object boilerplate. | 698 // Decide if a property should be in the object boilerplate. |
704 bool IsBoilerplateProperty(ObjectLiteral::Property* property); | 699 bool IsBoilerplateProperty(ObjectLiteral::Property* property); |
705 // If the expression is a literal, return the literal value; | 700 // If the expression is a literal, return the literal value; |
706 // if the expression is a materialized literal and is simple return a | 701 // if the expression is a materialized literal and is simple return a |
707 // compile time value as encoded by CompileTimeValue::GetValue(). | 702 // compile time value as encoded by CompileTimeValue::GetValue(). |
708 // Otherwise, return undefined literal as the placeholder | 703 // Otherwise, return undefined literal as the placeholder |
709 // in the object literal boilerplate. | 704 // in the object literal boilerplate. |
710 Handle<Object> GetBoilerplateValue(Expression* expression); | 705 Handle<Object> GetBoilerplateValue(Expression* expression); |
711 | 706 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 private: | 908 private: |
914 static const int kTypeSlot = 0; | 909 static const int kTypeSlot = 0; |
915 static const int kElementsSlot = 1; | 910 static const int kElementsSlot = 1; |
916 | 911 |
917 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 912 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
918 }; | 913 }; |
919 | 914 |
920 } } // namespace v8::internal | 915 } } // namespace v8::internal |
921 | 916 |
922 #endif // V8_PARSER_H_ | 917 #endif // V8_PARSER_H_ |
OLD | NEW |