| 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 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 437 } |
| 438 | 438 |
| 439 void NewJSArrayStorage( | 439 void NewJSArrayStorage( |
| 440 Handle<JSArray> array, | 440 Handle<JSArray> array, |
| 441 int length, | 441 int length, |
| 442 int capacity, | 442 int capacity, |
| 443 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); | 443 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); |
| 444 | 444 |
| 445 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); | 445 Handle<JSGeneratorObject> NewJSGeneratorObject(Handle<JSFunction> function); |
| 446 | 446 |
| 447 Handle<JSArrayBuffer> NewJSArrayBuffer(); | 447 Handle<JSArrayBuffer> NewJSArrayBuffer(SharedFlag is_shared = NOT_SHARED); |
| 448 | 448 |
| 449 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type); | 449 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type, |
| 450 SharedFlag is_shared = NOT_SHARED); |
| 450 | 451 |
| 451 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind); | 452 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind); |
| 452 | 453 |
| 453 // Creates a new JSTypedArray with the specified buffer. | 454 // Creates a new JSTypedArray with the specified buffer. |
| 454 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type, | 455 Handle<JSTypedArray> NewJSTypedArray(ExternalArrayType type, |
| 455 Handle<JSArrayBuffer> buffer, | 456 Handle<JSArrayBuffer> buffer, |
| 456 size_t byte_offset, size_t length); | 457 size_t byte_offset, size_t length, |
| 458 SharedFlag is_shared = NOT_SHARED); |
| 457 | 459 |
| 458 // Creates a new on-heap JSTypedArray. | 460 // Creates a new on-heap JSTypedArray. |
| 459 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind, | 461 Handle<JSTypedArray> NewJSTypedArray(ElementsKind elements_kind, |
| 460 size_t number_of_elements); | 462 size_t number_of_elements); |
| 461 | 463 |
| 462 Handle<JSDataView> NewJSDataView(); | 464 Handle<JSDataView> NewJSDataView(); |
| 463 Handle<JSDataView> NewJSDataView(Handle<JSArrayBuffer> buffer, | 465 Handle<JSDataView> NewJSDataView(Handle<JSArrayBuffer> buffer, |
| 464 size_t byte_offset, size_t byte_length); | 466 size_t byte_offset, size_t byte_length); |
| 465 | 467 |
| 466 // TODO(aandrey): Maybe these should take table, index and kind arguments. | 468 // TODO(aandrey): Maybe these should take table, index and kind arguments. |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 // 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 |
| 751 // 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 |
| 752 // 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 |
| 753 // object that has been freshly allocated. | 755 // object that has been freshly allocated. |
| 754 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 756 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 755 }; | 757 }; |
| 756 | 758 |
| 757 } } // namespace v8::internal | 759 } } // namespace v8::internal |
| 758 | 760 |
| 759 #endif // V8_FACTORY_H_ | 761 #endif // V8_FACTORY_H_ |
| OLD | NEW |