| 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" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 enum FunctionMode { | 15 enum FunctionMode { |
| 16 // With prototype. | 16 // With prototype. |
| 17 FUNCTION_WITH_WRITEABLE_PROTOTYPE, | 17 FUNCTION_WITH_WRITEABLE_PROTOTYPE, |
| 18 FUNCTION_WITH_READONLY_PROTOTYPE, | 18 FUNCTION_WITH_READONLY_PROTOTYPE, |
| 19 // Without prototype. | 19 // Without prototype. |
| 20 FUNCTION_WITHOUT_PROTOTYPE | 20 FUNCTION_WITHOUT_PROTOTYPE |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // Interface for handle based allocation. | 23 // Interface for handle based allocation. |
| 24 class Factory final { | 24 class Factory final { |
| 25 public: | 25 public: |
| 26 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, | 26 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, |
| 27 Handle<Object> to_number, bool to_boolean, | 27 Handle<Object> to_number, const char* type_of, |
| 28 const char* type_of, byte kind); | 28 byte kind); |
| 29 | 29 |
| 30 // Allocates a fixed array initialized with undefined values. | 30 // Allocates a fixed array initialized with undefined values. |
| 31 Handle<FixedArray> NewFixedArray( | 31 Handle<FixedArray> NewFixedArray( |
| 32 int size, | 32 int size, |
| 33 PretenureFlag pretenure = NOT_TENURED); | 33 PretenureFlag pretenure = NOT_TENURED); |
| 34 | 34 |
| 35 // Allocate a new fixed array with non-existing entries (the hole). | 35 // Allocate a new fixed array with non-existing entries (the hole). |
| 36 Handle<FixedArray> NewFixedArrayWithHoles( | 36 Handle<FixedArray> NewFixedArrayWithHoles( |
| 37 int size, | 37 int size, |
| 38 PretenureFlag pretenure = NOT_TENURED); | 38 PretenureFlag pretenure = NOT_TENURED); |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 FunctionMode function_mode); | 740 FunctionMode function_mode); |
| 741 | 741 |
| 742 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 742 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 743 FunctionMode function_mode); | 743 FunctionMode function_mode); |
| 744 }; | 744 }; |
| 745 | 745 |
| 746 } // namespace internal | 746 } // namespace internal |
| 747 } // namespace v8 | 747 } // namespace v8 |
| 748 | 748 |
| 749 #endif // V8_FACTORY_H_ | 749 #endif // V8_FACTORY_H_ |
| OLD | NEW |