| 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 CloseTableSet; |
| 39 |
| 38 // Interface for handle based allocation. | 40 // Interface for handle based allocation. |
| 39 | 41 |
| 40 class Factory { | 42 class Factory { |
| 41 public: | 43 public: |
| 42 // Allocate a new boxed value. | 44 // Allocate a new boxed value. |
| 43 Handle<Box> NewBox( | 45 Handle<Box> NewBox( |
| 44 Handle<Object> value, | 46 Handle<Object> value, |
| 45 PretenureFlag pretenure = NOT_TENURED); | 47 PretenureFlag pretenure = NOT_TENURED); |
| 46 | 48 |
| 47 // Allocates a fixed array initialized with undefined values. | 49 // Allocates a fixed array initialized with undefined values. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 75 int at_least_space_for); | 77 int at_least_space_for); |
| 76 | 78 |
| 77 Handle<NameDictionary> NewNameDictionary(int at_least_space_for); | 79 Handle<NameDictionary> NewNameDictionary(int at_least_space_for); |
| 78 | 80 |
| 79 Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for); | 81 Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for); |
| 80 | 82 |
| 81 Handle<ObjectHashTable> NewObjectHashTable( | 83 Handle<ObjectHashTable> NewObjectHashTable( |
| 82 int at_least_space_for, | 84 int at_least_space_for, |
| 83 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); | 85 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); |
| 84 | 86 |
| 87 Handle<CloseTableSet> NewCloseTableSet(); |
| 88 |
| 85 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); | 89 Handle<WeakHashTable> NewWeakHashTable(int at_least_space_for); |
| 86 | 90 |
| 87 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, | 91 Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors, |
| 88 int slack = 0); | 92 int slack = 0); |
| 89 Handle<DeoptimizationInputData> NewDeoptimizationInputData( | 93 Handle<DeoptimizationInputData> NewDeoptimizationInputData( |
| 90 int deopt_entry_count, | 94 int deopt_entry_count, |
| 91 PretenureFlag pretenure); | 95 PretenureFlag pretenure); |
| 92 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( | 96 Handle<DeoptimizationOutputData> NewDeoptimizationOutputData( |
| 93 int deopt_entry_count, | 97 int deopt_entry_count, |
| 94 PretenureFlag pretenure); | 98 PretenureFlag pretenure); |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 isolate()); | 636 isolate()); |
| 633 } else { | 637 } else { |
| 634 return NewNumber(static_cast<double>(value), pretenure); | 638 return NewNumber(static_cast<double>(value), pretenure); |
| 635 } | 639 } |
| 636 } | 640 } |
| 637 | 641 |
| 638 | 642 |
| 639 } } // namespace v8::internal | 643 } } // namespace v8::internal |
| 640 | 644 |
| 641 #endif // V8_FACTORY_H_ | 645 #endif // V8_FACTORY_H_ |
| OLD | NEW |