Commit Graph

6 Commits

Author SHA1 Message Date
adamk@chromium.org
9bebd23d5c Fix %GetArrayKeys to not skip non-enumerable indices
This is one step in the direction of fixing a range of small bugs in the array methods when dealing with non-standard element attributes.

Added tests exercising this behavior for shift and unshift.

For Proxies and Interceptors, the behavior of %GetArrayKeys is now to just return an interval, rather than trying to list all their indexed properties. In the Proxy case, this seems like the only way to avoid an observable difference between smart and non-smart array methods. For Interceptors, the usual case (in WebKit, anyway) is for them to have all indices in [0, length), so enumerating them won't be any better than simply iterating over that range.

Review URL: https://codereview.chromium.org/12653010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 18:04:32 +00:00
adamk@chromium.org
51a888ff48 Fix bogus left-shifts in Array tests
Review URL: https://codereview.chromium.org/12729014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 15:08:30 +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
d4cb1ba3c5 Faster moving FixedArray elements around.
Review URL: http://codereview.chromium.org/660245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 15:33:30 +00:00
antonm@chromium.org
a346644121 Adding checks for the cases when array grows too big.
Review URL: http://codereview.chromium.org/601092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:04:30 +00:00
antonm@chromium.org
e02a5aa602 Introduce builtin for Array.unshift function.
Review URL: http://codereview.chromium.org/600124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 13:25:06 +00:00