| 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/globals.h" | 8 #include "src/globals.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { | 703 static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { |
| 704 return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || | 704 return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || |
| 705 function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); | 705 function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); |
| 706 } | 706 } |
| 707 | 707 |
| 708 Handle<Map> CreateSloppyFunctionMap(FunctionMode function_mode); | 708 Handle<Map> CreateSloppyFunctionMap(FunctionMode function_mode); |
| 709 | 709 |
| 710 Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, | 710 Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, |
| 711 Handle<JSFunction> empty_function); | 711 Handle<JSFunction> empty_function); |
| 712 | 712 |
| 713 Handle<Map> CreateClassFunctionMap(Handle<JSFunction> empty_function); |
| 714 |
| 713 // Allocates a new JSMessageObject object. | 715 // Allocates a new JSMessageObject object. |
| 714 Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, | 716 Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, |
| 715 Handle<Object> argument, | 717 Handle<Object> argument, |
| 716 int start_position, | 718 int start_position, |
| 717 int end_position, | 719 int end_position, |
| 718 Handle<Object> script, | 720 Handle<Object> script, |
| 719 Handle<Object> stack_frames); | 721 Handle<Object> stack_frames); |
| 720 | 722 |
| 721 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 723 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
| 722 | 724 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 786 |
| 785 // Create a JSArray with no elements and no length. | 787 // Create a JSArray with no elements and no length. |
| 786 Handle<JSArray> NewJSArray(ElementsKind elements_kind, | 788 Handle<JSArray> NewJSArray(ElementsKind elements_kind, |
| 787 PretenureFlag pretenure = NOT_TENURED); | 789 PretenureFlag pretenure = NOT_TENURED); |
| 788 | 790 |
| 789 void SetFunctionInstanceDescriptor(Handle<Map> map, | 791 void SetFunctionInstanceDescriptor(Handle<Map> map, |
| 790 FunctionMode function_mode); | 792 FunctionMode function_mode); |
| 791 | 793 |
| 792 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 794 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 793 FunctionMode function_mode); | 795 FunctionMode function_mode); |
| 796 |
| 797 void SetClassFunctionInstanceDescriptor(Handle<Map> map); |
| 794 }; | 798 }; |
| 795 | 799 |
| 796 } // namespace internal | 800 } // namespace internal |
| 797 } // namespace v8 | 801 } // namespace v8 |
| 798 | 802 |
| 799 #endif // V8_FACTORY_H_ | 803 #endif // V8_FACTORY_H_ |
| OLD | NEW |