| 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 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 class FeedbackVectorSpec; |
| 14 |
| 13 // Interface for handle based allocation. | 15 // Interface for handle based allocation. |
| 14 | |
| 15 class Factory FINAL { | 16 class Factory FINAL { |
| 16 public: | 17 public: |
| 17 Handle<Oddball> NewOddball(Handle<Map> map, | 18 Handle<Oddball> NewOddball(Handle<Map> map, |
| 18 const char* to_string, | 19 const char* to_string, |
| 19 Handle<Object> to_number, | 20 Handle<Object> to_number, |
| 20 byte kind); | 21 byte kind); |
| 21 | 22 |
| 22 // Allocates a fixed array initialized with undefined values. | 23 // Allocates a fixed array initialized with undefined values. |
| 23 Handle<FixedArray> NewFixedArray( | 24 Handle<FixedArray> NewFixedArray( |
| 24 int size, | 25 int size, |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 | 630 |
| 630 // Allocates a new SharedFunctionInfo object. | 631 // Allocates a new SharedFunctionInfo object. |
| 631 Handle<SharedFunctionInfo> NewSharedFunctionInfo( | 632 Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| 632 Handle<String> name, int number_of_literals, FunctionKind kind, | 633 Handle<String> name, int number_of_literals, FunctionKind kind, |
| 633 Handle<Code> code, Handle<ScopeInfo> scope_info, | 634 Handle<Code> code, Handle<ScopeInfo> scope_info, |
| 634 Handle<TypeFeedbackVector> feedback_vector); | 635 Handle<TypeFeedbackVector> feedback_vector); |
| 635 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, | 636 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, |
| 636 MaybeHandle<Code> code); | 637 MaybeHandle<Code> code); |
| 637 | 638 |
| 638 // Allocate a new type feedback vector | 639 // Allocate a new type feedback vector |
| 639 Handle<TypeFeedbackVector> NewTypeFeedbackVector(int slot_count, | 640 Handle<TypeFeedbackVector> NewTypeFeedbackVector( |
| 640 int ic_slot_count); | 641 const FeedbackVectorSpec& spec); |
| 641 | 642 |
| 642 // Allocates a new JSMessageObject object. | 643 // Allocates a new JSMessageObject object. |
| 643 Handle<JSMessageObject> NewJSMessageObject( | 644 Handle<JSMessageObject> NewJSMessageObject( |
| 644 Handle<String> type, | 645 Handle<String> type, |
| 645 Handle<JSArray> arguments, | 646 Handle<JSArray> arguments, |
| 646 int start_position, | 647 int start_position, |
| 647 int end_position, | 648 int end_position, |
| 648 Handle<Object> script, | 649 Handle<Object> script, |
| 649 Handle<Object> stack_frames); | 650 Handle<Object> stack_frames); |
| 650 | 651 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 726 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 726 // size, but keeping the original prototype. The receiver must have at least | 727 // size, but keeping the original prototype. The receiver must have at least |
| 727 // the size of the new object. The object is reinitialized and behaves as an | 728 // the size of the new object. The object is reinitialized and behaves as an |
| 728 // object that has been freshly allocated. | 729 // object that has been freshly allocated. |
| 729 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 730 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 730 }; | 731 }; |
| 731 | 732 |
| 732 } } // namespace v8::internal | 733 } } // namespace v8::internal |
| 733 | 734 |
| 734 #endif // V8_FACTORY_H_ | 735 #endif // V8_FACTORY_H_ |
| OLD | NEW |