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

Side by Side Diff: src/factory.h

Issue 10170030: Implement tracking and optimizations of packed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 7 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/elements-kind.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 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 Handle<ExternalArray> NewExternalArray( 210 Handle<ExternalArray> NewExternalArray(
211 int length, 211 int length,
212 ExternalArrayType array_type, 212 ExternalArrayType array_type,
213 void* external_pointer, 213 void* external_pointer,
214 PretenureFlag pretenure = NOT_TENURED); 214 PretenureFlag pretenure = NOT_TENURED);
215 215
216 Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell( 216 Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell(
217 Handle<Object> value); 217 Handle<Object> value);
218 218
219 Handle<Map> NewMap(InstanceType type, 219 Handle<Map> NewMap(
220 int instance_size, 220 InstanceType type,
221 ElementsKind elements_kind = FAST_ELEMENTS); 221 int instance_size,
222 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND);
222 223
223 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); 224 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function);
224 225
225 Handle<Map> CopyMapDropDescriptors(Handle<Map> map); 226 Handle<Map> CopyMapDropDescriptors(Handle<Map> map);
226 227
227 // Copy the map adding more inobject properties if possible without 228 // Copy the map adding more inobject properties if possible without
228 // overflowing the instance size. 229 // overflowing the instance size.
229 Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props); 230 Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props);
230 231
231 Handle<Map> CopyMapDropTransitions(Handle<Map> map); 232 Handle<Map> CopyMapDropTransitions(Handle<Map> map);
(...skipping 30 matching lines...) Expand all
262 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); 263 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor);
263 264
264 // JS objects are pretenured when allocated by the bootstrapper and 265 // JS objects are pretenured when allocated by the bootstrapper and
265 // runtime. 266 // runtime.
266 Handle<JSObject> NewJSObjectFromMap(Handle<Map> map); 267 Handle<JSObject> NewJSObjectFromMap(Handle<Map> map);
267 268
268 // JS modules are pretenured. 269 // JS modules are pretenured.
269 Handle<JSModule> NewJSModule(); 270 Handle<JSModule> NewJSModule();
270 271
271 // JS arrays are pretenured when allocated by the parser. 272 // JS arrays are pretenured when allocated by the parser.
272 Handle<JSArray> NewJSArray(int capacity, 273 Handle<JSArray> NewJSArray(
273 ElementsKind elements_kind = FAST_ELEMENTS, 274 int capacity,
274 PretenureFlag pretenure = NOT_TENURED); 275 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
276 PretenureFlag pretenure = NOT_TENURED);
275 277
276 Handle<JSArray> NewJSArrayWithElements( 278 Handle<JSArray> NewJSArrayWithElements(
277 Handle<FixedArrayBase> elements, 279 Handle<FixedArrayBase> elements,
278 ElementsKind elements_kind = FAST_ELEMENTS, 280 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
279 PretenureFlag pretenure = NOT_TENURED); 281 PretenureFlag pretenure = NOT_TENURED);
280 282
281 void SetElementsCapacityAndLength(Handle<JSArray> array, 283 void SetElementsCapacityAndLength(Handle<JSArray> array,
282 int capacity, 284 int capacity,
283 int length); 285 int length);
284 286
285 void SetContent(Handle<JSArray> array, Handle<FixedArrayBase> elements); 287 void SetContent(Handle<JSArray> array, Handle<FixedArrayBase> elements);
286 288
287 void EnsureCanContainHeapObjectElements(Handle<JSArray> array); 289 void EnsureCanContainHeapObjectElements(Handle<JSArray> array);
288 void EnsureCanContainElements(Handle<JSArray> array, 290 void EnsureCanContainElements(Handle<JSArray> array,
289 Handle<FixedArrayBase> elements, 291 Handle<FixedArrayBase> elements,
292 uint32_t length,
290 EnsureElementsMode mode); 293 EnsureElementsMode mode);
291 294
292 Handle<JSProxy> NewJSProxy(Handle<Object> handler, Handle<Object> prototype); 295 Handle<JSProxy> NewJSProxy(Handle<Object> handler, Handle<Object> prototype);
293 296
294 // Change the type of the argument into a JS object/function and reinitialize. 297 // Change the type of the argument into a JS object/function and reinitialize.
295 void BecomeJSObject(Handle<JSReceiver> object); 298 void BecomeJSObject(Handle<JSReceiver> object);
296 void BecomeJSFunction(Handle<JSReceiver> object); 299 void BecomeJSFunction(Handle<JSReceiver> object);
297 300
298 void SetIdentityHash(Handle<JSObject> object, Object* hash); 301 void SetIdentityHash(Handle<JSObject> object, Object* hash);
299 302
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // Update the map cache in the global context with (keys, map) 512 // Update the map cache in the global context with (keys, map)
510 Handle<MapCache> AddToMapCache(Handle<Context> context, 513 Handle<MapCache> AddToMapCache(Handle<Context> context,
511 Handle<FixedArray> keys, 514 Handle<FixedArray> keys,
512 Handle<Map> map); 515 Handle<Map> map);
513 }; 516 };
514 517
515 518
516 } } // namespace v8::internal 519 } } // namespace v8::internal
517 520
518 #endif // V8_FACTORY_H_ 521 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/elements-kind.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698