| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 Handle<Context> context, | 223 Handle<Context> context, |
| 224 PretenureFlag pretenure = TENURED); | 224 PretenureFlag pretenure = TENURED); |
| 225 | 225 |
| 226 static Handle<Code> NewCode(const CodeDesc& desc, | 226 static Handle<Code> NewCode(const CodeDesc& desc, |
| 227 ZoneScopeInfo* sinfo, | 227 ZoneScopeInfo* sinfo, |
| 228 Code::Flags flags, | 228 Code::Flags flags, |
| 229 Handle<Object> self_reference); | 229 Handle<Object> self_reference); |
| 230 | 230 |
| 231 static Handle<Code> CopyCode(Handle<Code> code); | 231 static Handle<Code> CopyCode(Handle<Code> code); |
| 232 | 232 |
| 233 static Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); |
| 234 |
| 233 static Handle<Object> ToObject(Handle<Object> object); | 235 static Handle<Object> ToObject(Handle<Object> object); |
| 234 static Handle<Object> ToObject(Handle<Object> object, | 236 static Handle<Object> ToObject(Handle<Object> object, |
| 235 Handle<Context> global_context); | 237 Handle<Context> global_context); |
| 236 | 238 |
| 237 // Interface for creating error objects. | 239 // Interface for creating error objects. |
| 238 | 240 |
| 239 static Handle<Object> NewError(const char* maker, const char* type, | 241 static Handle<Object> NewError(const char* maker, const char* type, |
| 240 Handle<JSArray> args); | 242 Handle<JSArray> args); |
| 241 static Handle<Object> NewError(const char* maker, const char* type, | 243 static Handle<Object> NewError(const char* maker, const char* type, |
| 242 Vector< Handle<Object> > args); | 244 Vector< Handle<Object> > args); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 312 |
| 311 // Installs interceptors on the instance. 'desc' is a function template, | 313 // Installs interceptors on the instance. 'desc' is a function template, |
| 312 // and instance is an object instance created by the function of this | 314 // and instance is an object instance created by the function of this |
| 313 // function template. | 315 // function template. |
| 314 static void ConfigureInstance(Handle<FunctionTemplateInfo> desc, | 316 static void ConfigureInstance(Handle<FunctionTemplateInfo> desc, |
| 315 Handle<JSObject> instance, | 317 Handle<JSObject> instance, |
| 316 bool* pending_exception); | 318 bool* pending_exception); |
| 317 | 319 |
| 318 #define ROOT_ACCESSOR(type, name, camel_name) \ | 320 #define ROOT_ACCESSOR(type, name, camel_name) \ |
| 319 static inline Handle<type> name() { \ | 321 static inline Handle<type> name() { \ |
| 320 return Handle<type>(bit_cast<type**, Object**>( \ | 322 return Handle<type>(BitCast<type**, Object**>( \ |
| 321 &Heap::roots_[Heap::k##camel_name##RootIndex])); \ | 323 &Heap::roots_[Heap::k##camel_name##RootIndex])); \ |
| 322 } | 324 } |
| 323 ROOT_LIST(ROOT_ACCESSOR) | 325 ROOT_LIST(ROOT_ACCESSOR) |
| 324 #undef ROOT_ACCESSOR_ACCESSOR | 326 #undef ROOT_ACCESSOR_ACCESSOR |
| 325 | 327 |
| 326 #define SYMBOL_ACCESSOR(name, str) \ | 328 #define SYMBOL_ACCESSOR(name, str) \ |
| 327 static inline Handle<String> name() { \ | 329 static inline Handle<String> name() { \ |
| 328 return Handle<String>(bit_cast<String**, Object**>( \ | 330 return Handle<String>(BitCast<String**, Object**>( \ |
| 329 &Heap::roots_[Heap::k##name##RootIndex])); \ | 331 &Heap::roots_[Heap::k##name##RootIndex])); \ |
| 330 } | 332 } |
| 331 SYMBOL_LIST(SYMBOL_ACCESSOR) | 333 SYMBOL_LIST(SYMBOL_ACCESSOR) |
| 332 #undef SYMBOL_ACCESSOR | 334 #undef SYMBOL_ACCESSOR |
| 333 | 335 |
| 334 static Handle<String> hidden_symbol() { | 336 static Handle<String> hidden_symbol() { |
| 335 return Handle<String>(&Heap::hidden_symbol_); | 337 return Handle<String>(&Heap::hidden_symbol_); |
| 336 } | 338 } |
| 337 | 339 |
| 338 static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); | 340 static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // Update the map cache in the global context with (keys, map) | 388 // Update the map cache in the global context with (keys, map) |
| 387 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 389 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 388 Handle<FixedArray> keys, | 390 Handle<FixedArray> keys, |
| 389 Handle<Map> map); | 391 Handle<Map> map); |
| 390 }; | 392 }; |
| 391 | 393 |
| 392 | 394 |
| 393 } } // namespace v8::internal | 395 } } // namespace v8::internal |
| 394 | 396 |
| 395 #endif // V8_FACTORY_H_ | 397 #endif // V8_FACTORY_H_ |
| OLD | NEW |