Remove the different length string types
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 24 Nov 2009 14:10:06 +0000 (14:10 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 24 Nov 2009 14:10:06 +0000 (14:10 +0000)
commiteb4d261e24d14e6b6800d521a5b3c41ece205336
tree8c8589b9375bce44f50e0978d3c390f09e9cffbb
parent56074f783adb2113b6a3ea895366d5133bf79924
Remove the different length string types

The different length string types was used to encode the string length and the hash in one field. This is now split into two fields one for length and one for hash. The hash field still encodes the array index of the string if it has one. If an array index is encoded in the hash field the string length is added to the top bits of the hash field to avoid a hash value of zero.

On 32-bit this causes an additional 4 bytes to be used for all string objects. On 64-bit this will be half on average dur to pointer alignment.
Review URL: http://codereview.chromium.org/436001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
25 files changed:
include/v8.h
src/arm/codegen-arm.cc
src/arm/ic-arm.cc
src/arm/stub-cache-arm.cc
src/heap-inl.h
src/heap.cc
src/heap.h
src/ia32/codegen-ia32.cc
src/ia32/ic-ia32.cc
src/ia32/stub-cache-ia32.cc
src/objects-debug.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/runtime.cc
src/string-stream.cc
src/stub-cache.h
src/utils.cc
src/utils.h
src/x64/codegen-x64.cc
src/x64/ic-x64.cc
src/x64/stub-cache-x64.cc
test/cctest/test-alloc.cc
test/cctest/test-api.cc
test/cctest/test-heap.cc