Reviewers: Rico, antonm, Message: PTAL.
It's probably best to start with objects.h for the definition of SlicedString
and go from there. I haven't implemented generated code for creating substrings yet. Slices can only be created in the runtime system for now. I just adapted a lot of other things so that slices works with existing stuff. http://codereview.chromium.org/7477045/diff/1/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/7477045/diff/1/src/arm/code-stubs-arm.cc#newcode5395 src/arm/code-stubs-arm.cc:5395: Do not create string slice unless experimental flag is set. http://codereview.chromium.org/7477045/diff/1/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/7477045/diff/1/src/ia32/code-stubs-ia32.cc#newcode5628 src/ia32/code-stubs-ia32.cc:5628: Do not create string slice unless experimental flag is set. http://codereview.chromium.org/7477045/diff/1/src/x64/code-stubs-x64.cc File src/x64/code-stubs-x64.cc (right): http://codereview.chromium.org/7477045/diff/1/src/x64/code-stubs-x64.cc#newcode4545 src/x64/code-stubs-x64.cc:4545: Do not create string slice unless experimental flag is set. http://codereview.chromium.org/7477045/diff/1/test/mjsunit/string-slices.js File test/mjsunit/string-slices.js (right): http://codereview.chromium.org/7477045/diff/1/test/mjsunit/string-slices.js#newcode27 test/mjsunit/string-slices.js:27: Mostly a copy of test/mjsunit/substr.js, but using --string-slices flag and a few additional tests. Description: Tentative implementation of string slices (hidden under the flag --string-slices). TEST=test/mjsunit/string-slices.js Please review this at http://codereview.chromium.org/7477045/ SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge Affected files: M src/arm/code-stubs-arm.cc M src/arm/lithium-arm.h M src/arm/lithium-arm.cc M src/arm/lithium-codegen-arm.cc M src/flag-definitions.h M src/heap-inl.h M src/heap.h M src/heap.cc M src/ia32/code-stubs-ia32.cc M src/ia32/lithium-codegen-ia32.cc M src/ia32/lithium-ia32.h M src/ia32/lithium-ia32.cc M src/mark-compact.cc M src/objects-inl.h M src/objects-visiting.h M src/objects-visiting.cc M src/objects.h M src/objects.cc M src/regexp-macro-assembler.cc M src/x64/code-stubs-x64.cc M src/x64/lithium-codegen-x64.cc M src/x64/lithium-x64.h M src/x64/lithium-x64.cc A + test/mjsunit/string-slices.js M test/mjsunit/substr.js -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev