Track ascii-ness of data in externalized strings.
authorvitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 17 Jun 2010 16:19:28 +0000 (16:19 +0000)
committervitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 17 Jun 2010 16:19:28 +0000 (16:19 +0000)
commit3cafa654627be94c134626ce9df3d7e1252df4ed
treeed7ebd5c560c56abf0e3d934e080f47bced84f21
parent26e692af2ff4584ee6c4a8e5a44408d9cb5ee620
Track ascii-ness of data in externalized strings.

If a two-byte string only contains ascii characters, then we can save
memory when flattening a cons string containing it. Similarly we can
use this in Array.prototype.join implementation. To track this a new
bit is added to instance type. This bit is used as a hint in generated
code and in runtime functions.

To enable testing a new V8 extension is added controlled by
--expose-externalize-string flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
15 files changed:
src/arm/codegen-arm.cc
src/bootstrapper.cc
src/execution.cc
src/execution.h
src/flag-definitions.h
src/heap.cc
src/heap.h
src/ia32/codegen-ia32.cc
src/objects-debug.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/runtime.cc
src/x64/codegen-x64.cc
test/mjsunit/string-externalize.js [new file with mode: 0644]