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 "src/isolate.h" | 8 #include "src/isolate.h" |
9 #include "src/messages.h" | 9 #include "src/messages.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 // so the return type must be the general fixed array class. | 39 // so the return type must be the general fixed array class. |
40 Handle<FixedArrayBase> NewFixedDoubleArray( | 40 Handle<FixedArrayBase> NewFixedDoubleArray( |
41 int size, | 41 int size, |
42 PretenureFlag pretenure = NOT_TENURED); | 42 PretenureFlag pretenure = NOT_TENURED); |
43 | 43 |
44 // Allocate a new fixed double array with hole values. | 44 // Allocate a new fixed double array with hole values. |
45 Handle<FixedArrayBase> NewFixedDoubleArrayWithHoles( | 45 Handle<FixedArrayBase> NewFixedDoubleArrayWithHoles( |
46 int size, | 46 int size, |
47 PretenureFlag pretenure = NOT_TENURED); | 47 PretenureFlag pretenure = NOT_TENURED); |
48 | 48 |
| 49 Handle<ConstantPoolArray> NewConstantPoolArray( |
| 50 const ConstantPoolArray::NumberOfEntries& small); |
| 51 |
| 52 Handle<ConstantPoolArray> NewExtendedConstantPoolArray( |
| 53 const ConstantPoolArray::NumberOfEntries& small, |
| 54 const ConstantPoolArray::NumberOfEntries& extended); |
| 55 |
49 Handle<OrderedHashSet> NewOrderedHashSet(); | 56 Handle<OrderedHashSet> NewOrderedHashSet(); |
50 Handle<OrderedHashMap> NewOrderedHashMap(); | 57 Handle<OrderedHashMap> NewOrderedHashMap(); |
51 | 58 |
52 // Create a new boxed value. | 59 // Create a new boxed value. |
53 Handle<Box> NewBox(Handle<Object> value); | 60 Handle<Box> NewBox(Handle<Object> value); |
54 | 61 |
55 // Create a new PrototypeInfo struct. | 62 // Create a new PrototypeInfo struct. |
56 Handle<PrototypeInfo> NewPrototypeInfo(); | 63 Handle<PrototypeInfo> NewPrototypeInfo(); |
57 | 64 |
58 // Create a pre-tenured empty AccessorPair. | 65 // Create a pre-tenured empty AccessorPair. |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 332 |
326 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); | 333 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); |
327 | 334 |
328 // This method expects a COW array in new space, and creates a copy | 335 // This method expects a COW array in new space, and creates a copy |
329 // of it in old space. | 336 // of it in old space. |
330 Handle<FixedArray> CopyAndTenureFixedCOWArray(Handle<FixedArray> array); | 337 Handle<FixedArray> CopyAndTenureFixedCOWArray(Handle<FixedArray> array); |
331 | 338 |
332 Handle<FixedDoubleArray> CopyFixedDoubleArray( | 339 Handle<FixedDoubleArray> CopyFixedDoubleArray( |
333 Handle<FixedDoubleArray> array); | 340 Handle<FixedDoubleArray> array); |
334 | 341 |
| 342 Handle<ConstantPoolArray> CopyConstantPoolArray( |
| 343 Handle<ConstantPoolArray> array); |
| 344 |
335 // Numbers (e.g. literals) are pretenured by the parser. | 345 // Numbers (e.g. literals) are pretenured by the parser. |
336 // The return value may be a smi or a heap number. | 346 // The return value may be a smi or a heap number. |
337 Handle<Object> NewNumber(double value, | 347 Handle<Object> NewNumber(double value, |
338 PretenureFlag pretenure = NOT_TENURED); | 348 PretenureFlag pretenure = NOT_TENURED); |
339 | 349 |
340 Handle<Object> NewNumberFromInt(int32_t value, | 350 Handle<Object> NewNumberFromInt(int32_t value, |
341 PretenureFlag pretenure = NOT_TENURED); | 351 PretenureFlag pretenure = NOT_TENURED); |
342 Handle<Object> NewNumberFromUint(uint32_t value, | 352 Handle<Object> NewNumberFromUint(uint32_t value, |
343 PretenureFlag pretenure = NOT_TENURED); | 353 PretenureFlag pretenure = NOT_TENURED); |
344 Handle<Object> NewNumberFromSize(size_t value, | 354 Handle<Object> NewNumberFromSize(size_t value, |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 751 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
742 // size, but keeping the original prototype. The receiver must have at least | 752 // size, but keeping the original prototype. The receiver must have at least |
743 // the size of the new object. The object is reinitialized and behaves as an | 753 // the size of the new object. The object is reinitialized and behaves as an |
744 // object that has been freshly allocated. | 754 // object that has been freshly allocated. |
745 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 755 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
746 }; | 756 }; |
747 | 757 |
748 } } // namespace v8::internal | 758 } } // namespace v8::internal |
749 | 759 |
750 #endif // V8_FACTORY_H_ | 760 #endif // V8_FACTORY_H_ |
OLD | NEW |