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

Side by Side Diff: src/ast.h

Issue 805004: Do not waste space for the fast-case elements backing storage for ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 months 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 private: 864 private:
865 Literal* key_; 865 Literal* key_;
866 Expression* value_; 866 Expression* value_;
867 Kind kind_; 867 Kind kind_;
868 }; 868 };
869 869
870 ObjectLiteral(Handle<FixedArray> constant_properties, 870 ObjectLiteral(Handle<FixedArray> constant_properties,
871 ZoneList<Property*>* properties, 871 ZoneList<Property*>* properties,
872 int literal_index, 872 int literal_index,
873 bool is_simple, 873 bool is_simple,
874 bool fast_elements,
874 int depth) 875 int depth)
875 : MaterializedLiteral(literal_index, is_simple, depth), 876 : MaterializedLiteral(literal_index, is_simple, depth),
876 constant_properties_(constant_properties), 877 constant_properties_(constant_properties),
877 properties_(properties) {} 878 properties_(properties),
879 fast_elements_(fast_elements) {}
878 880
879 virtual ObjectLiteral* AsObjectLiteral() { return this; } 881 virtual ObjectLiteral* AsObjectLiteral() { return this; }
880 virtual void Accept(AstVisitor* v); 882 virtual void Accept(AstVisitor* v);
881 883
882 virtual bool IsLeaf() { return properties()->is_empty(); } 884 virtual bool IsLeaf() { return properties()->is_empty(); }
883 885
884 Handle<FixedArray> constant_properties() const { 886 Handle<FixedArray> constant_properties() const {
885 return constant_properties_; 887 return constant_properties_;
886 } 888 }
887 ZoneList<Property*>* properties() const { return properties_; } 889 ZoneList<Property*>* properties() const { return properties_; }
888 890
891 bool fast_elements() const { return fast_elements_; }
892
889 private: 893 private:
890 Handle<FixedArray> constant_properties_; 894 Handle<FixedArray> constant_properties_;
891 ZoneList<Property*>* properties_; 895 ZoneList<Property*>* properties_;
896 bool fast_elements_;
892 }; 897 };
893 898
894 899
895 // Node for capturing a regexp literal. 900 // Node for capturing a regexp literal.
896 class RegExpLiteral: public MaterializedLiteral { 901 class RegExpLiteral: public MaterializedLiteral {
897 public: 902 public:
898 RegExpLiteral(Handle<String> pattern, 903 RegExpLiteral(Handle<String> pattern,
899 Handle<String> flags, 904 Handle<String> flags,
900 int literal_index) 905 int literal_index)
901 : MaterializedLiteral(literal_index, false, 1), 906 : MaterializedLiteral(literal_index, false, 1),
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 #undef DEF_VISIT 1910 #undef DEF_VISIT
1906 1911
1907 private: 1912 private:
1908 bool stack_overflow_; 1913 bool stack_overflow_;
1909 }; 1914 };
1910 1915
1911 1916
1912 } } // namespace v8::internal 1917 } } // namespace v8::internal
1913 1918
1914 #endif // V8_AST_H_ 1919 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698