| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Allocate a new fixed array with non-existing entries (the hole). | 52 // Allocate a new fixed array with non-existing entries (the hole). |
| 53 Handle<FixedArray> NewFixedArrayWithHoles( | 53 Handle<FixedArray> NewFixedArrayWithHoles( |
| 54 int size, | 54 int size, |
| 55 PretenureFlag pretenure = NOT_TENURED); | 55 PretenureFlag pretenure = NOT_TENURED); |
| 56 | 56 |
| 57 // Allocate a new uninitialized fixed double array. | 57 // Allocate a new uninitialized fixed double array. |
| 58 Handle<FixedDoubleArray> NewFixedDoubleArray( | 58 Handle<FixedDoubleArray> NewFixedDoubleArray( |
| 59 int size, | 59 int size, |
| 60 PretenureFlag pretenure = NOT_TENURED); | 60 PretenureFlag pretenure = NOT_TENURED); |
| 61 | 61 |
| 62 Handle<ConstantPoolArray> NewConstantPoolArray( |
| 63 int number_of_int64_entries, |
| 64 int number_of_ptr_entries, |
| 65 int number_of_int32_entries); |
| 66 |
| 62 Handle<SeededNumberDictionary> NewSeededNumberDictionary( | 67 Handle<SeededNumberDictionary> NewSeededNumberDictionary( |
| 63 int at_least_space_for); | 68 int at_least_space_for); |
| 64 | 69 |
| 65 Handle<UnseededNumberDictionary> NewUnseededNumberDictionary( | 70 Handle<UnseededNumberDictionary> NewUnseededNumberDictionary( |
| 66 int at_least_space_for); | 71 int at_least_space_for); |
| 67 | 72 |
| 68 Handle<NameDictionary> NewNameDictionary(int at_least_space_for); | 73 Handle<NameDictionary> NewNameDictionary(int at_least_space_for); |
| 69 | 74 |
| 70 Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for); | 75 Handle<ObjectHashSet> NewObjectHashSet(int at_least_space_for); |
| 71 | 76 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 PretenureFlag pretenure = NOT_TENURED); | 241 PretenureFlag pretenure = NOT_TENURED); |
| 237 | 242 |
| 238 Handle<ExternalArray> NewExternalArray( | 243 Handle<ExternalArray> NewExternalArray( |
| 239 int length, | 244 int length, |
| 240 ExternalArrayType array_type, | 245 ExternalArrayType array_type, |
| 241 void* external_pointer, | 246 void* external_pointer, |
| 242 PretenureFlag pretenure = NOT_TENURED); | 247 PretenureFlag pretenure = NOT_TENURED); |
| 243 | 248 |
| 244 Handle<Cell> NewCell(Handle<Object> value); | 249 Handle<Cell> NewCell(Handle<Object> value); |
| 245 | 250 |
| 251 Handle<PropertyCell> NewPropertyCellWithHole(); |
| 252 |
| 246 Handle<PropertyCell> NewPropertyCell(Handle<Object> value); | 253 Handle<PropertyCell> NewPropertyCell(Handle<Object> value); |
| 247 | 254 |
| 248 Handle<AllocationSite> NewAllocationSite(); | 255 Handle<AllocationSite> NewAllocationSite(); |
| 249 | 256 |
| 250 Handle<Map> NewMap( | 257 Handle<Map> NewMap( |
| 251 InstanceType type, | 258 InstanceType type, |
| 252 int instance_size, | 259 int instance_size, |
| 253 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); | 260 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); |
| 254 | 261 |
| 255 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); | 262 Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 266 | 273 |
| 267 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); | 274 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); |
| 268 | 275 |
| 269 Handle<FixedArray> CopySizeFixedArray(Handle<FixedArray> array, | 276 Handle<FixedArray> CopySizeFixedArray(Handle<FixedArray> array, |
| 270 int new_length, | 277 int new_length, |
| 271 PretenureFlag pretenure = NOT_TENURED); | 278 PretenureFlag pretenure = NOT_TENURED); |
| 272 | 279 |
| 273 Handle<FixedDoubleArray> CopyFixedDoubleArray( | 280 Handle<FixedDoubleArray> CopyFixedDoubleArray( |
| 274 Handle<FixedDoubleArray> array); | 281 Handle<FixedDoubleArray> array); |
| 275 | 282 |
| 283 Handle<ConstantPoolArray> CopyConstantPoolArray( |
| 284 Handle<ConstantPoolArray> array); |
| 285 |
| 276 // Numbers (e.g. literals) are pretenured by the parser. | 286 // Numbers (e.g. literals) are pretenured by the parser. |
| 277 Handle<Object> NewNumber(double value, | 287 Handle<Object> NewNumber(double value, |
| 278 PretenureFlag pretenure = NOT_TENURED); | 288 PretenureFlag pretenure = NOT_TENURED); |
| 279 | 289 |
| 280 Handle<Object> NewNumberFromInt(int32_t value, | 290 Handle<Object> NewNumberFromInt(int32_t value, |
| 281 PretenureFlag pretenure = NOT_TENURED); | 291 PretenureFlag pretenure = NOT_TENURED); |
| 282 Handle<Object> NewNumberFromUint(uint32_t value, | 292 Handle<Object> NewNumberFromUint(uint32_t value, |
| 283 PretenureFlag pretenure = NOT_TENURED); | 293 PretenureFlag pretenure = NOT_TENURED); |
| 284 inline Handle<Object> NewNumberFromSize(size_t value, | 294 inline Handle<Object> NewNumberFromSize(size_t value, |
| 285 PretenureFlag pretenure = NOT_TENURED); | 295 PretenureFlag pretenure = NOT_TENURED); |
| 286 Handle<HeapNumber> NewHeapNumber(double value, | 296 Handle<HeapNumber> NewHeapNumber(double value, |
| 287 PretenureFlag pretenure = NOT_TENURED); | 297 PretenureFlag pretenure = NOT_TENURED); |
| 288 | 298 |
| 289 | 299 |
| 290 // These objects are used by the api to create env-independent data | 300 // These objects are used by the api to create env-independent data |
| 291 // structures in the heap. | 301 // structures in the heap. |
| 292 Handle<JSObject> NewNeanderObject(); | 302 Handle<JSObject> NewNeanderObject(); |
| 293 | 303 |
| 294 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); | 304 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); |
| 295 | 305 |
| 296 // JS objects are pretenured when allocated by the bootstrapper and | 306 // JS objects are pretenured when allocated by the bootstrapper and |
| 297 // runtime. | 307 // runtime. |
| 298 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 308 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
| 299 PretenureFlag pretenure = NOT_TENURED); | 309 PretenureFlag pretenure = NOT_TENURED); |
| 300 | 310 |
| 301 // Global objects are pretenured. | 311 // Global objects are pretenured and initialized based on a constructor. |
| 302 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); | 312 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); |
| 303 | 313 |
| 304 // JS objects are pretenured when allocated by the bootstrapper and | 314 // JS objects are pretenured when allocated by the bootstrapper and |
| 305 // runtime. | 315 // runtime. |
| 306 Handle<JSObject> NewJSObjectFromMap(Handle<Map> map, | 316 Handle<JSObject> NewJSObjectFromMap(Handle<Map> map, |
| 307 PretenureFlag pretenure = NOT_TENURED, | 317 PretenureFlag pretenure = NOT_TENURED, |
| 308 bool allocate_properties = true); | 318 bool allocate_properties = true); |
| 309 | 319 |
| 310 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( | 320 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( |
| 311 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); | 321 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 PretenureFlag pretenure = TENURED); | 373 PretenureFlag pretenure = TENURED); |
| 364 | 374 |
| 365 Handle<ScopeInfo> NewScopeInfo(int length); | 375 Handle<ScopeInfo> NewScopeInfo(int length); |
| 366 | 376 |
| 367 Handle<JSObject> NewExternal(void* value); | 377 Handle<JSObject> NewExternal(void* value); |
| 368 | 378 |
| 369 Handle<Code> NewCode(const CodeDesc& desc, | 379 Handle<Code> NewCode(const CodeDesc& desc, |
| 370 Code::Flags flags, | 380 Code::Flags flags, |
| 371 Handle<Object> self_reference, | 381 Handle<Object> self_reference, |
| 372 bool immovable = false, | 382 bool immovable = false, |
| 373 bool crankshafted = false); | 383 bool crankshafted = false, |
| 384 int prologue_offset = Code::kPrologueOffsetNotSet); |
| 374 | 385 |
| 375 Handle<Code> CopyCode(Handle<Code> code); | 386 Handle<Code> CopyCode(Handle<Code> code); |
| 376 | 387 |
| 377 Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); | 388 Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); |
| 378 | 389 |
| 379 Handle<Object> ToObject(Handle<Object> object); | 390 Handle<Object> ToObject(Handle<Object> object); |
| 380 Handle<Object> ToObject(Handle<Object> object, | 391 Handle<Object> ToObject(Handle<Object> object, |
| 381 Handle<Context> native_context); | 392 Handle<Context> native_context); |
| 382 | 393 |
| 383 // Interface for creating error objects. | 394 // Interface for creating error objects. |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 } | 675 } |
| 665 | 676 |
| 666 private: | 677 private: |
| 667 Isolate* isolate_; | 678 Isolate* isolate_; |
| 668 }; | 679 }; |
| 669 | 680 |
| 670 | 681 |
| 671 } } // namespace v8::internal | 682 } } // namespace v8::internal |
| 672 | 683 |
| 673 #endif // V8_FACTORY_H_ | 684 #endif // V8_FACTORY_H_ |
| OLD | NEW |