Reviewers: Vyacheslav Egorov,
Message:
Some highlights of the change:
* Introduced KeyedAccessGrowMode, which specifies whether an IC supports
growing
an array
* Extended ExtraICState to hold both strict mode flag and
KeyedAccessGrowMode
* All empty JSArray backing stores (FAST_SMI_ONLY_ELEMENTS, FAST_ELEMENTS,
FAST_DOUBLE_ELEMENTS) are now the same object, the fixed_empty_array.
* Created a fast path for transitioning the ElementsKind of empty arrays in
codegen-XXX.cc
* Extended the existing KeyedStoreIC implementations for FixedArray and
FixedDoubleArray backing stores to handle array growth.
Review guidance:
* Start with the changes in ic.cc to ComputeStub and GetStubKind to handle
elements growing for both the monomorphic and polymorphic stubs.
* Look at the new versions of the generated stub code in stub-cache-XXX.cc
Description:
Implement KeyedStoreICs to grow arrays on out-of-bound stores.
Supports growing non-COW JSArray by a single element if the backing store
has
room, and initial allocation of a backing store for the store to index zero
of
an empty array to kPreallocatedArrayElements elements (e.g. the [] array
literal).
Please review this at http://codereview.chromium.org/9310117/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/code-stubs-arm.cc
M src/arm/codegen-arm.cc
M src/arm/stub-cache-arm.cc
M src/code-stubs.h
M src/code-stubs.cc
M src/heap.h
M src/heap.cc
M src/ia32/code-stubs-ia32.cc
M src/ia32/codegen-ia32.cc
M src/ia32/stub-cache-ia32.cc
M src/ic-inl.h
M src/ic.h
M src/ic.cc
M src/objects-debug.cc
M src/objects-inl.h
M src/objects.h
M src/profile-generator.cc
M src/stub-cache.h
M src/stub-cache.cc
M src/type-info.cc
M src/x64/code-stubs-x64.cc
M src/x64/codegen-x64.cc
M src/x64/stub-cache-x64.cc
A test/mjsunit/array-store-and-grow.js
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev