| 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 // Interface for handle based allocation. | 15 // Interface for handle based allocation. |
| 16 class Factory final { | 16 class Factory final { |
| 17 public: | 17 public: |
| 18 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, | 18 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, |
| 19 Handle<Object> to_number, const char* type_of, | 19 Handle<Object> to_number, bool to_boolean, |
| 20 byte kind); | 20 const char* type_of, byte kind); |
| 21 | 21 |
| 22 // Allocates a fixed array initialized with undefined values. | 22 // Allocates a fixed array initialized with undefined values. |
| 23 Handle<FixedArray> NewFixedArray( | 23 Handle<FixedArray> NewFixedArray( |
| 24 int size, | 24 int size, |
| 25 PretenureFlag pretenure = NOT_TENURED); | 25 PretenureFlag pretenure = NOT_TENURED); |
| 26 | 26 |
| 27 // Allocate a new fixed array with non-existing entries (the hole). | 27 // Allocate a new fixed array with non-existing entries (the hole). |
| 28 Handle<FixedArray> NewFixedArrayWithHoles( | 28 Handle<FixedArray> NewFixedArrayWithHoles( |
| 29 int size, | 29 int size, |
| 30 PretenureFlag pretenure = NOT_TENURED); | 30 PretenureFlag pretenure = NOT_TENURED); |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 // Create a JSArray with no elements and no length. | 711 // Create a JSArray with no elements and no length. |
| 712 Handle<JSArray> NewJSArray(ElementsKind elements_kind, | 712 Handle<JSArray> NewJSArray(ElementsKind elements_kind, |
| 713 Strength strength = Strength::WEAK, | 713 Strength strength = Strength::WEAK, |
| 714 PretenureFlag pretenure = NOT_TENURED); | 714 PretenureFlag pretenure = NOT_TENURED); |
| 715 }; | 715 }; |
| 716 | 716 |
| 717 } // namespace internal | 717 } // namespace internal |
| 718 } // namespace v8 | 718 } // namespace v8 |
| 719 | 719 |
| 720 #endif // V8_FACTORY_H_ | 720 #endif // V8_FACTORY_H_ |
| OLD | NEW |