| 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 FeedbackVectorSpec; | 14 class FeedbackVectorSpec; |
| 15 | 15 |
| 16 // Interface for handle based allocation. | 16 // Interface for handle based allocation. |
| 17 class Factory final { | 17 class Factory final { |
| 18 public: | 18 public: |
| 19 Handle<Oddball> NewOddball(Handle<Map> map, | 19 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, |
| 20 const char* to_string, | 20 Handle<Object> to_number, const char* type_of, |
| 21 Handle<Object> to_number, | |
| 22 byte kind); | 21 byte kind); |
| 23 | 22 |
| 24 // Allocates a fixed array initialized with undefined values. | 23 // Allocates a fixed array initialized with undefined values. |
| 25 Handle<FixedArray> NewFixedArray( | 24 Handle<FixedArray> NewFixedArray( |
| 26 int size, | 25 int size, |
| 27 PretenureFlag pretenure = NOT_TENURED); | 26 PretenureFlag pretenure = NOT_TENURED); |
| 28 | 27 |
| 29 // Allocate a new fixed array with non-existing entries (the hole). | 28 // Allocate a new fixed array with non-existing entries (the hole). |
| 30 Handle<FixedArray> NewFixedArrayWithHoles( | 29 Handle<FixedArray> NewFixedArrayWithHoles( |
| 31 int size, | 30 int size, |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 752 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 754 // size, but keeping the original prototype. The receiver must have at least | 753 // size, but keeping the original prototype. The receiver must have at least |
| 755 // the size of the new object. The object is reinitialized and behaves as an | 754 // the size of the new object. The object is reinitialized and behaves as an |
| 756 // object that has been freshly allocated. | 755 // object that has been freshly allocated. |
| 757 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 756 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 758 }; | 757 }; |
| 759 | 758 |
| 760 } } // namespace v8::internal | 759 } } // namespace v8::internal |
| 761 | 760 |
| 762 #endif // V8_FACTORY_H_ | 761 #endif // V8_FACTORY_H_ |
| OLD | NEW |