Index: src/factory.h |
diff --git a/src/factory.h b/src/factory.h |
index 22ec4d395ce628b04b9fc7e6e5dcb863f275c8a0..48fdf970e3f06dcf631e023d83b7460aa3c0f542 100644 |
--- a/src/factory.h |
+++ b/src/factory.h |
@@ -355,14 +355,31 @@ class Factory { |
// JS arrays are pretenured when allocated by the parser. |
Handle<JSArray> NewJSArray( |
+ ElementsKind elements_kind, |
+ int length, |
+ int capacity, |
+ PretenureFlag pretenure = NOT_TENURED); |
+ |
+ Handle<JSArray> NewJSArray( |
int capacity, |
ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, |
+ PretenureFlag pretenure = NOT_TENURED) { |
+ return NewJSArray(elements_kind, 0, capacity, pretenure); |
+ } |
+ |
+ Handle<JSArray> NewJSArrayWithElements( |
+ Handle<FixedArrayBase> elements, |
+ ElementsKind elements_kind, |
+ int length, |
PretenureFlag pretenure = NOT_TENURED); |
Handle<JSArray> NewJSArrayWithElements( |
Handle<FixedArrayBase> elements, |
ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, |
- PretenureFlag pretenure = NOT_TENURED); |
+ PretenureFlag pretenure = NOT_TENURED) { |
+ return NewJSArrayWithElements( |
+ elements, elements_kind, elements->length(), pretenure); |
+ } |
void NewJSArrayStorage( |
Handle<JSArray> array, |