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

Side by Side Diff: src/parser.h

Issue 3144002: Copy-on-write arrays. (Closed)
Patch Set: Review fixes. Created 10 years, 4 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
« no previous file with comments | « src/objects-inl.h ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 class CompileTimeValue: public AllStatic { 168 class CompileTimeValue: public AllStatic {
169 public: 169 public:
170 enum Type { 170 enum Type {
171 OBJECT_LITERAL_FAST_ELEMENTS, 171 OBJECT_LITERAL_FAST_ELEMENTS,
172 OBJECT_LITERAL_SLOW_ELEMENTS, 172 OBJECT_LITERAL_SLOW_ELEMENTS,
173 ARRAY_LITERAL 173 ARRAY_LITERAL
174 }; 174 };
175 175
176 static bool IsCompileTimeValue(Expression* expression); 176 static bool IsCompileTimeValue(Expression* expression);
177 177
178 static bool ArrayLiteralElementNeedsInitialization(Expression* value);
179
178 // Get the value as a compile time value. 180 // Get the value as a compile time value.
179 static Handle<FixedArray> GetValue(Expression* expression); 181 static Handle<FixedArray> GetValue(Expression* expression);
180 182
181 // Get the type of a compile time value returned by GetValue(). 183 // Get the type of a compile time value returned by GetValue().
182 static Type GetType(Handle<FixedArray> value); 184 static Type GetType(Handle<FixedArray> value);
183 185
184 // Get the elements array of a compile time value returned by GetValue(). 186 // Get the elements array of a compile time value returned by GetValue().
185 static Handle<FixedArray> GetElements(Handle<FixedArray> value); 187 static Handle<FixedArray> GetElements(Handle<FixedArray> value);
186 188
187 private: 189 private:
188 static const int kTypeSlot = 0; 190 static const int kTypeSlot = 0;
189 static const int kElementsSlot = 1; 191 static const int kElementsSlot = 1;
190 192
191 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 193 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
192 }; 194 };
193 195
194 196
195 } } // namespace v8::internal 197 } } // namespace v8::internal
196 198
197 #endif // V8_PARSER_H_ 199 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698