OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
7 | 7 |
8 #include "isolate.h" | 8 #include "isolate.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 int length, | 246 int length, |
247 ExternalArrayType array_type, | 247 ExternalArrayType array_type, |
248 PretenureFlag pretenure = NOT_TENURED); | 248 PretenureFlag pretenure = NOT_TENURED); |
249 | 249 |
250 Handle<Cell> NewCell(Handle<Object> value); | 250 Handle<Cell> NewCell(Handle<Object> value); |
251 | 251 |
252 Handle<PropertyCell> NewPropertyCellWithHole(); | 252 Handle<PropertyCell> NewPropertyCellWithHole(); |
253 | 253 |
254 Handle<PropertyCell> NewPropertyCell(Handle<Object> value); | 254 Handle<PropertyCell> NewPropertyCell(Handle<Object> value); |
255 | 255 |
| 256 // Allocate a tenured AllocationSite. It's payload is null. |
256 Handle<AllocationSite> NewAllocationSite(); | 257 Handle<AllocationSite> NewAllocationSite(); |
257 | 258 |
258 Handle<Map> NewMap( | 259 Handle<Map> NewMap( |
259 InstanceType type, | 260 InstanceType type, |
260 int instance_size, | 261 int instance_size, |
261 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); | 262 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); |
262 | 263 |
263 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); | 264 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); |
264 | 265 |
265 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); | 266 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); | 317 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); |
317 | 318 |
318 // JS objects are pretenured when allocated by the bootstrapper and | 319 // JS objects are pretenured when allocated by the bootstrapper and |
319 // runtime. | 320 // runtime. |
320 Handle<JSObject> NewJSObjectFromMap( | 321 Handle<JSObject> NewJSObjectFromMap( |
321 Handle<Map> map, | 322 Handle<Map> map, |
322 PretenureFlag pretenure = NOT_TENURED, | 323 PretenureFlag pretenure = NOT_TENURED, |
323 bool allocate_properties = true, | 324 bool allocate_properties = true, |
324 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); | 325 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
325 | 326 |
326 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( | |
327 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); | |
328 | |
329 // JS modules are pretenured. | 327 // JS modules are pretenured. |
330 Handle<JSModule> NewJSModule(Handle<Context> context, | 328 Handle<JSModule> NewJSModule(Handle<Context> context, |
331 Handle<ScopeInfo> scope_info); | 329 Handle<ScopeInfo> scope_info); |
332 | 330 |
333 // JS arrays are pretenured when allocated by the parser. | 331 // JS arrays are pretenured when allocated by the parser. |
334 | 332 |
335 // Create a JSArray with no elements. | 333 // Create a JSArray with no elements. |
336 Handle<JSArray> NewJSArray( | 334 Handle<JSArray> NewJSArray( |
337 ElementsKind elements_kind, | 335 ElementsKind elements_kind, |
338 PretenureFlag pretenure = NOT_TENURED); | 336 PretenureFlag pretenure = NOT_TENURED); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 | 633 |
636 // Update the map cache in the native context with (keys, map) | 634 // Update the map cache in the native context with (keys, map) |
637 Handle<MapCache> AddToMapCache(Handle<Context> context, | 635 Handle<MapCache> AddToMapCache(Handle<Context> context, |
638 Handle<FixedArray> keys, | 636 Handle<FixedArray> keys, |
639 Handle<Map> map); | 637 Handle<Map> map); |
640 }; | 638 }; |
641 | 639 |
642 } } // namespace v8::internal | 640 } } // namespace v8::internal |
643 | 641 |
644 #endif // V8_FACTORY_H_ | 642 #endif // V8_FACTORY_H_ |
OLD | NEW |