OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 17 matching lines...) Expand all Loading... |
28 #ifndef V8_FACTORY_H_ | 28 #ifndef V8_FACTORY_H_ |
29 #define V8_FACTORY_H_ | 29 #define V8_FACTORY_H_ |
30 | 30 |
31 #include "globals.h" | 31 #include "globals.h" |
32 #include "handles.h" | 32 #include "handles.h" |
33 #include "heap.h" | 33 #include "heap.h" |
34 | 34 |
35 namespace v8 { | 35 namespace v8 { |
36 namespace internal { | 36 namespace internal { |
37 | 37 |
| 38 class CloseTableMap; |
| 39 class CloseTableSet; |
| 40 |
38 // Interface for handle based allocation. | 41 // Interface for handle based allocation. |
39 | 42 |
40 class Factory { | 43 class Factory { |
41 public: | 44 public: |
42 // Allocate a new boxed value. | 45 // Allocate a new boxed value. |
43 Handle<Box> NewBox( | 46 Handle<Box> NewBox( |
44 Handle<Object> value, | 47 Handle<Object> value, |
45 PretenureFlag pretenure = NOT_TENURED); | 48 PretenureFlag pretenure = NOT_TENURED); |
46 | 49 |
47 // Allocates a fixed array initialized with undefined values. | 50 // Allocates a fixed array initialized with undefined values. |
(...skipping 27 matching lines...) Expand all Loading... |
75 int at_least_space_for); | 78 int at_least_space_for); |
76 | 79 |
77 Handle<NameDictionary> NewNameDictionary(int at_least_space_for); | 80 Handle<NameDictionary> NewNameDictionary(int at_least_space_for); |
78 | 81 |
79 Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for); | 82 Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for); |
80 | 83 |
81 Handle<ObjectHashTable> NewObjectHashTable( | 84 Handle<ObjectHashTable> NewObjectHashTable( |
82 int at_least_space_for, | 85 int at_least_space_for, |
83 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); | 86 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); |
84 | 87 |
| 88 Handle<CloseTableSet> NewCloseTableSet(); |
| 89 Handle<CloseTableMap> NewCloseTableMap(); |
| 90 |
85 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); | 91 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); |
86 | 92 |
87 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, | 93 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, |
88 int slack = 0); | 94 int slack = 0); |
89 Handle<DeoptimizationInputData> NewDeoptimizationInputData( | 95 Handle<DeoptimizationInputData> NewDeoptimizationInputData( |
90 int deopt_entry_count, | 96 int deopt_entry_count, |
91 PretenureFlag pretenure); | 97 PretenureFlag pretenure); |
92 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( | 98 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( |
93 int deopt_entry_count, | 99 int deopt_entry_count, |
94 PretenureFlag pretenure); | 100 PretenureFlag pretenure); |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 isolate()); | 638 isolate()); |
633 } else { | 639 } else { |
634 return NewNumber(static_cast<double>(value), pretenure); | 640 return NewNumber(static_cast<double>(value), pretenure); |
635 } | 641 } |
636 } | 642 } |
637 | 643 |
638 | 644 |
639 } } // namespace v8::internal | 645 } } // namespace v8::internal |
640 | 646 |
641 #endif // V8_FACTORY_H_ | 647 #endif // V8_FACTORY_H_ |
OLD | NEW |