| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
| 6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
| 7 | 7 |
| 8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
| 9 #include "src/messages.h" | 9 #include "src/messages.h" |
| 10 #include "src/type-feedback-vector.h" | 10 #include "src/type-feedback-vector.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // Global objects are pretenured and initialized based on a constructor. | 405 // Global objects are pretenured and initialized based on a constructor. |
| 406 Handle<JSGlobalObject> NewJSGlobalObject(Handle<JSFunction> constructor); | 406 Handle<JSGlobalObject> NewJSGlobalObject(Handle<JSFunction> constructor); |
| 407 | 407 |
| 408 // JS objects are pretenured when allocated by the bootstrapper and | 408 // JS objects are pretenured when allocated by the bootstrapper and |
| 409 // runtime. | 409 // runtime. |
| 410 Handle<JSObject> NewJSObjectFromMap( | 410 Handle<JSObject> NewJSObjectFromMap( |
| 411 Handle<Map> map, | 411 Handle<Map> map, |
| 412 PretenureFlag pretenure = NOT_TENURED, | 412 PretenureFlag pretenure = NOT_TENURED, |
| 413 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); | 413 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
| 414 | 414 |
| 415 // JS modules are pretenured. | |
| 416 Handle<JSModule> NewJSModule(Handle<Context> context, | |
| 417 Handle<ScopeInfo> scope_info); | |
| 418 | |
| 419 // JS arrays are pretenured when allocated by the parser. | 415 // JS arrays are pretenured when allocated by the parser. |
| 420 | 416 |
| 421 // Create a JSArray with a specified length and elements initialized | 417 // Create a JSArray with a specified length and elements initialized |
| 422 // according to the specified mode. | 418 // according to the specified mode. |
| 423 Handle<JSArray> NewJSArray( | 419 Handle<JSArray> NewJSArray( |
| 424 ElementsKind elements_kind, int length, int capacity, | 420 ElementsKind elements_kind, int length, int capacity, |
| 425 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, | 421 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, |
| 426 PretenureFlag pretenure = NOT_TENURED); | 422 PretenureFlag pretenure = NOT_TENURED); |
| 427 | 423 |
| 428 Handle<JSArray> NewJSArray( | 424 Handle<JSArray> NewJSArray( |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 | 720 |
| 725 // Create a JSArray with no elements and no length. | 721 // Create a JSArray with no elements and no length. |
| 726 Handle<JSArray> NewJSArray(ElementsKind elements_kind, | 722 Handle<JSArray> NewJSArray(ElementsKind elements_kind, |
| 727 PretenureFlag pretenure = NOT_TENURED); | 723 PretenureFlag pretenure = NOT_TENURED); |
| 728 }; | 724 }; |
| 729 | 725 |
| 730 } // namespace internal | 726 } // namespace internal |
| 731 } // namespace v8 | 727 } // namespace v8 |
| 732 | 728 |
| 733 #endif // V8_FACTORY_H_ | 729 #endif // V8_FACTORY_H_ |
| OLD | NEW |