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