http://codereview.chromium.org/7477045/diff/19020/src/heap.cc File src/heap.cc (right):
http://codereview.chromium.org/7477045/diff/19020/src/heap.cc#newcode2698 src/heap.cc:2698: ASSERT(sliced_string->parent()->IsSeqString()); I think we can have flat cons with external first. It will pass the IsExternalString check above but will hit this assert. http://codereview.chromium.org/7477045/diff/19020/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/7477045/diff/19020/src/ia32/code-stubs-ia32.cc#newcode3413 src/ia32/code-stubs-ia32.cc:3413: Label cons_string, encoding; encoding -> check_encoding http://codereview.chromium.org/7477045/diff/19020/src/ia32/lithium-codegen-ia32.cc File src/ia32/lithium-codegen-ia32.cc (right): http://codereview.chromium.org/7477045/diff/19020/src/ia32/lithium-codegen-ia32.cc#newcode3177 src/ia32/lithium-codegen-ia32.cc:3177: __ and_(result, kStringRepresentationMask); Too much code now. Either put it behind the flag or restructure to avoid two copies of the code that checks encoding and loads chars. If the index is updated relatively early the latter should be doable. http://codereview.chromium.org/7477045/diff/19020/src/jsregexp.cc File src/jsregexp.cc (right): http://codereview.chromium.org/7477045/diff/19020/src/jsregexp.cc#newcode237 src/jsregexp.cc:237: if (!subject->IsFlatAndTruncated()) FlattenOrTruncateString(subject); This doesn't seem necessary. This code can be modified to work with slices. I don't think we need to expose the Truncate family of functions. Given that slices only contain flat strings it's simply a matter of taking one more offset into account at each use site. Truncating doesn't make us more efficient. That said we might want to introduce GC-time truncating later, but it likely won't use the handlified versions. http://codereview.chromium.org/7477045/diff/19020/src/objects.h File src/objects.h (right): http://codereview.chromium.org/7477045/diff/19020/src/objects.h#newcode6275 src/objects.h:6275: class SlicedString: public String { Please document classes. Explain that only slices of flat strings are allowed and that nested slices are automatically simplified. http://codereview.chromium.org/7477045/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
