| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Interface for handle based allocation. | 39 // Interface for handle based allocation. |
| 40 | 40 |
| 41 class Factory : public AllStatic { | 41 class Factory : public AllStatic { |
| 42 public: | 42 public: |
| 43 // Allocate a new fixed array with undefined entries. | 43 // Allocate a new fixed array with undefined entries. |
| 44 static Handle<FixedArray> NewFixedArray( | 44 static Handle<FixedArray> NewFixedArray( |
| 45 int size, | 45 int size, |
| 46 PretenureFlag pretenure = NOT_TENURED); | 46 PretenureFlag pretenure = NOT_TENURED); |
| 47 | 47 |
| 48 // Allocate a new uninitialized fixed array. It must be filled by |
| 49 // the caller. |
| 50 static Handle<FixedArray> NewUninitializedFixedArray(int size); |
| 51 |
| 48 // Allocate a new fixed array with non-existing entries (the hole). | 52 // Allocate a new fixed array with non-existing entries (the hole). |
| 49 static Handle<FixedArray> NewFixedArrayWithHoles(int size); | 53 static Handle<FixedArray> NewFixedArrayWithHoles(int size); |
| 50 | 54 |
| 51 static Handle<NumberDictionary> NewNumberDictionary(int at_least_space_for); | 55 static Handle<NumberDictionary> NewNumberDictionary(int at_least_space_for); |
| 52 | 56 |
| 53 static Handle<StringDictionary> NewStringDictionary(int at_least_space_for); | 57 static Handle<StringDictionary> NewStringDictionary(int at_least_space_for); |
| 54 | 58 |
| 55 static Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors); | 59 static Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors); |
| 56 | 60 |
| 57 static Handle<String> LookupSymbol(Vector<const char> str); | 61 static Handle<String> LookupSymbol(Vector<const char> str); |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // Update the map cache in the global context with (keys, map) | 389 // Update the map cache in the global context with (keys, map) |
| 386 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 390 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 387 Handle<FixedArray> keys, | 391 Handle<FixedArray> keys, |
| 388 Handle<Map> map); | 392 Handle<Map> map); |
| 389 }; | 393 }; |
| 390 | 394 |
| 391 | 395 |
| 392 } } // namespace v8::internal | 396 } } // namespace v8::internal |
| 393 | 397 |
| 394 #endif // V8_FACTORY_H_ | 398 #endif // V8_FACTORY_H_ |
| OLD | NEW |