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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 static Handle<JSArray> NewJSArrayWithElements( | 212 static Handle<JSArray> NewJSArrayWithElements( |
213 Handle<FixedArray> elements, | 213 Handle<FixedArray> elements, |
214 PretenureFlag pretenure = NOT_TENURED); | 214 PretenureFlag pretenure = NOT_TENURED); |
215 | 215 |
216 static Handle<JSFunction> NewFunction(Handle<String> name, | 216 static Handle<JSFunction> NewFunction(Handle<String> name, |
217 Handle<Object> prototype); | 217 Handle<Object> prototype); |
218 | 218 |
219 static Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global); | 219 static Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global); |
220 | 220 |
221 static Handle<JSFunction> NewFunctionFromBoilerplate( | 221 static Handle<JSFunction> BaseNewFunctionFromSharedFunctionInfo( |
222 Handle<JSFunction> boilerplate, | 222 Handle<SharedFunctionInfo> function_info, |
| 223 Handle<Map> function_map, |
| 224 PretenureFlag pretenure); |
| 225 |
| 226 static Handle<JSFunction> NewFunctionFromSharedFunctionInfo( |
| 227 Handle<SharedFunctionInfo> function_info, |
223 Handle<Context> context, | 228 Handle<Context> context, |
224 PretenureFlag pretenure = TENURED); | 229 PretenureFlag pretenure = TENURED); |
225 | 230 |
226 static Handle<Code> NewCode(const CodeDesc& desc, | 231 static Handle<Code> NewCode(const CodeDesc& desc, |
227 ZoneScopeInfo* sinfo, | 232 ZoneScopeInfo* sinfo, |
228 Code::Flags flags, | 233 Code::Flags flags, |
229 Handle<Object> self_reference); | 234 Handle<Object> self_reference); |
230 | 235 |
231 static Handle<Code> CopyCode(Handle<Code> code); | 236 static Handle<Code> CopyCode(Handle<Code> code); |
232 | 237 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 static Handle<Object> NewEvalError(const char* type, | 271 static Handle<Object> NewEvalError(const char* type, |
267 Vector< Handle<Object> > args); | 272 Vector< Handle<Object> > args); |
268 | 273 |
269 | 274 |
270 static Handle<JSFunction> NewFunction(Handle<String> name, | 275 static Handle<JSFunction> NewFunction(Handle<String> name, |
271 InstanceType type, | 276 InstanceType type, |
272 int instance_size, | 277 int instance_size, |
273 Handle<Code> code, | 278 Handle<Code> code, |
274 bool force_initial_map); | 279 bool force_initial_map); |
275 | 280 |
276 static Handle<JSFunction> NewFunctionBoilerplate(Handle<String> name, | |
277 int number_of_literals, | |
278 Handle<Code> code); | |
279 | |
280 static Handle<JSFunction> NewFunctionBoilerplate(Handle<String> name); | |
281 | |
282 static Handle<JSFunction> NewFunction(Handle<Map> function_map, | 281 static Handle<JSFunction> NewFunction(Handle<Map> function_map, |
283 Handle<SharedFunctionInfo> shared, Handle<Object> prototype); | 282 Handle<SharedFunctionInfo> shared, Handle<Object> prototype); |
284 | 283 |
285 | 284 |
286 static Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name, | 285 static Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name, |
287 InstanceType type, | 286 InstanceType type, |
288 int instance_size, | 287 int instance_size, |
289 Handle<JSObject> prototype, | 288 Handle<JSObject> prototype, |
290 Handle<Code> code, | 289 Handle<Code> code, |
291 bool force_initial_map); | 290 bool force_initial_map); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 return Handle<String>(BitCast<String**, Object**>( \ | 329 return Handle<String>(BitCast<String**, Object**>( \ |
331 &Heap::roots_[Heap::k##name##RootIndex])); \ | 330 &Heap::roots_[Heap::k##name##RootIndex])); \ |
332 } | 331 } |
333 SYMBOL_LIST(SYMBOL_ACCESSOR) | 332 SYMBOL_LIST(SYMBOL_ACCESSOR) |
334 #undef SYMBOL_ACCESSOR | 333 #undef SYMBOL_ACCESSOR |
335 | 334 |
336 static Handle<String> hidden_symbol() { | 335 static Handle<String> hidden_symbol() { |
337 return Handle<String>(&Heap::hidden_symbol_); | 336 return Handle<String>(&Heap::hidden_symbol_); |
338 } | 337 } |
339 | 338 |
| 339 static Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| 340 Handle<String> name, int number_of_literals, Handle<Code> code); |
340 static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); | 341 static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name); |
341 | 342 |
342 static Handle<NumberDictionary> DictionaryAtNumberPut( | 343 static Handle<NumberDictionary> DictionaryAtNumberPut( |
343 Handle<NumberDictionary>, | 344 Handle<NumberDictionary>, |
344 uint32_t key, | 345 uint32_t key, |
345 Handle<Object> value); | 346 Handle<Object> value); |
346 | 347 |
347 #ifdef ENABLE_DEBUGGER_SUPPORT | 348 #ifdef ENABLE_DEBUGGER_SUPPORT |
348 static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 349 static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
349 #endif | 350 #endif |
(...skipping 20 matching lines...) Expand all Loading... |
370 int capture_count); | 371 int capture_count); |
371 | 372 |
372 private: | 373 private: |
373 static Handle<JSFunction> NewFunctionHelper(Handle<String> name, | 374 static Handle<JSFunction> NewFunctionHelper(Handle<String> name, |
374 Handle<Object> prototype); | 375 Handle<Object> prototype); |
375 | 376 |
376 static Handle<DescriptorArray> CopyAppendCallbackDescriptors( | 377 static Handle<DescriptorArray> CopyAppendCallbackDescriptors( |
377 Handle<DescriptorArray> array, | 378 Handle<DescriptorArray> array, |
378 Handle<Object> descriptors); | 379 Handle<Object> descriptors); |
379 | 380 |
380 static Handle<JSFunction> BaseNewFunctionFromBoilerplate( | |
381 Handle<JSFunction> boilerplate, | |
382 Handle<Map> function_map, | |
383 PretenureFlag pretenure); | |
384 | |
385 // Create a new map cache. | 381 // Create a new map cache. |
386 static Handle<MapCache> NewMapCache(int at_least_space_for); | 382 static Handle<MapCache> NewMapCache(int at_least_space_for); |
387 | 383 |
388 // Update the map cache in the global context with (keys, map) | 384 // Update the map cache in the global context with (keys, map) |
389 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 385 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
390 Handle<FixedArray> keys, | 386 Handle<FixedArray> keys, |
391 Handle<Map> map); | 387 Handle<Map> map); |
392 }; | 388 }; |
393 | 389 |
394 | 390 |
395 } } // namespace v8::internal | 391 } } // namespace v8::internal |
396 | 392 |
397 #endif // V8_FACTORY_H_ | 393 #endif // V8_FACTORY_H_ |
OLD | NEW |