Better support for 'polymorphic' JS and external arrays
authordanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 17 May 2011 17:29:13 +0000 (17:29 +0000)
committerdanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 17 May 2011 17:29:13 +0000 (17:29 +0000)
commit5a9b2b3c5ffce0c7cd870191b34b99c80143c624
tree2827c78e6cbc6d05a52c44dbcde7e60831018df5
parent46aeea9d3ac6b8bdc212681d4a1e70708de9be9b
Better support for 'polymorphic' JS and external arrays

Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps. Currently, the only array types supported by the MEGAMORPHIC stub are fast elements for objects and JSArrays.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
34 files changed:
src/arm/code-stubs-arm.h
src/arm/ic-arm.cc
src/arm/macro-assembler-arm.cc
src/arm/macro-assembler-arm.h
src/arm/stub-cache-arm.cc
src/builtins.cc
src/builtins.h
src/code-stubs.cc
src/code-stubs.h
src/flag-definitions.h
src/heap.h
src/ia32/ic-ia32.cc
src/ia32/macro-assembler-ia32.cc
src/ia32/macro-assembler-ia32.h
src/ia32/stub-cache-ia32.cc
src/ic.cc
src/ic.h
src/list.h
src/log.cc
src/log.h
src/mark-compact.cc
src/mips/code-stubs-mips.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/spaces.cc
src/stub-cache.cc
src/stub-cache.h
src/type-info.cc
src/v8-counters.h
src/x64/ic-x64.cc
src/x64/macro-assembler-x64.cc
src/x64/macro-assembler-x64.h
src/x64/stub-cache-x64.cc