VectorICs: keyed element loads were kicking out non-smi keys unnecessarily
authormvstanton <mvstanton@chromium.org>
Mon, 23 Mar 2015 18:50:12 +0000 (11:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 23 Mar 2015 18:50:23 +0000 (18:50 +0000)
commit6689cc27ebe60685c025de9ae1f09919093f8213
tree0f3e06a573c59ec118924059ea81eb9bfe6a8836
parent7421c7f5989b6e6df98e47eeb3d499c3b9511cbe
VectorICs: keyed element loads were kicking out non-smi keys unnecessarily

Handlers should be in charge of this work. The change uncovered a bug in
vector-ics related to keyed loads into strings. It's important for
StringCharCodeAtGenerator, a helper used in full code and in
LoadIndexedStringStub (a handler) to protect the vector and slot registers
when it makes a runtime call to convert a HeapNumber to a Smi.

It's still possible for the handler to MISS after this call, perhaps due
to out of bounds access. In that case, the vector and slot registers need
to be delivered safely to the MISS handler.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27377}
12 files changed:
src/arm/code-stubs-arm.cc
src/arm/full-codegen-arm.cc
src/arm64/code-stubs-arm64.cc
src/arm64/full-codegen-arm64.cc
src/code-stubs.h
src/ia32/code-stubs-ia32.cc
src/ia32/full-codegen-ia32.cc
src/mips/code-stubs-mips.cc
src/mips/full-codegen-mips.cc
src/x64/code-stubs-x64.cc
src/x64/full-codegen-x64.cc
test/mjsunit/string-index.js