From 24bbf98cec9f39a2592892adb245ce15d58cab19 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 2 Feb 2017 17:48:20 +0000 Subject: [PATCH] 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 Change-Id: I2c2f74ca147b3ea98ef06f9c64553737d17d42fd --- runtime/asm_support.h | 2 +- runtime/image.cc | 2 +- runtime/mirror/string.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/asm_support.h b/runtime/asm_support.h index c7a94a90d..4a2e34f24 100644 --- a/runtime/asm_support.h +++ b/runtime/asm_support.h @@ -246,7 +246,7 @@ ADD_TEST_EQ(MIRROR_STRING_COUNT_OFFSET, art::mirror::String::CountOffset().Int32 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 54b099eb1..1acfcf569 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', '6', '\0' }; // Erroneous resolved class. +const uint8_t ImageHeader::kImageVersion[] = { '0', '3', '7', '\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 409c6c289..4af69c090 100644 --- a/runtime/mirror/string.h +++ b/runtime/mirror/string.h @@ -32,7 +32,7 @@ class StubTest_ReadBarrierForRoot_Test; namespace mirror { // String Compression -static constexpr bool kUseStringCompression = false; +static constexpr bool kUseStringCompression = true; enum class StringCompressionFlag : uint32_t { kCompressed = 0u, kUncompressed = 1u -- 2.11.0