Commit cf46d30d authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Handle array construction in native code (ARM version).

Ported the handle array construction in native code to ARM. See http://codereview.chromium.org/193125 for details. 
Review URL: http://codereview.chromium.org/217014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2d3edc62
This diff is collapsed.
......@@ -172,7 +172,9 @@ BUILTIN(ArrayCodeGeneric) {
}
// Optimize the case where there are no parameters passed.
if (args.length() == 1) return array->Initialize(4);
if (args.length() == 1) {
return array->Initialize(JSArray::kPreallocatedArrayElements);
}
// Take the arguments as elements.
int number_of_elements = args.length() - 1;
......
......@@ -4389,6 +4389,9 @@ class JSArray: public JSObject {
void JSArrayVerify();
#endif
// Number of element slots to pre-allocate for an empty array.
static const int kPreallocatedArrayElements = 4;
// Layout description.
static const int kLengthOffset = JSObject::kHeaderSize;
static const int kSize = kLengthOffset + kPointerSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment