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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 471 |
472 // Global objects are pretenured and initialized based on a constructor. | 472 // Global objects are pretenured and initialized based on a constructor. |
473 Handle<JSGlobalObject> NewJSGlobalObject(Handle<JSFunction> constructor); | 473 Handle<JSGlobalObject> NewJSGlobalObject(Handle<JSFunction> constructor); |
474 | 474 |
475 // JS objects are pretenured when allocated by the bootstrapper and | 475 // JS objects are pretenured when allocated by the bootstrapper and |
476 // runtime. | 476 // runtime. |
477 Handle<JSObject> NewJSObjectFromMap( | 477 Handle<JSObject> NewJSObjectFromMap( |
478 Handle<Map> map, | 478 Handle<Map> map, |
479 PretenureFlag pretenure = NOT_TENURED, | 479 PretenureFlag pretenure = NOT_TENURED, |
480 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); | 480 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
| 481 Handle<JSObject> NewSlowJSObjectFromMap( |
| 482 Handle<Map> map, |
| 483 int number_of_slow_properties = NameDictionary::kInitialCapacity, |
| 484 PretenureFlag pretenure = NOT_TENURED); |
481 | 485 |
482 // JS arrays are pretenured when allocated by the parser. | 486 // JS arrays are pretenured when allocated by the parser. |
483 | 487 |
484 // Create a JSArray with a specified length and elements initialized | 488 // Create a JSArray with a specified length and elements initialized |
485 // according to the specified mode. | 489 // according to the specified mode. |
486 Handle<JSArray> NewJSArray( | 490 Handle<JSArray> NewJSArray( |
487 ElementsKind elements_kind, int length, int capacity, | 491 ElementsKind elements_kind, int length, int capacity, |
488 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, | 492 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, |
489 PretenureFlag pretenure = NOT_TENURED); | 493 PretenureFlag pretenure = NOT_TENURED); |
490 | 494 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 Handle<Object> argument, | 766 Handle<Object> argument, |
763 int start_position, | 767 int start_position, |
764 int end_position, | 768 int end_position, |
765 Handle<Object> script, | 769 Handle<Object> script, |
766 Handle<Object> stack_frames); | 770 Handle<Object> stack_frames); |
767 | 771 |
768 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 772 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
769 | 773 |
770 // Return a map for given number of properties using the map cache in the | 774 // Return a map for given number of properties using the map cache in the |
771 // native context. | 775 // native context. |
772 Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context, | 776 Handle<Map> ObjectLiteralMapFromCache(Handle<Context> native_context, |
773 int number_of_properties, | 777 int number_of_properties); |
774 bool* is_result_from_cache); | |
775 | 778 |
776 Handle<RegExpMatchInfo> NewRegExpMatchInfo(); | 779 Handle<RegExpMatchInfo> NewRegExpMatchInfo(); |
777 | 780 |
778 // Creates a new FixedArray that holds the data associated with the | 781 // Creates a new FixedArray that holds the data associated with the |
779 // atom regexp and stores it in the regexp. | 782 // atom regexp and stores it in the regexp. |
780 void SetRegExpAtomData(Handle<JSRegExp> regexp, | 783 void SetRegExpAtomData(Handle<JSRegExp> regexp, |
781 JSRegExp::Type type, | 784 JSRegExp::Type type, |
782 Handle<String> source, | 785 Handle<String> source, |
783 JSRegExp::Flags flags, | 786 JSRegExp::Flags flags, |
784 Handle<Object> match_pattern); | 787 Handle<Object> match_pattern); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 842 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
840 FunctionMode function_mode); | 843 FunctionMode function_mode); |
841 | 844 |
842 void SetClassFunctionInstanceDescriptor(Handle<Map> map); | 845 void SetClassFunctionInstanceDescriptor(Handle<Map> map); |
843 }; | 846 }; |
844 | 847 |
845 } // namespace internal | 848 } // namespace internal |
846 } // namespace v8 | 849 } // namespace v8 |
847 | 850 |
848 #endif // V8_FACTORY_H_ | 851 #endif // V8_FACTORY_H_ |
OLD | NEW |