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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 int at_least_space_for, | 52 int at_least_space_for, |
53 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); | 53 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); |
54 | 54 |
55 Handle<OrderedHashSet> NewOrderedHashSet(); | 55 Handle<OrderedHashSet> NewOrderedHashSet(); |
56 Handle<OrderedHashMap> NewOrderedHashMap(); | 56 Handle<OrderedHashMap> NewOrderedHashMap(); |
57 | 57 |
58 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); | 58 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); |
59 | 59 |
60 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, | 60 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, |
61 int slack = 0); | 61 int slack = 0); |
| 62 |
| 63 // Create a DeoptimizationInputData. |
62 Handle<DeoptimizationInputData> NewDeoptimizationInputData( | 64 Handle<DeoptimizationInputData> NewDeoptimizationInputData( |
63 int deopt_entry_count, | 65 int deopt_entry_count, |
64 PretenureFlag pretenure); | 66 PretenureFlag pretenure); |
| 67 |
| 68 // Create a DeoptimizationOutputData. |
65 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( | 69 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( |
66 int deopt_entry_count, | 70 int deopt_entry_count, |
67 PretenureFlag pretenure); | 71 PretenureFlag pretenure); |
68 | 72 |
69 // Create a new boxed value. | 73 // Create a new boxed value. |
70 Handle<Box> NewBox(Handle<Object> value); | 74 Handle<Box> NewBox(Handle<Object> value); |
71 | 75 |
72 // Create a pre-tenured empty AccessorPair. | 76 // Create a pre-tenured empty AccessorPair. |
73 Handle<AccessorPair> NewAccessorPair(); | 77 Handle<AccessorPair> NewAccessorPair(); |
74 | 78 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 208 |
205 // Create a block context. | 209 // Create a block context. |
206 Handle<Context> NewBlockContext(Handle<JSFunction> function, | 210 Handle<Context> NewBlockContext(Handle<JSFunction> function, |
207 Handle<Context> previous, | 211 Handle<Context> previous, |
208 Handle<ScopeInfo> scope_info); | 212 Handle<ScopeInfo> scope_info); |
209 | 213 |
210 // Allocate a new struct. The struct is pretenured (allocated directly in | 214 // Allocate a new struct. The struct is pretenured (allocated directly in |
211 // the old generation). | 215 // the old generation). |
212 Handle<Struct> NewStruct(InstanceType type); | 216 Handle<Struct> NewStruct(InstanceType type); |
213 | 217 |
| 218 // Create an AliasedArgumentsEntry. |
214 Handle<AliasedArgumentsEntry> NewAliasedArgumentsEntry( | 219 Handle<AliasedArgumentsEntry> NewAliasedArgumentsEntry( |
215 int aliased_context_slot); | 220 int aliased_context_slot); |
216 | 221 |
217 Handle<DeclaredAccessorDescriptor> NewDeclaredAccessorDescriptor(); | 222 Handle<DeclaredAccessorDescriptor> NewDeclaredAccessorDescriptor(); |
218 | 223 |
219 Handle<DeclaredAccessorInfo> NewDeclaredAccessorInfo(); | 224 Handle<DeclaredAccessorInfo> NewDeclaredAccessorInfo(); |
220 | 225 |
221 Handle<ExecutableAccessorInfo> NewExecutableAccessorInfo(); | 226 Handle<ExecutableAccessorInfo> NewExecutableAccessorInfo(); |
222 | 227 |
223 Handle<Script> NewScript(Handle<String> source); | 228 Handle<Script> NewScript(Handle<String> source); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); | 318 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); |
314 | 319 |
315 // JS objects are pretenured when allocated by the bootstrapper and | 320 // JS objects are pretenured when allocated by the bootstrapper and |
316 // runtime. | 321 // runtime. |
317 Handle<JSObject> NewJSObjectFromMap( | 322 Handle<JSObject> NewJSObjectFromMap( |
318 Handle<Map> map, | 323 Handle<Map> map, |
319 PretenureFlag pretenure = NOT_TENURED, | 324 PretenureFlag pretenure = NOT_TENURED, |
320 bool allocate_properties = true, | 325 bool allocate_properties = true, |
321 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); | 326 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
322 | 327 |
323 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( | |
324 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); | |
325 | |
326 // JS modules are pretenured. | 328 // JS modules are pretenured. |
327 Handle<JSModule> NewJSModule(Handle<Context> context, | 329 Handle<JSModule> NewJSModule(Handle<Context> context, |
328 Handle<ScopeInfo> scope_info); | 330 Handle<ScopeInfo> scope_info); |
329 | 331 |
330 // JS arrays are pretenured when allocated by the parser. | 332 // JS arrays are pretenured when allocated by the parser. |
331 | 333 |
332 // Create a JSArray with no elements. | 334 // Create a JSArray with no elements. |
333 Handle<JSArray> NewJSArray( | 335 Handle<JSArray> NewJSArray( |
334 ElementsKind elements_kind, | 336 ElementsKind elements_kind, |
335 PretenureFlag pretenure = NOT_TENURED); | 337 PretenureFlag pretenure = NOT_TENURED); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 | 613 |
612 // Update the map cache in the native context with (keys, map) | 614 // Update the map cache in the native context with (keys, map) |
613 Handle<MapCache> AddToMapCache(Handle<Context> context, | 615 Handle<MapCache> AddToMapCache(Handle<Context> context, |
614 Handle<FixedArray> keys, | 616 Handle<FixedArray> keys, |
615 Handle<Map> map); | 617 Handle<Map> map); |
616 }; | 618 }; |
617 | 619 |
618 } } // namespace v8::internal | 620 } } // namespace v8::internal |
619 | 621 |
620 #endif // V8_FACTORY_H_ | 622 #endif // V8_FACTORY_H_ |
OLD | NEW |