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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 Handle<ConstantPoolArray> NewConstantPoolArray( | 47 Handle<ConstantPoolArray> NewConstantPoolArray( |
48 int number_of_int64_entries, | 48 int number_of_int64_entries, |
49 int number_of_code_ptr_entries, | 49 int number_of_code_ptr_entries, |
50 int number_of_heap_ptr_entries, | 50 int number_of_heap_ptr_entries, |
51 int number_of_int32_entries); | 51 int number_of_int32_entries); |
52 | 52 |
53 Handle<OrderedHashSet> NewOrderedHashSet(); | 53 Handle<OrderedHashSet> NewOrderedHashSet(); |
54 Handle<OrderedHashMap> NewOrderedHashMap(); | 54 Handle<OrderedHashMap> NewOrderedHashMap(); |
55 | 55 |
56 Handle<DeoptimizationInputData> NewDeoptimizationInputData( | |
57 int deopt_entry_count, | |
58 PretenureFlag pretenure); | |
59 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( | |
60 int deopt_entry_count, | |
61 PretenureFlag pretenure); | |
62 | |
63 // Create a new boxed value. | 56 // Create a new boxed value. |
64 Handle<Box> NewBox(Handle<Object> value); | 57 Handle<Box> NewBox(Handle<Object> value); |
65 | 58 |
66 // Create a pre-tenured empty AccessorPair. | 59 // Create a pre-tenured empty AccessorPair. |
67 Handle<AccessorPair> NewAccessorPair(); | 60 Handle<AccessorPair> NewAccessorPair(); |
68 | 61 |
69 // Create an empty TypeFeedbackInfo. | 62 // Create an empty TypeFeedbackInfo. |
70 Handle<TypeFeedbackInfo> NewTypeFeedbackInfo(); | 63 Handle<TypeFeedbackInfo> NewTypeFeedbackInfo(); |
71 | 64 |
72 // Finds the internalized copy for string in the string table. | 65 // Finds the internalized copy for string in the string table. |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 InstanceType type, | 293 InstanceType type, |
301 int instance_size, | 294 int instance_size, |
302 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); | 295 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); |
303 | 296 |
304 Handle<HeapObject> NewFillerObject(int size, | 297 Handle<HeapObject> NewFillerObject(int size, |
305 bool double_align, | 298 bool double_align, |
306 AllocationSpace space); | 299 AllocationSpace space); |
307 | 300 |
308 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); | 301 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); |
309 | 302 |
| 303 Handle<FixedArray> CopyFixedArrayWithMap(Handle<FixedArray> array, |
| 304 Handle<Map> map); |
| 305 |
310 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); | 306 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); |
311 | 307 |
312 // This method expects a COW array in new space, and creates a copy | 308 // This method expects a COW array in new space, and creates a copy |
313 // of it in old space. | 309 // of it in old space. |
314 Handle<FixedArray> CopyAndTenureFixedCOWArray(Handle<FixedArray> array); | 310 Handle<FixedArray> CopyAndTenureFixedCOWArray(Handle<FixedArray> array); |
315 | 311 |
316 Handle<FixedArray> CopySizeFixedArray(Handle<FixedArray> array, | |
317 int new_length, | |
318 PretenureFlag pretenure = NOT_TENURED); | |
319 | |
320 Handle<FixedDoubleArray> CopyFixedDoubleArray( | 312 Handle<FixedDoubleArray> CopyFixedDoubleArray( |
321 Handle<FixedDoubleArray> array); | 313 Handle<FixedDoubleArray> array); |
322 | 314 |
323 Handle<ConstantPoolArray> CopyConstantPoolArray( | 315 Handle<ConstantPoolArray> CopyConstantPoolArray( |
324 Handle<ConstantPoolArray> array); | 316 Handle<ConstantPoolArray> array); |
325 | 317 |
326 // Numbers (e.g. literals) are pretenured by the parser. | 318 // Numbers (e.g. literals) are pretenured by the parser. |
327 // The return value may be a smi or a heap number. | 319 // The return value may be a smi or a heap number. |
328 Handle<Object> NewNumber(double value, | 320 Handle<Object> NewNumber(double value, |
329 PretenureFlag pretenure = NOT_TENURED); | 321 PretenureFlag pretenure = NOT_TENURED); |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 // the string representation of the number. Otherwise return undefined. | 680 // the string representation of the number. Otherwise return undefined. |
689 Handle<Object> GetNumberStringCache(Handle<Object> number); | 681 Handle<Object> GetNumberStringCache(Handle<Object> number); |
690 | 682 |
691 // Update the cache with a new number-string pair. | 683 // Update the cache with a new number-string pair. |
692 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 684 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
693 }; | 685 }; |
694 | 686 |
695 } } // namespace v8::internal | 687 } } // namespace v8::internal |
696 | 688 |
697 #endif // V8_FACTORY_H_ | 689 #endif // V8_FACTORY_H_ |
OLD | NEW |