| 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/globals.h" | 8 #include "src/globals.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 Handle<Foreign> NewForeign(Address addr, | 326 Handle<Foreign> NewForeign(Address addr, |
| 327 PretenureFlag pretenure = NOT_TENURED); | 327 PretenureFlag pretenure = NOT_TENURED); |
| 328 | 328 |
| 329 // Allocate a new foreign object. The foreign is pretenured (allocated | 329 // Allocate a new foreign object. The foreign is pretenured (allocated |
| 330 // directly in the old generation). | 330 // directly in the old generation). |
| 331 Handle<Foreign> NewForeign(const AccessorDescriptor* foreign); | 331 Handle<Foreign> NewForeign(const AccessorDescriptor* foreign); |
| 332 | 332 |
| 333 Handle<ByteArray> NewByteArray(int length, | 333 Handle<ByteArray> NewByteArray(int length, |
| 334 PretenureFlag pretenure = NOT_TENURED); | 334 PretenureFlag pretenure = NOT_TENURED); |
| 335 | 335 |
| 336 template <class T> |
| 337 Handle<PodArray<T>> NewPodArray(int length, |
| 338 PretenureFlag pretenure = NOT_TENURED) { |
| 339 return Handle<PodArray<T>>::cast( |
| 340 NewByteArray(length * sizeof(T), pretenure)); |
| 341 } |
| 342 |
| 336 Handle<BytecodeArray> NewBytecodeArray(int length, const byte* raw_bytecodes, | 343 Handle<BytecodeArray> NewBytecodeArray(int length, const byte* raw_bytecodes, |
| 337 int frame_size, int parameter_count, | 344 int frame_size, int parameter_count, |
| 338 Handle<FixedArray> constant_pool); | 345 Handle<FixedArray> constant_pool); |
| 339 | 346 |
| 340 Handle<FixedTypedArrayBase> NewFixedTypedArrayWithExternalPointer( | 347 Handle<FixedTypedArrayBase> NewFixedTypedArrayWithExternalPointer( |
| 341 int length, ExternalArrayType array_type, void* external_pointer, | 348 int length, ExternalArrayType array_type, void* external_pointer, |
| 342 PretenureFlag pretenure = NOT_TENURED); | 349 PretenureFlag pretenure = NOT_TENURED); |
| 343 | 350 |
| 344 Handle<FixedTypedArrayBase> NewFixedTypedArray( | 351 Handle<FixedTypedArrayBase> NewFixedTypedArray( |
| 345 int length, ExternalArrayType array_type, bool initialize, | 352 int length, ExternalArrayType array_type, bool initialize, |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 FunctionMode function_mode); | 795 FunctionMode function_mode); |
| 789 | 796 |
| 790 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 797 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
| 791 FunctionMode function_mode); | 798 FunctionMode function_mode); |
| 792 }; | 799 }; |
| 793 | 800 |
| 794 } // namespace internal | 801 } // namespace internal |
| 795 } // namespace v8 | 802 } // namespace v8 |
| 796 | 803 |
| 797 #endif // V8_FACTORY_H_ | 804 #endif // V8_FACTORY_H_ |
| OLD | NEW |