Commit Graph

18 Commits

Author SHA1 Message Date
danno@chromium.org
9910edbb9a Implement tracking and optimizations of packed arrays
R=jkummerow@chromium.org
TEST=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10170030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-23 14:24:29 +00:00
fschneider@chromium.org
b28f403cfa Force checking of result on all functions in elements.h that return MaybeObject*.
Add two missing failure checks found by this.
Review URL: https://chromiumcodereview.appspot.com/10356071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-09 12:49:56 +00:00
svenpanne@chromium.org
30e6cac50e Valgrind cleanliness, part 3: Delete elements accessors on exit.
This fixes 15 leaks, returning 132 bytes of lost memory.

As an additional bonus, elements accessors initialization has bee simplified a bit.

Review URL: https://chromiumcodereview.appspot.com/9836109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 10:51:13 +00:00
jkummerow@chromium.org
4e405b6945 Fix missing write barrier in CopyObjectToObjectElements.
Passing the write barrier mode as a parameter does not make sense, as the elements kind specific copiers know best whether a write barrier is needed or not.

BUG=119926
TEST=mjsunit/regress/regress-crbug-119926
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9808111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-25 15:16:06 +00:00
danno@chromium.org
9104cfd959 Use CopyElements for SetFastDoubleElementsCapacityAndLength
Review URL: https://chromiumcodereview.appspot.com/9663002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-16 13:59:59 +00:00
danno@chromium.org
17b7d33d53 Implement efficient element copying in ElementsAccessors.
Review URL: https://chromiumcodereview.appspot.com/9638014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 13:48:29 +00:00
danno@chromium.org
eebf33a94a Consistently order receiver and holder argument in ElementAccessor.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9605006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-06 12:22:18 +00:00
danno@chromium.org
3e155c66f4 Automatically determine ElementsKind name for debug printing
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9618003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-06 12:03:14 +00:00
danno@chromium.org
5ce20b3387 Recfactor core HasElement functionality into ElementsAccessors
Review URL: https://chromiumcodereview.appspot.com/9572014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 16:14:34 +00:00
danno@chromium.org
ef54f5690f Support Smi->Double->HeapObject transitions in constructed Arrays.
Also several bugs with Smi/double elements handling and make Ensure* routines more flexible.

BUG=none
TEST=test/mjsunit/array-construct-transition.js

Review URL: http://codereview.chromium.org/8820014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 08:50:19 +00:00
mstarzinger@chromium.org
e24c612a5e Fix setting array length to be ES5 conform.
This also refactors the way we set the length of an arrays' backing
store to use the new elements accessor interface. The actual fix is in
DictionaryElementsAccessor::SetLengthWithoutNormalize() where we first
search for non-deletable elements according to ES5 section 15.4.5.2
specifications.

Snippet from the specification: Attempting to set the length property of
an Array object to a value that is numerically less than or equal to the
largest numeric property name of an existing array indexed non-deletable
property of the array will result in the length being set to a numeric
value that is one greater than that largest numeric property name.

R=danno@chromium.org
TEST=test262/15.4.4.??-7-b-16

Review URL: http://codereview.chromium.org/8372064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:59:56 +00:00
danno@chromium.org
9b2de409f9 Mechanical refactor to move ElementsKind type out of JSObject.
R=svenpanne@chromium.org
BUG=none
TEST=all

Review URL: http://codereview.chromium.org/7849017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-09 09:35:57 +00:00
danno@chromium.org
4c460099a0 Unify GetElement handlers in ElementsAccessor
BUG=none
TEST=external-arrays.js

Review URL: http://codereview.chromium.org/7655030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 09:51:08 +00:00
danno@chromium.org
edd691960f Implement UnionOfKeys for NonStrictArguments
BUG=none
TEST=cctest/test-api/IndexedInterceptorNonStrictArgsWithIndexedAccessor

Review URL: http://codereview.chromium.org/7657011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 16:15:30 +00:00
danno@chromium.org
96f198a4dc Change AddElementsToFixedArray to work on FixedArrayBase rather than JSObject
In the process, make ElementsAccessors work internally more seamlessly with FixedArrayBase.

R=svenpanne@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7618012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 14:52:03 +00:00
danno@chromium.org
ff13ab4575 Refactor UnionOfKeys into ElementsAccessor
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7529046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 10:51:01 +00:00
danno@chromium.org
4a7a47ac8f Move element deletion into element handlers
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7566004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 11:42:14 +00:00
danno@chromium.org
bdf6895bb3 Encapsulate element handling into a class keyed on ElementsKind
Advantage is that it's much easier to add new element types (like FAST_SMI_ELEMENTS), and that handling logic for each element kind is (more) consolidated.

Currently, only GetElementsWithReceiver uses the new encapsulation, but the goal is to move much more element functionality into the class incrementally.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7527001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 11:12:46 +00:00