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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // Allocate a new fixed array with non-existing entries (the hole). | 27 // Allocate a new fixed array with non-existing entries (the hole). |
28 Handle<FixedArray> NewFixedArrayWithHoles( | 28 Handle<FixedArray> NewFixedArrayWithHoles( |
29 int size, | 29 int size, |
30 PretenureFlag pretenure = NOT_TENURED); | 30 PretenureFlag pretenure = NOT_TENURED); |
31 | 31 |
32 // Allocates an uninitialized fixed array. It must be filled by the caller. | 32 // Allocates an uninitialized fixed array. It must be filled by the caller. |
33 Handle<FixedArray> NewUninitializedFixedArray(int size); | 33 Handle<FixedArray> NewUninitializedFixedArray(int size); |
34 | 34 |
35 // Allocate a new uninitialized fixed double array. | 35 // Allocate a new uninitialized fixed double array. |
36 Handle<FixedDoubleArray> NewFixedDoubleArray( | 36 // The function returns a pre-allocated empty fixed array for capacity = 0, |
| 37 // so the return type must be the general fixed array class. |
| 38 Handle<FixedArrayBase> NewFixedDoubleArray( |
37 int size, | 39 int size, |
38 PretenureFlag pretenure = NOT_TENURED); | 40 PretenureFlag pretenure = NOT_TENURED); |
39 | 41 |
40 // Allocate a new fixed double array with hole values. | 42 // Allocate a new fixed double array with hole values. |
41 Handle<FixedDoubleArray> NewFixedDoubleArrayWithHoles( | 43 Handle<FixedArrayBase> NewFixedDoubleArrayWithHoles( |
42 int size, | 44 int size, |
43 PretenureFlag pretenure = NOT_TENURED); | 45 PretenureFlag pretenure = NOT_TENURED); |
44 | 46 |
45 Handle<ConstantPoolArray> NewConstantPoolArray( | 47 Handle<ConstantPoolArray> NewConstantPoolArray( |
46 int number_of_int64_entries, | 48 int number_of_int64_entries, |
47 int number_of_code_ptr_entries, | 49 int number_of_code_ptr_entries, |
48 int number_of_heap_ptr_entries, | 50 int number_of_heap_ptr_entries, |
49 int number_of_int32_entries); | 51 int number_of_int32_entries); |
50 | 52 |
51 Handle<SeededNumberDictionary> NewSeededNumberDictionary( | 53 Handle<SeededNumberDictionary> NewSeededNumberDictionary( |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 // the string representation of the number. Otherwise return undefined. | 683 // the string representation of the number. Otherwise return undefined. |
682 Handle<Object> GetNumberStringCache(Handle<Object> number); | 684 Handle<Object> GetNumberStringCache(Handle<Object> number); |
683 | 685 |
684 // Update the cache with a new number-string pair. | 686 // Update the cache with a new number-string pair. |
685 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 687 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
686 }; | 688 }; |
687 | 689 |
688 } } // namespace v8::internal | 690 } } // namespace v8::internal |
689 | 691 |
690 #endif // V8_FACTORY_H_ | 692 #endif // V8_FACTORY_H_ |
OLD | NEW |