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

Side by Side Diff: src/factory.h

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 9 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
« no previous file with comments | « src/ast.cc ('k') | src/factory.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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 static Handle<Proxy> NewProxy(Address addr, 159 static Handle<Proxy> NewProxy(Address addr,
160 PretenureFlag pretenure = NOT_TENURED); 160 PretenureFlag pretenure = NOT_TENURED);
161 161
162 // Allocate a new proxy. The proxy is pretenured (allocated directly in 162 // Allocate a new proxy. The proxy is pretenured (allocated directly in
163 // the old generation). 163 // the old generation).
164 static Handle<Proxy> NewProxy(const AccessorDescriptor* proxy); 164 static Handle<Proxy> NewProxy(const AccessorDescriptor* proxy);
165 165
166 static Handle<ByteArray> NewByteArray(int length, 166 static Handle<ByteArray> NewByteArray(int length,
167 PretenureFlag pretenure = NOT_TENURED); 167 PretenureFlag pretenure = NOT_TENURED);
168 168
169 static Handle<PixelArray> NewPixelArray(
170 int length,
171 uint8_t* external_pointer,
172 PretenureFlag pretenure = NOT_TENURED);
173
174 static Handle<ExternalArray> NewExternalArray( 169 static Handle<ExternalArray> NewExternalArray(
175 int length, 170 int length,
176 ExternalArrayType array_type, 171 ExternalArrayType array_type,
177 void* external_pointer, 172 void* external_pointer,
178 PretenureFlag pretenure = NOT_TENURED); 173 PretenureFlag pretenure = NOT_TENURED);
179 174
180 static Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell( 175 static Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell(
181 Handle<Object> value); 176 Handle<Object> value);
182 177
183 static Handle<Map> NewMap(InstanceType type, int instance_size); 178 static Handle<Map> NewMap(InstanceType type, int instance_size);
184 179
185 static Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); 180 static Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function);
186 181
187 static Handle<Map> CopyMapDropDescriptors(Handle<Map> map); 182 static Handle<Map> CopyMapDropDescriptors(Handle<Map> map);
188 183
189 // Copy the map adding more inobject properties if possible without 184 // Copy the map adding more inobject properties if possible without
190 // overflowing the instance size. 185 // overflowing the instance size.
191 static Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props); 186 static Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props);
192 187
193 static Handle<Map> CopyMapDropTransitions(Handle<Map> map); 188 static Handle<Map> CopyMapDropTransitions(Handle<Map> map);
194 189
195 static Handle<Map> GetFastElementsMap(Handle<Map> map); 190 static Handle<Map> GetFastElementsMap(Handle<Map> map);
196 191
197 static Handle<Map> GetSlowElementsMap(Handle<Map> map); 192 static Handle<Map> GetSlowElementsMap(Handle<Map> map);
198 193
199 static Handle<Map> GetPixelArrayElementsMap(Handle<Map> map); 194 static Handle<Map> NewExternalArrayElementsMap(Handle<Map> map);
200 195
201 static Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); 196 static Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array);
202 197
203 // Numbers (eg, literals) are pretenured by the parser. 198 // Numbers (eg, literals) are pretenured by the parser.
204 static Handle<Object> NewNumber(double value, 199 static Handle<Object> NewNumber(double value,
205 PretenureFlag pretenure = NOT_TENURED); 200 PretenureFlag pretenure = NOT_TENURED);
206 201
207 static Handle<Object> NewNumberFromInt(int value); 202 static Handle<Object> NewNumberFromInt(int value);
208 static Handle<Object> NewNumberFromUint(uint32_t value); 203 static Handle<Object> NewNumberFromUint(uint32_t value);
209 204
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // Update the map cache in the global context with (keys, map) 419 // Update the map cache in the global context with (keys, map)
425 static Handle<MapCache> AddToMapCache(Handle<Context> context, 420 static Handle<MapCache> AddToMapCache(Handle<Context> context,
426 Handle<FixedArray> keys, 421 Handle<FixedArray> keys,
427 Handle<Map> map); 422 Handle<Map> map);
428 }; 423 };
429 424
430 425
431 } } // namespace v8::internal 426 } } // namespace v8::internal
432 427
433 #endif // V8_FACTORY_H_ 428 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698