antonm@chromium.org
a0bc9eb040
Add more bailouts for Array.slice over arguments.
...
Unfortunately, arguments is pretty much the normal JS object. For now
I am adding more sanity checks (in hope that typically arguments
list is rather short.) However it probably requires more systematic
treatment, for example, we could optimistically copy elements until
we meet first hole and in this case resort to JS builtin.
Review URL: http://codereview.chromium.org/6062006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:23:40 +00:00
antonm@chromium.org
ae476ecd6c
Teach C++ ArraySlice builtin to deal with arguments object.
...
Array.prototype.slice.call(arguments, ...) idiom is pretty common (up to 97% of invocations
in GMail), so we'd better handle it efficiently too.
Review URL: http://codereview.chromium.org/6034003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:41:41 +00:00
antonm@chromium.org
e8e35eccac
Properly process arrays with overridden prototype in various Array's functions.
...
Bailout to JS Array builtins if array's prototype is different from
Array.prototype. Otherwise there might be inherited elements coming
from this prototype.
Review URL: http://codereview.chromium.org/2037008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 12:22:09 +00:00
antonm@chromium.org
56eb46e096
Fix a special case (zero length result array).
...
Review URL: http://codereview.chromium.org/669075
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 21:29:33 +00:00
antonm@chromium.org
ea1b4f0eb1
Introduce builtin for Array.slice function.
...
Review URL: http://codereview.chromium.org/604059
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 12:14:23 +00:00