Inline zero argument array constructor.
authormvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 14 Nov 2013 12:05:09 +0000 (12:05 +0000)
committermvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 14 Nov 2013 12:05:09 +0000 (12:05 +0000)
commit3cf157b43b2ca7a6d16bb1ac7fe3145182d0109c
tree67dfa6d55f84cda884855daec37ebc2d4257210d
parentf6af4e19f521e98bfadbe44dce0918df2e337d41
Inline zero argument array constructor.
patch from issue 54583003 (dependent code).

Zero arguments - very easy

1 argument - three special cases:
  a) If length is a constant in valid array length range,
     no need to check it at runtime.
  b) respect DoNotInline feedback on the AllocationSite for
     cases that the argument is not a smi or is an integer
     with a length that should create a dictionary.
  c) if kind feedback is non-holey, and length is non-constant,
     we'd have to generate a lot of code to be correct.
     Don't inline this case.

N arguments - one special case:
  a) If a deopt ever occurs because an input argument isn't
     compatible with the elements kind, then set the
     DoNotInline flag.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
18 files changed:
src/arm/code-stubs-arm.cc
src/arm/stub-cache-arm.cc
src/code-stubs-hydrogen.cc
src/elements-kind.cc
src/elements-kind.h
src/heap.cc
src/hydrogen.cc
src/hydrogen.h
src/ia32/code-stubs-ia32.cc
src/ia32/stub-cache-ia32.cc
src/objects-inl.h
src/objects-printer.cc
src/objects.cc
src/objects.h
src/runtime.cc
src/x64/code-stubs-x64.cc
src/x64/stub-cache-x64.cc
test/mjsunit/array-constructor-feedback.js