| 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 { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 Handle<OrderedHashSet> NewOrderedHashSet(); | 54 Handle<OrderedHashSet> NewOrderedHashSet(); |
| 55 Handle<OrderedHashMap> NewOrderedHashMap(); | 55 Handle<OrderedHashMap> NewOrderedHashMap(); |
| 56 | 56 |
| 57 // Create a new boxed value. | 57 // Create a new boxed value. |
| 58 Handle<Box> NewBox(Handle<Object> value); | 58 Handle<Box> NewBox(Handle<Object> value); |
| 59 | 59 |
| 60 // Create a pre-tenured empty AccessorPair. | 60 // Create a pre-tenured empty AccessorPair. |
| 61 Handle<AccessorPair> NewAccessorPair(); | 61 Handle<AccessorPair> NewAccessorPair(); |
| 62 | 62 |
| 63 // Create an empty TypeFeedbackInfo. | 63 // Create an empty TypeFeedbackInfo. |
| 64 Handle<TypeFeedbackInfo> NewTypeFeedbackInfo(); | 64 Handle<TypeFeedbackInfo> NewTypeFeedbackInfo( |
| 65 Handle<TypeFeedbackVector> vector); |
| 65 | 66 |
| 66 // Finds the internalized copy for string in the string table. | 67 // Finds the internalized copy for string in the string table. |
| 67 // If not found, a new string is added to the table and returned. | 68 // If not found, a new string is added to the table and returned. |
| 68 Handle<String> InternalizeUtf8String(Vector<const char> str); | 69 Handle<String> InternalizeUtf8String(Vector<const char> str); |
| 69 Handle<String> InternalizeUtf8String(const char* str) { | 70 Handle<String> InternalizeUtf8String(const char* str) { |
| 70 return InternalizeUtf8String(CStrVector(str)); | 71 return InternalizeUtf8String(CStrVector(str)); |
| 71 } | 72 } |
| 72 Handle<String> InternalizeString(Handle<String> str); | 73 Handle<String> InternalizeString(Handle<String> str); |
| 73 Handle<String> InternalizeOneByteString(Vector<const uint8_t> str); | 74 Handle<String> InternalizeOneByteString(Vector<const uint8_t> str); |
| 74 Handle<String> InternalizeOneByteString( | 75 Handle<String> InternalizeOneByteString( |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 | 612 |
| 612 // Allocates a new SharedFunctionInfo object. | 613 // Allocates a new SharedFunctionInfo object. |
| 613 Handle<SharedFunctionInfo> NewSharedFunctionInfo( | 614 Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| 614 Handle<String> name, int number_of_literals, FunctionKind kind, | 615 Handle<String> name, int number_of_literals, FunctionKind kind, |
| 615 Handle<Code> code, Handle<ScopeInfo> scope_info, | 616 Handle<Code> code, Handle<ScopeInfo> scope_info, |
| 616 Handle<TypeFeedbackVector> feedback_vector); | 617 Handle<TypeFeedbackVector> feedback_vector); |
| 617 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, | 618 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, |
| 618 MaybeHandle<Code> code); | 619 MaybeHandle<Code> code); |
| 619 | 620 |
| 620 // Allocate a new type feedback vector | 621 // Allocate a new type feedback vector |
| 621 Handle<TypeFeedbackVector> NewTypeFeedbackVector(int slot_count); | 622 Handle<TypeFeedbackVector> NewTypeFeedbackVector(int slot_count, |
| 623 int ic_slot_count); |
| 622 | 624 |
| 623 // Allocates a new JSMessageObject object. | 625 // Allocates a new JSMessageObject object. |
| 624 Handle<JSMessageObject> NewJSMessageObject( | 626 Handle<JSMessageObject> NewJSMessageObject( |
| 625 Handle<String> type, | 627 Handle<String> type, |
| 626 Handle<JSArray> arguments, | 628 Handle<JSArray> arguments, |
| 627 int start_position, | 629 int start_position, |
| 628 int end_position, | 630 int end_position, |
| 629 Handle<Object> script, | 631 Handle<Object> script, |
| 630 Handle<Object> stack_frames); | 632 Handle<Object> stack_frames); |
| 631 | 633 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 715 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 714 // size, but keeping the original prototype. The receiver must have at least | 716 // size, but keeping the original prototype. The receiver must have at least |
| 715 // the size of the new object. The object is reinitialized and behaves as an | 717 // the size of the new object. The object is reinitialized and behaves as an |
| 716 // object that has been freshly allocated. | 718 // object that has been freshly allocated. |
| 717 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 719 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 718 }; | 720 }; |
| 719 | 721 |
| 720 } } // namespace v8::internal | 722 } } // namespace v8::internal |
| 721 | 723 |
| 722 #endif // V8_FACTORY_H_ | 724 #endif // V8_FACTORY_H_ |
| OLD | NEW |