| 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 26 matching lines...) Expand all  Loading... | 
| 37 | 37 | 
| 38 // Interface for handle based allocation. | 38 // Interface for handle based allocation. | 
| 39 | 39 | 
| 40 class Factory { | 40 class Factory { | 
| 41  public: | 41  public: | 
| 42   // Allocate a new boxed value. | 42   // Allocate a new boxed value. | 
| 43   Handle<Box> NewBox( | 43   Handle<Box> NewBox( | 
| 44       Handle<Object> value, | 44       Handle<Object> value, | 
| 45       PretenureFlag pretenure = NOT_TENURED); | 45       PretenureFlag pretenure = NOT_TENURED); | 
| 46 | 46 | 
| 47   // Allocate a new uninitialized fixed array. | 47   // Allocates a fixed array initialized with undefined values. | 
| 48   Handle<FixedArray> NewFixedArray( | 48   Handle<FixedArray> NewFixedArray( | 
| 49       int size, | 49       int size, | 
| 50       PretenureFlag pretenure = NOT_TENURED); | 50       PretenureFlag pretenure = NOT_TENURED); | 
| 51 | 51 | 
| 52   // Allocate a new fixed array with non-existing entries (the hole). | 52   // Allocate a new fixed array with non-existing entries (the hole). | 
| 53   Handle<FixedArray> NewFixedArrayWithHoles( | 53   Handle<FixedArray> NewFixedArrayWithHoles( | 
| 54       int size, | 54       int size, | 
| 55       PretenureFlag pretenure = NOT_TENURED); | 55       PretenureFlag pretenure = NOT_TENURED); | 
| 56 | 56 | 
|  | 57   // Allocates an uninitialized fixed array. It must be filled by the caller. | 
|  | 58   Handle<FixedArray> NewUninitializedFixedArray(int size); | 
|  | 59 | 
| 57   // Allocate a new uninitialized fixed double array. | 60   // Allocate a new uninitialized fixed double array. | 
| 58   Handle<FixedDoubleArray> NewFixedDoubleArray( | 61   Handle<FixedDoubleArray> NewFixedDoubleArray( | 
| 59       int size, | 62       int size, | 
| 60       PretenureFlag pretenure = NOT_TENURED); | 63       PretenureFlag pretenure = NOT_TENURED); | 
| 61 | 64 | 
| 62   Handle<ConstantPoolArray> NewConstantPoolArray( | 65   Handle<ConstantPoolArray> NewConstantPoolArray( | 
| 63       int number_of_int64_entries, | 66       int number_of_int64_entries, | 
| 64       int number_of_code_ptr_entries, | 67       int number_of_code_ptr_entries, | 
| 65       int number_of_heap_ptr_entries, | 68       int number_of_heap_ptr_entries, | 
| 66       int number_of_int32_entries); | 69       int number_of_int32_entries); | 
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 614                           isolate()); | 617                           isolate()); | 
| 615   } else { | 618   } else { | 
| 616     return NewNumber(static_cast<double>(value), pretenure); | 619     return NewNumber(static_cast<double>(value), pretenure); | 
| 617   } | 620   } | 
| 618 } | 621 } | 
| 619 | 622 | 
| 620 | 623 | 
| 621 } }  // namespace v8::internal | 624 } }  // namespace v8::internal | 
| 622 | 625 | 
| 623 #endif  // V8_FACTORY_H_ | 626 #endif  // V8_FACTORY_H_ | 
| OLD | NEW | 
|---|