Custom call IC-s for String.prototype.{charAt,charCodeAt}.
authorvitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 May 2010 14:23:19 +0000 (14:23 +0000)
committervitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 May 2010 14:23:19 +0000 (14:23 +0000)
commitad0e38909f0e4dfd1641d89e53ffd2b183bd4829
treea1bcc5577b55d83822a6573869a37af632a28de7
parent3e88d0d2af13c018486a3df64752800c499ad457
Custom call IC-s for String.prototype.{charAt,charCodeAt}.

These string methods can be composed from two basic blocks: charCodeAt
and fromCharCode, both of which have fast cases for certain types of
inputs. In this patch these two blocks are refactored to allow
generating the fast cases without having to jump around the slow
cases. In the slow cases since they can now be invoked both from
inline runtime functions and from IC stubs we either have to
save/restore state of the current frame or enter/leave a new internal
frame. This is handled by new RuntimeCallHelper interface. Its
implementation for virtual frame is based on FrameRegisterState class
extracted from DeferredCode class.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
27 files changed:
src/arm/codegen-arm.cc
src/arm/codegen-arm.h
src/arm/full-codegen-arm.cc
src/arm/ic-arm.cc
src/arm/stub-cache-arm.cc
src/codegen.h
src/full-codegen.cc
src/full-codegen.h
src/ia32/codegen-ia32.cc
src/ia32/codegen-ia32.h
src/ia32/full-codegen-ia32.cc
src/ia32/ic-ia32.cc
src/ia32/stub-cache-ia32.cc
src/ia32/virtual-frame-ia32.h
src/jump-target-heavy.cc
src/jump-target-light.cc
src/objects.h
src/string.js
src/stub-cache.h
src/x64/codegen-x64.cc
src/x64/codegen-x64.h
src/x64/full-codegen-x64.cc
src/x64/ic-x64.cc
src/x64/stub-cache-x64.cc
src/x64/virtual-frame-x64.h
test/mjsunit/string-charat.js
test/mjsunit/string-index.js