| 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 // Creates a code object that is not yet fully initialized yet. | 688 // Creates a code object that is not yet fully initialized yet. |
| 689 inline Handle<Code> NewCodeRaw(int object_size, bool immovable); | 689 inline Handle<Code> NewCodeRaw(int object_size, bool immovable); |
| 690 | 690 |
| 691 // Attempt to find the number in a small cache. If we finds it, return | 691 // Attempt to find the number in a small cache. If we finds it, return |
| 692 // the string representation of the number. Otherwise return undefined. | 692 // the string representation of the number. Otherwise return undefined. |
| 693 Handle<Object> GetNumberStringCache(Handle<Object> number); | 693 Handle<Object> GetNumberStringCache(Handle<Object> number); |
| 694 | 694 |
| 695 // Update the cache with a new number-string pair. | 695 // Update the cache with a new number-string pair. |
| 696 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 696 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
| 697 | 697 |
| 698 // Initializes a function with a shared part and prototype. | |
| 699 // Note: this code was factored out of NewFunction such that other parts of | |
| 700 // the VM could use it. Specifically, a function that creates instances of | |
| 701 // type JS_FUNCTION_TYPE benefit from the use of this function. | |
| 702 inline void InitializeFunction(Handle<JSFunction> function, | |
| 703 Handle<SharedFunctionInfo> info, | |
| 704 Handle<Context> context); | |
| 705 | |
| 706 // Creates a function initialized with a shared part. | 698 // Creates a function initialized with a shared part. |
| 707 Handle<JSFunction> NewFunction(Handle<Map> map, | 699 Handle<JSFunction> NewFunction(Handle<Map> map, |
| 708 Handle<SharedFunctionInfo> info, | 700 Handle<SharedFunctionInfo> info, |
| 709 Handle<Context> context, | 701 Handle<Context> context, |
| 710 PretenureFlag pretenure = TENURED); | 702 PretenureFlag pretenure = TENURED); |
| 711 | 703 |
| 712 Handle<JSFunction> NewFunction(Handle<Map> map, | 704 Handle<JSFunction> NewFunction(Handle<Map> map, |
| 713 Handle<String> name, | 705 Handle<String> name, |
| 714 MaybeHandle<Code> maybe_code); | 706 MaybeHandle<Code> maybe_code); |
| 715 }; | 707 }; |
| 716 | 708 |
| 717 } // namespace internal | 709 } // namespace internal |
| 718 } // namespace v8 | 710 } // namespace v8 |
| 719 | 711 |
| 720 #endif // V8_FACTORY_H_ | 712 #endif // V8_FACTORY_H_ |
| OLD | NEW |