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 "isolate.h" | 8 #include "isolate.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 // not initialized by New<>() functions. It's the responsibility of the caller | 649 // not initialized by New<>() functions. It's the responsibility of the caller |
650 // to do that. | 650 // to do that. |
651 template<typename T> | 651 template<typename T> |
652 Handle<T> New(Handle<Map> map, AllocationSpace space); | 652 Handle<T> New(Handle<Map> map, AllocationSpace space); |
653 | 653 |
654 template<typename T> | 654 template<typename T> |
655 Handle<T> New(Handle<Map> map, | 655 Handle<T> New(Handle<Map> map, |
656 AllocationSpace space, | 656 AllocationSpace space, |
657 Handle<AllocationSite> allocation_site); | 657 Handle<AllocationSite> allocation_site); |
658 | 658 |
| 659 // Creates a code object that is not yet fully initialized yet. |
| 660 inline Handle<Code> NewCodeRaw(int object_size, bool immovable); |
| 661 |
659 // Initializes a function with a shared part and prototype. | 662 // Initializes a function with a shared part and prototype. |
660 // Note: this code was factored out of NewFunction such that other parts of | 663 // Note: this code was factored out of NewFunction such that other parts of |
661 // the VM could use it. Specifically, a function that creates instances of | 664 // the VM could use it. Specifically, a function that creates instances of |
662 // type JS_FUNCTION_TYPE benefit from the use of this function. | 665 // type JS_FUNCTION_TYPE benefit from the use of this function. |
663 inline void InitializeFunction(Handle<JSFunction> function, | 666 inline void InitializeFunction(Handle<JSFunction> function, |
664 Handle<SharedFunctionInfo> info, | 667 Handle<SharedFunctionInfo> info, |
665 Handle<Context> context, | 668 Handle<Context> context, |
666 MaybeHandle<Object> maybe_prototype); | 669 MaybeHandle<Object> maybe_prototype); |
667 | 670 |
668 // Creates a function initialized with a shared part. | 671 // Creates a function initialized with a shared part. |
(...skipping 14 matching lines...) Expand all Loading... |
683 // the string representation of the number. Otherwise return undefined. | 686 // the string representation of the number. Otherwise return undefined. |
684 Handle<Object> GetNumberStringCache(Handle<Object> number); | 687 Handle<Object> GetNumberStringCache(Handle<Object> number); |
685 | 688 |
686 // Update the cache with a new number-string pair. | 689 // Update the cache with a new number-string pair. |
687 void SetNumberStringCache(Handle<Object> number, Handle<String> string); | 690 void SetNumberStringCache(Handle<Object> number, Handle<String> string); |
688 }; | 691 }; |
689 | 692 |
690 } } // namespace v8::internal | 693 } } // namespace v8::internal |
691 | 694 |
692 #endif // V8_FACTORY_H_ | 695 #endif // V8_FACTORY_H_ |
OLD | NEW |