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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { | 687 static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { |
688 return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || | 688 return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || |
689 function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); | 689 function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); |
690 } | 690 } |
691 | 691 |
692 Handle<Map> CreateSloppyFunctionMap(FunctionMode function_mode); | 692 Handle<Map> CreateSloppyFunctionMap(FunctionMode function_mode); |
693 | 693 |
694 Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, | 694 Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, |
695 Handle<JSFunction> empty_function); | 695 Handle<JSFunction> empty_function); |
696 | 696 |
| 697 Handle<Map> CreateClassFunctionMap(Handle<JSFunction> empty_function); |
| 698 |
697 // Allocates a new JSMessageObject object. | 699 // Allocates a new JSMessageObject object. |
698 Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, | 700 Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, |
699 Handle<Object> argument, | 701 Handle<Object> argument, |
700 int start_position, | 702 int start_position, |
701 int end_position, | 703 int end_position, |
702 Handle<Object> script, | 704 Handle<Object> script, |
703 Handle<Object> stack_frames); | 705 Handle<Object> stack_frames); |
704 | 706 |
705 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 707 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
706 | 708 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 | 768 |
767 // Create a JSArray with no elements and no length. | 769 // Create a JSArray with no elements and no length. |
768 Handle<JSArray> NewJSArray(ElementsKind elements_kind, | 770 Handle<JSArray> NewJSArray(ElementsKind elements_kind, |
769 PretenureFlag pretenure = NOT_TENURED); | 771 PretenureFlag pretenure = NOT_TENURED); |
770 | 772 |
771 void SetFunctionInstanceDescriptor(Handle<Map> map, | 773 void SetFunctionInstanceDescriptor(Handle<Map> map, |
772 FunctionMode function_mode); | 774 FunctionMode function_mode); |
773 | 775 |
774 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 776 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
775 FunctionMode function_mode); | 777 FunctionMode function_mode); |
| 778 |
| 779 void SetClassFunctionInstanceDescriptor(Handle<Map> map); |
776 }; | 780 }; |
777 | 781 |
778 } // namespace internal | 782 } // namespace internal |
779 } // namespace v8 | 783 } // namespace v8 |
780 | 784 |
781 #endif // V8_FACTORY_H_ | 785 #endif // V8_FACTORY_H_ |
OLD | NEW |