Reviewers: antonm,
Description:
Simplify Array.splice by simply returning the result of
AllocateEmptyJSArray.
Please review this at http://codereview.chromium.org/3216014/show
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/builtins.cc
Index: src/builtins.cc
===================================================================
--- src/builtins.cc (revision 5377)
+++ src/builtins.cc (working copy)
@@ -665,9 +665,7 @@
// Return empty array when no arguments are supplied.
if (n_arguments == 0) {
- Object* result = AllocateEmptyJSArray();
- if (result->IsFailure()) return result;
- return JSArray::cast(result);
+ return AllocateEmptyJSArray();
}
int relative_start = 0;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev