| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 // JS objects are pretenured when allocated by the bootstrapper and | 323 // JS objects are pretenured when allocated by the bootstrapper and |
| 324 // runtime. | 324 // runtime. |
| 325 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 325 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
| 326 PretenureFlag pretenure = NOT_TENURED); | 326 PretenureFlag pretenure = NOT_TENURED); |
| 327 | 327 |
| 328 // Global objects are pretenured and initialized based on a constructor. | 328 // Global objects are pretenured and initialized based on a constructor. |
| 329 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); | 329 Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor); |
| 330 | 330 |
| 331 // JS objects are pretenured when allocated by the bootstrapper and | 331 // JS objects are pretenured when allocated by the bootstrapper and |
| 332 // runtime. | 332 // runtime. |
| 333 Handle<JSObject> NewJSObjectFromMap(Handle<Map> map, | 333 Handle<JSObject> NewJSObjectFromMap( |
| 334 PretenureFlag pretenure = NOT_TENURED, | 334 Handle<Map> map, |
| 335 bool allocate_properties = true); | 335 PretenureFlag pretenure = NOT_TENURED, |
| 336 bool allocate_properties = true, |
| 337 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
| 336 | 338 |
| 337 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( | 339 Handle<JSObject> NewJSObjectFromMapForDeoptimizer( |
| 338 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); | 340 Handle<Map> map, PretenureFlag pretenure = NOT_TENURED); |
| 339 | 341 |
| 340 // JS modules are pretenured. | 342 // JS modules are pretenured. |
| 341 Handle<JSModule> NewJSModule(Handle<Context> context, | 343 Handle<JSModule> NewJSModule(Handle<Context> context, |
| 342 Handle<ScopeInfo> scope_info); | 344 Handle<ScopeInfo> scope_info); |
| 343 | 345 |
| 344 // JS arrays are pretenured when allocated by the parser. | 346 // JS arrays are pretenured when allocated by the parser. |
| 345 Handle<JSArray> NewJSArray( | 347 Handle<JSArray> NewJSArray( |
| 346 int capacity, | 348 int capacity, |
| 347 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, | 349 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, |
| 348 PretenureFlag pretenure = NOT_TENURED); | 350 PretenureFlag pretenure = NOT_TENURED); |
| 349 | 351 |
| 350 Handle<JSArray> NewJSArrayWithElements( | 352 Handle<JSArray> NewJSArrayWithElements( |
| 351 Handle<FixedArrayBase> elements, | 353 Handle<FixedArrayBase> elements, |
| 352 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, | 354 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, |
| 353 PretenureFlag pretenure = NOT_TENURED); | 355 PretenureFlag pretenure = NOT_TENURED); |
| 354 | 356 |
| 357 void NewJSArrayStorage( |
| 358 Handle<JSArray> array, |
| 359 int length, |
| 360 int capacity, |
| 361 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); |
| 362 |
| 355 void SetElementsCapacityAndLength(Handle<JSArray> array, | 363 void SetElementsCapacityAndLength(Handle<JSArray> array, |
| 356 int capacity, | 364 int capacity, |
| 357 int length); | 365 int length); |
| 358 | 366 |
| 359 void SetContent(Handle<JSArray> array, Handle<FixedArrayBase> elements); | 367 void SetContent(Handle<JSArray> array, Handle<FixedArrayBase> elements); |
| 360 | 368 |
| 361 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); | 369 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); |
| 362 | 370 |
| 363 Handle<JSArrayBuffer> NewJSArrayBuffer(); | 371 Handle<JSArrayBuffer> NewJSArrayBuffer(); |
| 364 | 372 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 isolate()); | 607 isolate()); |
| 600 } else { | 608 } else { |
| 601 return NewNumber(static_cast<double>(value), pretenure); | 609 return NewNumber(static_cast<double>(value), pretenure); |
| 602 } | 610 } |
| 603 } | 611 } |
| 604 | 612 |
| 605 | 613 |
| 606 } } // namespace v8::internal | 614 } } // namespace v8::internal |
| 607 | 615 |
| 608 #endif // V8_FACTORY_H_ | 616 #endif // V8_FACTORY_H_ |
| OLD | NEW |