Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: src/parser.h

Issue 61873003: Defer allocation of constant literal properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 Expression* ParseNewExpression(bool* ok); 646 Expression* ParseNewExpression(bool* ok);
647 Expression* ParseMemberExpression(bool* ok); 647 Expression* ParseMemberExpression(bool* ok);
648 Expression* ParseNewPrefix(PositionStack* stack, bool* ok); 648 Expression* ParseNewPrefix(PositionStack* stack, bool* ok);
649 Expression* ParseMemberWithNewPrefixesExpression(PositionStack* stack, 649 Expression* ParseMemberWithNewPrefixesExpression(PositionStack* stack,
650 bool* ok); 650 bool* ok);
651 Expression* ParsePrimaryExpression(bool* ok); 651 Expression* ParsePrimaryExpression(bool* ok);
652 Expression* ParseArrayLiteral(bool* ok); 652 Expression* ParseArrayLiteral(bool* ok);
653 Expression* ParseObjectLiteral(bool* ok); 653 Expression* ParseObjectLiteral(bool* ok);
654 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok); 654 Expression* ParseRegExpLiteral(bool seen_equal, bool* ok);
655 655
656 // Populate the constant properties fixed array for a materialized object
657 // literal.
658 void BuildObjectLiteralConstantProperties(
659 ZoneList<ObjectLiteral::Property*>* properties,
660 Handle<FixedArray> constants,
661 bool* is_simple,
662 bool* fast_elements,
663 int* depth,
664 bool* may_store_doubles);
665
666 // Decide if a property should be in the object boilerplate.
667 bool IsBoilerplateProperty(ObjectLiteral::Property* property);
668 // If the expression is a literal, return the literal value;
669 // if the expression is a materialized literal and is simple return a
670 // compile time value as encoded by CompileTimeValue::GetValue().
671 // Otherwise, return undefined literal as the placeholder
672 // in the object literal boilerplate.
673 Handle<Object> GetBoilerplateValue(Expression* expression);
674
675 // Initialize the components of a for-in / for-of statement. 656 // Initialize the components of a for-in / for-of statement.
676 void InitializeForEachStatement(ForEachStatement* stmt, 657 void InitializeForEachStatement(ForEachStatement* stmt,
677 Expression* each, 658 Expression* each,
678 Expression* subject, 659 Expression* subject,
679 Statement* body); 660 Statement* body);
680 661
681 ZoneList<Expression*>* ParseArguments(bool* ok); 662 ZoneList<Expression*>* ParseArguments(bool* ok);
682 FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name, 663 FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name,
683 bool name_is_reserved, 664 bool name_is_reserved,
684 bool is_generator, 665 bool is_generator,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 private: 828 private:
848 static const int kLiteralTypeSlot = 0; 829 static const int kLiteralTypeSlot = 0;
849 static const int kElementsSlot = 1; 830 static const int kElementsSlot = 1;
850 831
851 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 832 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
852 }; 833 };
853 834
854 } } // namespace v8::internal 835 } } // namespace v8::internal
855 836
856 #endif // V8_PARSER_H_ 837 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698