| 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 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 class StaticFeedbackVectorSpec; | |
| 15 | |
| 16 // Interface for handle based allocation. | 14 // Interface for handle based allocation. |
| 17 class Factory final { | 15 class Factory final { |
| 18 public: | 16 public: |
| 19 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, | 17 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, |
| 20 Handle<Object> to_number, const char* type_of, | 18 Handle<Object> to_number, const char* type_of, |
| 21 byte kind); | 19 byte kind); |
| 22 | 20 |
| 23 // Allocates a fixed array initialized with undefined values. | 21 // Allocates a fixed array initialized with undefined values. |
| 24 Handle<FixedArray> NewFixedArray( | 22 Handle<FixedArray> NewFixedArray( |
| 25 int size, | 23 int size, |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 #undef SYMBOL_ACCESSOR | 617 #undef SYMBOL_ACCESSOR |
| 620 | 618 |
| 621 // Allocates a new SharedFunctionInfo object. | 619 // Allocates a new SharedFunctionInfo object. |
| 622 Handle<SharedFunctionInfo> NewSharedFunctionInfo( | 620 Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| 623 Handle<String> name, int number_of_literals, FunctionKind kind, | 621 Handle<String> name, int number_of_literals, FunctionKind kind, |
| 624 Handle<Code> code, Handle<ScopeInfo> scope_info, | 622 Handle<Code> code, Handle<ScopeInfo> scope_info, |
| 625 Handle<TypeFeedbackVector> feedback_vector); | 623 Handle<TypeFeedbackVector> feedback_vector); |
| 626 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, | 624 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, |
| 627 MaybeHandle<Code> code); | 625 MaybeHandle<Code> code); |
| 628 | 626 |
| 629 // Allocate a new type feedback vector | |
| 630 template <typename Spec> | |
| 631 Handle<TypeFeedbackVector> NewTypeFeedbackVector(const Spec* spec); | |
| 632 | |
| 633 // Allocates a new JSMessageObject object. | 627 // Allocates a new JSMessageObject object. |
| 634 Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, | 628 Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, |
| 635 Handle<Object> argument, | 629 Handle<Object> argument, |
| 636 int start_position, | 630 int start_position, |
| 637 int end_position, | 631 int end_position, |
| 638 Handle<Object> script, | 632 Handle<Object> script, |
| 639 Handle<Object> stack_frames); | 633 Handle<Object> stack_frames); |
| 640 | 634 |
| 641 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); | 635 Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared); |
| 642 | 636 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 // size, but keeping the original prototype. The receiver must have at least | 711 // size, but keeping the original prototype. The receiver must have at least |
| 718 // the size of the new object. The object is reinitialized and behaves as an | 712 // the size of the new object. The object is reinitialized and behaves as an |
| 719 // object that has been freshly allocated. | 713 // object that has been freshly allocated. |
| 720 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 714 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 721 }; | 715 }; |
| 722 | 716 |
| 723 } // namespace internal | 717 } // namespace internal |
| 724 } // namespace v8 | 718 } // namespace v8 |
| 725 | 719 |
| 726 #endif // V8_FACTORY_H_ | 720 #endif // V8_FACTORY_H_ |
| OLD | NEW |