| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 309 |
| 310 static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 310 static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
| 311 | 311 |
| 312 | 312 |
| 313 // Return a map using the map cache in the global context. | 313 // Return a map using the map cache in the global context. |
| 314 // The key the an ordered set of property names. | 314 // The key the an ordered set of property names. |
| 315 static Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, | 315 static Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, |
| 316 Handle<FixedArray> keys); | 316 Handle<FixedArray> keys); |
| 317 | 317 |
| 318 // Creates a new FixedArray that holds the data associated with the | 318 // Creates a new FixedArray that holds the data associated with the |
| 319 // atom regexp and stores it in the regexp. | 319 // regexp and stores it in the regexp. |
| 320 static void SetRegExpAtomData(Handle<JSRegExp> regexp, | 320 static void SetRegExpData(Handle<JSRegExp> regexp, |
| 321 JSRegExp::Type type, | 321 JSRegExp::Type type, |
| 322 Handle<String> source, | 322 Handle<String> source, |
| 323 JSRegExp::Flags flags, | 323 JSRegExp::Flags flags, |
| 324 Handle<Object> match_pattern); | 324 Handle<Object> data); |
| 325 | |
| 326 // Creates a new FixedArray that holds the data associated with the | |
| 327 // irregexp regexp and stores it in the regexp. | |
| 328 static void SetRegExpIrregexpData(Handle<JSRegExp> regexp, | |
| 329 JSRegExp::Type type, | |
| 330 Handle<String> source, | |
| 331 JSRegExp::Flags flags, | |
| 332 int capture_count); | |
| 333 | 325 |
| 334 private: | 326 private: |
| 335 static Handle<JSFunction> NewFunctionHelper(Handle<String> name, | 327 static Handle<JSFunction> NewFunctionHelper(Handle<String> name, |
| 336 Handle<Object> prototype); | 328 Handle<Object> prototype); |
| 337 | 329 |
| 338 static Handle<DescriptorArray> CopyAppendCallbackDescriptors( | 330 static Handle<DescriptorArray> CopyAppendCallbackDescriptors( |
| 339 Handle<DescriptorArray> array, | 331 Handle<DescriptorArray> array, |
| 340 Handle<Object> descriptors); | 332 Handle<Object> descriptors); |
| 341 | 333 |
| 342 static Handle<JSFunction> BaseNewFunctionFromBoilerplate( | 334 static Handle<JSFunction> BaseNewFunctionFromBoilerplate( |
| 343 Handle<JSFunction> boilerplate, | 335 Handle<JSFunction> boilerplate, |
| 344 Handle<Map> function_map); | 336 Handle<Map> function_map); |
| 345 | 337 |
| 346 // Create a new map cache. | 338 // Create a new map cache. |
| 347 static Handle<MapCache> NewMapCache(int at_least_space_for); | 339 static Handle<MapCache> NewMapCache(int at_least_space_for); |
| 348 | 340 |
| 349 // Update the map cache in the global context with (keys, map) | 341 // Update the map cache in the global context with (keys, map) |
| 350 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 342 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 351 Handle<FixedArray> keys, | 343 Handle<FixedArray> keys, |
| 352 Handle<Map> map); | 344 Handle<Map> map); |
| 353 }; | 345 }; |
| 354 | 346 |
| 355 | 347 |
| 356 } } // namespace v8::internal | 348 } } // namespace v8::internal |
| 357 | 349 |
| 358 #endif // V8_FACTORY_H_ | 350 #endif // V8_FACTORY_H_ |
| OLD | NEW |