| 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 #undef SYMBOL_ACCESSOR | 702 #undef SYMBOL_ACCESSOR |
| 703 | 703 |
| 704 // Allocates a new SharedFunctionInfo object. | 704 // Allocates a new SharedFunctionInfo object. |
| 705 Handle<SharedFunctionInfo> NewSharedFunctionInfo( | 705 Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| 706 Handle<String> name, int number_of_literals, FunctionKind kind, | 706 Handle<String> name, int number_of_literals, FunctionKind kind, |
| 707 Handle<Code> code, Handle<ScopeInfo> scope_info); | 707 Handle<Code> code, Handle<ScopeInfo> scope_info); |
| 708 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, | 708 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, |
| 709 MaybeHandle<Code> code, | 709 MaybeHandle<Code> code, |
| 710 bool is_constructor); | 710 bool is_constructor); |
| 711 | 711 |
| 712 Handle<SharedFunctionInfo> NewSharedFunctionInfoForLiteral( |
| 713 FunctionLiteral* literal, Handle<Script> script); |
| 714 |
| 712 static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { | 715 static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { |
| 713 return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || | 716 return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || |
| 714 function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); | 717 function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); |
| 715 } | 718 } |
| 716 | 719 |
| 717 Handle<Map> CreateSloppyFunctionMap(FunctionMode function_mode); | 720 Handle<Map> CreateSloppyFunctionMap(FunctionMode function_mode); |
| 718 | 721 |
| 719 Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, | 722 Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, |
| 720 Handle<JSFunction> empty_function); | 723 Handle<JSFunction> empty_function); |
| 721 | 724 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 FunctionMode function_mode); | 802 FunctionMode function_mode); |
| 800 | 803 |
| 801 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 804 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 802 FunctionMode function_mode); | 805 FunctionMode function_mode); |
| 803 }; | 806 }; |
| 804 | 807 |
| 805 } // namespace internal | 808 } // namespace internal |
| 806 } // namespace v8 | 809 } // namespace v8 |
| 807 | 810 |
| 808 #endif // V8_FACTORY_H_ | 811 #endif // V8_FACTORY_H_ |
| OLD | NEW |