Index: src/builtins.cc |
=================================================================== |
--- src/builtins.cc (revision 2894) |
+++ src/builtins.cc (working copy) |
@@ -135,7 +135,9 @@ |
BUILTIN_END |
-BUILTIN(ArrayCode) { |
+BUILTIN(ArrayCodeGeneric) { |
+ Counters::array_function_runtime.Increment(); |
+ |
JSArray* array; |
if (CalledAsConstructor()) { |
array = JSArray::cast(*receiver); |
@@ -166,7 +168,7 @@ |
// Take the argument as the length. |
obj = array->Initialize(0); |
if (obj->IsFailure()) return obj; |
- if (args.length() == 2) return array->SetElementsLength(args[1]); |
+ return array->SetElementsLength(args[1]); |
} |
// Optimize the case where there are no parameters passed. |