| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Creates a new external String object. There are two String encodings | 153 // Creates a new external String object. There are two String encodings |
| 154 // in the system: ASCII and two byte. Unlike other String types, it does | 154 // in the system: ASCII and two byte. Unlike other String types, it does |
| 155 // not make sense to have a UTF-8 factory function for external strings, | 155 // not make sense to have a UTF-8 factory function for external strings, |
| 156 // because we cannot change the underlying buffer. | 156 // because we cannot change the underlying buffer. |
| 157 Handle<String> NewExternalStringFromAscii( | 157 Handle<String> NewExternalStringFromAscii( |
| 158 const ExternalAsciiString::Resource* resource); | 158 const ExternalAsciiString::Resource* resource); |
| 159 Handle<String> NewExternalStringFromTwoByte( | 159 Handle<String> NewExternalStringFromTwoByte( |
| 160 const ExternalTwoByteString::Resource* resource); | 160 const ExternalTwoByteString::Resource* resource); |
| 161 | 161 |
| 162 // Create a global (but otherwise uninitialized) context. | 162 // Create a global (but otherwise uninitialized) context. |
| 163 Handle<Context> NewNativeContext(); | 163 Handle<Context> NewGlobalContext(); |
| 164 | 164 |
| 165 // Create a module context. | 165 // Create a module context. |
| 166 Handle<Context> NewModuleContext(Handle<ScopeInfo> scope_info); | 166 Handle<Context> NewModuleContext(Handle<ScopeInfo> scope_info); |
| 167 | 167 |
| 168 // Create a function context. | 168 // Create a function context. |
| 169 Handle<Context> NewFunctionContext(int length, Handle<JSFunction> function); | 169 Handle<Context> NewFunctionContext(int length, Handle<JSFunction> function); |
| 170 | 170 |
| 171 // Create a catch context. | 171 // Create a catch context. |
| 172 Handle<Context> NewCatchContext(Handle<JSFunction> function, | 172 Handle<Context> NewCatchContext(Handle<JSFunction> function, |
| 173 Handle<Context> previous, | 173 Handle<Context> previous, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 Code::Flags flags, | 324 Code::Flags flags, |
| 325 Handle<Object> self_reference, | 325 Handle<Object> self_reference, |
| 326 bool immovable = false); | 326 bool immovable = false); |
| 327 | 327 |
| 328 Handle<Code> CopyCode(Handle<Code> code); | 328 Handle<Code> CopyCode(Handle<Code> code); |
| 329 | 329 |
| 330 Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); | 330 Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); |
| 331 | 331 |
| 332 Handle<Object> ToObject(Handle<Object> object); | 332 Handle<Object> ToObject(Handle<Object> object); |
| 333 Handle<Object> ToObject(Handle<Object> object, | 333 Handle<Object> ToObject(Handle<Object> object, |
| 334 Handle<Context> native_context); | 334 Handle<Context> global_context); |
| 335 | 335 |
| 336 // Interface for creating error objects. | 336 // Interface for creating error objects. |
| 337 | 337 |
| 338 Handle<Object> NewError(const char* maker, const char* type, | 338 Handle<Object> NewError(const char* maker, const char* type, |
| 339 Handle<JSArray> args); | 339 Handle<JSArray> args); |
| 340 Handle<String> EmergencyNewError(const char* type, Handle<JSArray> args); | 340 Handle<String> EmergencyNewError(const char* type, Handle<JSArray> args); |
| 341 Handle<Object> NewError(const char* maker, const char* type, | 341 Handle<Object> NewError(const char* maker, const char* type, |
| 342 Vector< Handle<Object> > args); | 342 Vector< Handle<Object> > args); |
| 343 Handle<Object> NewError(const char* type, | 343 Handle<Object> NewError(const char* type, |
| 344 Vector< Handle<Object> > args); | 344 Vector< Handle<Object> > args); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 Handle<UnseededNumberDictionary> DictionaryAtNumberPut( | 451 Handle<UnseededNumberDictionary> DictionaryAtNumberPut( |
| 452 Handle<UnseededNumberDictionary>, | 452 Handle<UnseededNumberDictionary>, |
| 453 uint32_t key, | 453 uint32_t key, |
| 454 Handle<Object> value); | 454 Handle<Object> value); |
| 455 | 455 |
| 456 #ifdef ENABLE_DEBUGGER_SUPPORT | 456 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 457 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 457 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
| 458 #endif | 458 #endif |
| 459 | 459 |
| 460 // Return a map using the map cache in the native context. | 460 // Return a map using the map cache in the global context. |
| 461 // The key the an ordered set of property names. | 461 // The key the an ordered set of property names. |
| 462 Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, | 462 Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, |
| 463 Handle<FixedArray> keys); | 463 Handle<FixedArray> keys); |
| 464 | 464 |
| 465 // Creates a new FixedArray that holds the data associated with the | 465 // Creates a new FixedArray that holds the data associated with the |
| 466 // atom regexp and stores it in the regexp. | 466 // atom regexp and stores it in the regexp. |
| 467 void SetRegExpAtomData(Handle<JSRegExp> regexp, | 467 void SetRegExpAtomData(Handle<JSRegExp> regexp, |
| 468 JSRegExp::Type type, | 468 JSRegExp::Type type, |
| 469 Handle<String> source, | 469 Handle<String> source, |
| 470 JSRegExp::Flags flags, | 470 JSRegExp::Flags flags, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 492 Handle<JSFunction> NewFunctionHelper(Handle<String> name, | 492 Handle<JSFunction> NewFunctionHelper(Handle<String> name, |
| 493 Handle<Object> prototype); | 493 Handle<Object> prototype); |
| 494 | 494 |
| 495 Handle<JSFunction> NewFunctionWithoutPrototypeHelper( | 495 Handle<JSFunction> NewFunctionWithoutPrototypeHelper( |
| 496 Handle<String> name, | 496 Handle<String> name, |
| 497 LanguageMode language_mode); | 497 LanguageMode language_mode); |
| 498 | 498 |
| 499 // Create a new map cache. | 499 // Create a new map cache. |
| 500 Handle<MapCache> NewMapCache(int at_least_space_for); | 500 Handle<MapCache> NewMapCache(int at_least_space_for); |
| 501 | 501 |
| 502 // Update the map cache in the native context with (keys, map) | 502 // Update the map cache in the global context with (keys, map) |
| 503 Handle<MapCache> AddToMapCache(Handle<Context> context, | 503 Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 504 Handle<FixedArray> keys, | 504 Handle<FixedArray> keys, |
| 505 Handle<Map> map); | 505 Handle<Map> map); |
| 506 }; | 506 }; |
| 507 | 507 |
| 508 | 508 |
| 509 } } // namespace v8::internal | 509 } } // namespace v8::internal |
| 510 | 510 |
| 511 #endif // V8_FACTORY_H_ | 511 #endif // V8_FACTORY_H_ |
| OLD | NEW |