Revert^2 "Enable String compression."
Test: m test-art-host (interpreter, JIT, AOT)
Test: m test-art-target on Nexus 6P (interpreter, JIT, AOT)
Test: Nexus 6P boots
Test: m ahat-test
Bug: 31040547
This reverts commit afcb365b2d3ae152989826c2afb0d98a9cf3f6be.
Change-Id: Id7e27d717c8e36d3c7abdde59ca2c8fd4fc221c9
diff --git a/runtime/asm_support.h b/runtime/asm_support.h
index c7a94a9..4a2e34f 100644
--- a/runtime/asm_support.h
+++ b/runtime/asm_support.h
@@ -246,7 +246,7 @@
ADD_TEST_EQ(MIRROR_STRING_VALUE_OFFSET, art::mirror::String::ValueOffset().Int32Value())
// String compression feature.
-#define STRING_COMPRESSION_FEATURE 0
+#define STRING_COMPRESSION_FEATURE 1
ADD_TEST_EQ(STRING_COMPRESSION_FEATURE, art::mirror::kUseStringCompression);
#if defined(__cplusplus)
diff --git a/runtime/image.cc b/runtime/image.cc
index 4e6da79..243051e 100644
--- a/runtime/image.cc
+++ b/runtime/image.cc
@@ -25,7 +25,7 @@
namespace art {
const uint8_t ImageHeader::kImageMagic[] = { 'a', 'r', 't', '\n' };
-const uint8_t ImageHeader::kImageVersion[] = { '0', '3', '8', '\0' }; // hash-based DexCache types
+const uint8_t ImageHeader::kImageVersion[] = { '0', '3', '9', '\0' }; // Enable string compression.
ImageHeader::ImageHeader(uint32_t image_begin,
uint32_t image_size,
diff --git a/runtime/mirror/string.h b/runtime/mirror/string.h
index 35ce98e..dbb5a4c 100644
--- a/runtime/mirror/string.h
+++ b/runtime/mirror/string.h
@@ -32,7 +32,7 @@
namespace mirror {
// String Compression
-static constexpr bool kUseStringCompression = false;
+static constexpr bool kUseStringCompression = true;
enum class StringCompressionFlag : uint32_t {
kCompressed = 0u,
kUncompressed = 1u