| 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/feedback-vector.h" | 8 #include "src/feedback-vector.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 | 484 |
| 485 // Global objects are pretenured and initialized based on a constructor. | 485 // Global objects are pretenured and initialized based on a constructor. |
| 486 Handle<JSGlobalObject> NewJSGlobalObject(Handle<JSFunction> constructor); | 486 Handle<JSGlobalObject> NewJSGlobalObject(Handle<JSFunction> constructor); |
| 487 | 487 |
| 488 // JS objects are pretenured when allocated by the bootstrapper and | 488 // JS objects are pretenured when allocated by the bootstrapper and |
| 489 // runtime. | 489 // runtime. |
| 490 Handle<JSObject> NewJSObjectFromMap( | 490 Handle<JSObject> NewJSObjectFromMap( |
| 491 Handle<Map> map, | 491 Handle<Map> map, |
| 492 PretenureFlag pretenure = NOT_TENURED, | 492 PretenureFlag pretenure = NOT_TENURED, |
| 493 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); | 493 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
| 494 Handle<JSObject> NewSlowJSObjectFromMap( |
| 495 Handle<Map> map, |
| 496 int number_of_slow_properties = NameDictionary::kInitialCapacity, |
| 497 PretenureFlag pretenure = NOT_TENURED); |
| 494 | 498 |
| 495 // JS arrays are pretenured when allocated by the parser. | 499 // JS arrays are pretenured when allocated by the parser. |
| 496 | 500 |
| 497 // Create a JSArray with a specified length and elements initialized | 501 // Create a JSArray with a specified length and elements initialized |
| 498 // according to the specified mode. | 502 // according to the specified mode. |
| 499 Handle<JSArray> NewJSArray( | 503 Handle<JSArray> NewJSArray( |
| 500 ElementsKind elements_kind, int length, int capacity, | 504 ElementsKind elements_kind, int length, int capacity, |
| 501 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, | 505 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, |
| 502 PretenureFlag pretenure = NOT_TENURED); | 506 PretenureFlag pretenure = NOT_TENURED); |
| 503 | 507 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 Handle<Object> argument, | 772 Handle<Object> argument, |
| 769 int start_position, | 773 int start_position, |
| 770 int end_position, | 774 int end_position, |
| 771 Handle<Object> script, | 775 Handle<Object> script, |
| 772 Handle<Object> stack_frames); | 776 Handle<Object> stack_frames); |
| 773 | 777 |
| 774 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 778 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
| 775 | 779 |
| 776 // Return a map for given number of properties using the map cache in the | 780 // Return a map for given number of properties using the map cache in the |
| 777 // native context. | 781 // native context. |
| 778 Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, | 782 Handle<Map> ObjectLiteralMapFromCache(Handle<Context> native_context, |
| 779 int number_of_properties, | 783 int number_of_properties, |
| 780 bool* is_result_from_cache); | 784 bool use_null_prototype); |
| 781 | 785 |
| 782 Handle<RegExpMatchInfo> NewRegExpMatchInfo(); | 786 Handle<RegExpMatchInfo> NewRegExpMatchInfo(); |
| 783 | 787 |
| 784 // Creates a new FixedArray that holds the data associated with the | 788 // Creates a new FixedArray that holds the data associated with the |
| 785 // atom regexp and stores it in the regexp. | 789 // atom regexp and stores it in the regexp. |
| 786 void SetRegExpAtomData(Handle<JSRegExp> regexp, | 790 void SetRegExpAtomData(Handle<JSRegExp> regexp, |
| 787 JSRegExp::Type type, | 791 JSRegExp::Type type, |
| 788 Handle<String> source, | 792 Handle<String> source, |
| 789 JSRegExp::Flags flags, | 793 JSRegExp::Flags flags, |
| 790 Handle<Object> match_pattern); | 794 Handle<Object> match_pattern); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 849 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 846 FunctionMode function_mode); | 850 FunctionMode function_mode); |
| 847 | 851 |
| 848 void SetClassFunctionInstanceDescriptor(Handle<Map> map); | 852 void SetClassFunctionInstanceDescriptor(Handle<Map> map); |
| 849 }; | 853 }; |
| 850 | 854 |
| 851 } // namespace internal | 855 } // namespace internal |
| 852 } // namespace v8 | 856 } // namespace v8 |
| 853 | 857 |
| 854 #endif // V8_FACTORY_H_ | 858 #endif // V8_FACTORY_H_ |
| OLD | NEW |