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 29 matching lines...) Expand all Loading... |
40 class Factory : public AllStatic { | 40 class Factory : public AllStatic { |
41 public: | 41 public: |
42 // Allocate a new fixed array with undefined entries. | 42 // Allocate a new fixed array with undefined entries. |
43 static Handle<FixedArray> NewFixedArray( | 43 static Handle<FixedArray> NewFixedArray( |
44 int size, | 44 int size, |
45 PretenureFlag pretenure = NOT_TENURED); | 45 PretenureFlag pretenure = NOT_TENURED); |
46 | 46 |
47 // Allocate a new fixed array with non-existing entries (the hole). | 47 // Allocate a new fixed array with non-existing entries (the hole). |
48 static Handle<FixedArray> NewFixedArrayWithHoles(int size); | 48 static Handle<FixedArray> NewFixedArrayWithHoles(int size); |
49 | 49 |
50 static Handle<Dictionary> NewDictionary(int at_least_space_for); | 50 static Handle<NumberDictionary> NewNumberDictionary(int at_least_space_for); |
| 51 |
| 52 static Handle<StringDictionary> NewStringDictionary(int at_least_space_for); |
51 | 53 |
52 static Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors); | 54 static Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors); |
53 | 55 |
54 static Handle<String> LookupSymbol(Vector<const char> str); | 56 static Handle<String> LookupSymbol(Vector<const char> str); |
55 static Handle<String> LookupAsciiSymbol(const char* str) { | 57 static Handle<String> LookupAsciiSymbol(const char* str) { |
56 return LookupSymbol(CStrVector(str)); | 58 return LookupSymbol(CStrVector(str)); |
57 } | 59 } |
58 | 60 |
59 | 61 |
60 // String creation functions. Most of the string creation functions take | 62 // String creation functions. Most of the string creation functions take |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 static Handle<String> name() { return Handle<String>(&Heap::name##_); } | 308 static Handle<String> name() { return Handle<String>(&Heap::name##_); } |
307 SYMBOL_LIST(SYMBOL_ACCESSOR) | 309 SYMBOL_LIST(SYMBOL_ACCESSOR) |
308 #undef SYMBOL_ACCESSOR | 310 #undef SYMBOL_ACCESSOR |
309 | 311 |
310 static Handle<String> hidden_symbol() { | 312 static Handle<String> hidden_symbol() { |
311 return Handle<String>(&Heap::hidden_symbol_); | 313 return Handle<String>(&Heap::hidden_symbol_); |
312 } | 314 } |
313 | 315 |
314 static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); | 316 static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); |
315 | 317 |
316 static Handle<Dictionary> DictionaryAtNumberPut(Handle<Dictionary>, | 318 static Handle<NumberDictionary> DictionaryAtNumberPut( |
317 uint32_t key, | 319 Handle<NumberDictionary>, |
318 Handle<Object> value); | 320 uint32_t key, |
| 321 Handle<Object> value); |
319 | 322 |
320 #ifdef ENABLE_DEBUGGER_SUPPORT | 323 #ifdef ENABLE_DEBUGGER_SUPPORT |
321 static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 324 static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
322 #endif | 325 #endif |
323 | 326 |
324 // Return a map using the map cache in the global context. | 327 // Return a map using the map cache in the global context. |
325 // The key the an ordered set of property names. | 328 // The key the an ordered set of property names. |
326 static Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, | 329 static Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, |
327 Handle<FixedArray> keys); | 330 Handle<FixedArray> keys); |
328 | 331 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // Update the map cache in the global context with (keys, map) | 363 // Update the map cache in the global context with (keys, map) |
361 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 364 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
362 Handle<FixedArray> keys, | 365 Handle<FixedArray> keys, |
363 Handle<Map> map); | 366 Handle<Map> map); |
364 }; | 367 }; |
365 | 368 |
366 | 369 |
367 } } // namespace v8::internal | 370 } } // namespace v8::internal |
368 | 371 |
369 #endif // V8_FACTORY_H_ | 372 #endif // V8_FACTORY_H_ |
OLD | NEW |